notification list: move action buttons outside of the toggle

This commit is contained in:
Julien Fastré 2022-04-07 21:59:02 +02:00
parent 6e1cabc8fc
commit 009030b5fb

View File

@ -61,13 +61,24 @@
<div class="item-row"> <div class="item-row">
<div class="notification-content"> <div class="notification-content">
{% if c.full_content is defined and c.full_content == true %} {% if c.full_content is defined and c.full_content == true %}
{{ c.notification.message|chill_markdown_to_html }} {% if c.notification.message is not empty %}
{{ c.notification.message|chill_markdown_to_html }}
{% else %}
<p class="chill-no-data-statement">{{ 'Any comment'|trans }}</p>
{% endif %}
{% else %} {% else %}
{{ c.notification.message|u.truncate(250, '…', false)|chill_markdown_to_html }} {% if c.notification.message is not empty %}
<p class="read-more"><a href="{{ chill_path_add_return_path('chill_main_notification_show', {'id': c.notification.id}) }}">{{ 'Read more'|trans }}</a></p> {{ c.notification.message|u.truncate(250, '…', false)|chill_markdown_to_html }}
<p class="read-more"><a href="{{ chill_path_add_return_path('chill_main_notification_show', {'id': c.notification.id}) }}">{{ 'Read more'|trans }}</a></p>
{% else %}
<p class="chill-no-data-statement">{{ 'Any comment'|trans }}</p>
{% endif %}
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% endmacro %}
{% macro actions(c) %}
{% if c.action_button is not defined or c.action_button != false %} {% if c.action_button is not defined or c.action_button != false %}
<div class="item-row separator"> <div class="item-row separator">
<div class="item-col item-meta"> <div class="item-col item-meta">
@ -86,9 +97,9 @@
<li> <li>
{# Vue component #} {# Vue component #}
<span class="notification_toggle_read_status" <span class="notification_toggle_read_status"
data-notification-id="{{ c.notification.id }}" data-notification-id="{{ c.notification.id }}"
data-notification-current-is-read="{{ c.notification.isReadBy(app.user) }}" data-notification-current-is-read="{{ c.notification.isReadBy(app.user) }}"
data-container="notification-status" data-container="notification-status"
></span> ></span>
</li> </li>
{% if is_granted('CHILL_MAIN_NOTIFICATION_UPDATE', c.notification) %} {% if is_granted('CHILL_MAIN_NOTIFICATION_UPDATE', c.notification) %}
@ -134,12 +145,13 @@
data-bs-parent="#notification-fold"> data-bs-parent="#notification-fold">
{{ _self.content(_context) }} {{ _self.content(_context) }}
</div> </div>
{{ _self.actions(_context) }}
{% else %} {% else %}
{{ _self.title(_context) }} {{ _self.title(_context) }}
{{ _self.header(_context) }} {{ _self.header(_context) }}
{{ _self.content(_context) }} {{ _self.content(_context) }}
{{ _self.actions(_context) }}
{% endif %} {% endif %}
</div> </div>