twig extension for listing notification on a given entity

This commit is contained in:
2021-12-30 01:02:16 +01:00
parent 1576507f7e
commit 7bc4ad9779
7 changed files with 148 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
<div class="list_notification_for">
{% for notification in notifications %}
<div class="notification {% if notification.isReadBy(app.user) %}read{% else %}unread{% endif %}">
<div>{{ 'notification.you were notified by %sender%'|trans({'%sender%': notification.sender|chill_entity_render_string }) }}</div>
<div>
<ul class="record_actions_small">
<li>
<span class="notification_toggle_read_status" data-notification-id="{{ notification.id }}" data-notification-current-is-read="{{ notification.isReadBy(app.user) }}"></span>
</li>
<li>
<a href="{{ chill_path_add_return_path('chill_main_notification_show', {'id': notification.id}) }}" class="btn btn-show"></a>
</li>
</ul>
</div>
</div>
{% endfor %}
</div>