setting NotificationReadToggle options for several cases. improve options

This commit is contained in:
2022-01-06 13:25:18 +01:00
parent b9e5734039
commit 140f53b81f
6 changed files with 39 additions and 23 deletions

View File

@@ -10,20 +10,23 @@
{% if notification.sender == app.user %}
<h6>
<abbr title="{{ 'Le ' ~ notification.date|format_date('long') }}">
<abbr title="{{ 'Le ' ~ notification.date|format_date('long') }}" class="ms-1">
{{ notification.date|format_datetime('short','short') }}
</abbr>
<span class="notification_toggle_read_status"
data-notification-id="{{ notification.id }}"
data-notification-current-is-read="{{ notification.isReadBy(app.user) }}"
data-show-url="{{ chill_path_add_return_path('chill_main_notification_show', {'id': notification.id}) }}"
data-button-class="btn-outline-primary"
data-button-no-text="true"
data-notification-id="{{ notification.id }}"
data-notification-current-is-read="{{ notification.isReadBy(app.user) }}"
data-show-button-url="{{ chill_path_add_return_path('chill_main_notification_show', {'id': notification.id}) }}"
data-button-class="btn-outline-primary"
data-button-text="false"
></span>
</h6>
{% if notification.addressees|length > 0 %}
<abbr title="{{ 'notification.sentto'|trans }}">{{ 'notification.to'|trans }}:</abbr>
<abbr title="{{ 'notification.sent_to'|trans }}">{{ 'notification.to'|trans }}:</abbr>
{% endif %}
{% for a in notification.addressees %}
<span class="badge-user">
{{ a|chill_entity_render_string }}
@@ -37,7 +40,6 @@
<div>{{ 'notification.you were notified by system'|trans }}</div>
{% endif %}
</div>
{% endfor %}
</div>

View File

@@ -98,7 +98,10 @@
<div class="item-row separator">
<ul class="record_actions">
<li>
<span class="notification_toggle_read_status" data-notification-id="{{ notification.id }}" data-notification-current-is-read="{{ notification.isReadBy(app.user) }}"></span>
<span class="notification_toggle_read_status"
data-notification-id="{{ notification.id }}"
data-notification-current-is-read="{{ notification.isReadBy(app.user) }}"
></span>
</li>
{% if is_granted('CHILL_MAIN_NOTIFICATION_UPDATE', notification) %}
<li>

View File

@@ -88,7 +88,10 @@
</a>
</li>
<li>
<span class="notification_toggle_read_status" data-notification-id="{{ notification.id }}" data-notification-current-is-read="1"></span>
<span class="notification_toggle_read_status"
data-notification-id="{{ notification.id }}"
data-notification-current-is-read="1"
></span>
</li>
</ul>
</div>