reuse notification item in show template

This commit is contained in:
Mathieu Jaumotte 2022-01-06 19:42:45 +01:00
parent 7d4ca8d149
commit 18959f60e2
3 changed files with 90 additions and 73 deletions

View File

@ -2,7 +2,8 @@
* Notifications List
*/
div.notification-list {
div.notification-list,
div.notification-show {
div.item-bloc {
div.item-row.header {

View File

@ -10,7 +10,7 @@
<div class="item-col">
<ul class="small_in_title">
{% if step == 'inbox' %}
{% if step is not defined or step == 'inbox' %}
<li class="notification-from">
<span class="item-key">
<abbr title="{{ 'notification.received_from'|trans }}">
@ -60,6 +60,7 @@
</blockquote>
</div>
</div>
{% if action_button is not defined or action_button != 'false' %}
<div class="item-row separator">
<ul class="record_actions">
<li>
@ -83,4 +84,5 @@
{% endif %}
</ul>
</div>
{% endif %}
</div>

View File

@ -13,19 +13,32 @@
{% endblock %}
{% block content %}
<div class="col-10">
<div class="col-10 notification notification-show">
<h1>{{ notification.title }}</h1>
<h1 class="visually-hidden">{{ notification.title }}</h1>
<div class="flex-table">
{% include 'ChillMainBundle:Notification:_list_item.html.twig' with {
'data': {
'template': handler.getTemplate(notification),
'template_data': handler.getTemplateData(notification)
},
'action_button': 'false'
} %}
</div>
{#
{{ dump() }}
<div>
{% include handler.getTemplate(notification) with handler.getTemplateData(notification) %}
</div>
<div>
{# à remplacer par un commentEmbeddable #}
à remplacer par un commentEmbeddable
{{ notification.message|chill_markdown_to_html }}
</div>
#}
<div class="comments thread m-5">
{% if notification.comments|length > 0 %}
{% for comment in notification.comments %}
{% if editedCommentForm is null or editedCommentId != comment.id %}
@ -80,6 +93,7 @@
{{ form_end(appendCommentForm) }}
</div>
{% endif %}
</div>
<ul class="record_actions sticky-form-buttons">
<li class="cancel">