From 009030b5fbf39f2bea92af3d95cf945705b32294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 7 Apr 2022 21:59:02 +0200 Subject: [PATCH] notification list: move action buttons outside of the toggle --- .../views/Notification/_list_item.html.twig | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig index 817f7e6a7..02a02b4d0 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig @@ -61,17 +61,28 @@
{% 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 %} +

{{ 'Any comment'|trans }}

+ {% endif %} {% else %} - {{ c.notification.message|u.truncate(250, '…', false)|chill_markdown_to_html }} -

{{ 'Read more'|trans }}

+ {% if c.notification.message is not empty %} + {{ c.notification.message|u.truncate(250, '…', false)|chill_markdown_to_html }} +

{{ 'Read more'|trans }}

+ {% else %} +

{{ 'Any comment'|trans }}

+ {% endif %} {% endif %}
+{% endmacro %} + +{% macro actions(c) %} {% if c.action_button is not defined or c.action_button != false %}
- + {% if c.notification.comments|length > 0 %}
@@ -79,16 +90,16 @@
{% endif %} - +
  • {# Vue component #}
  • {% if is_granted('CHILL_MAIN_NOTIFICATION_UPDATE', c.notification) %} @@ -122,24 +133,25 @@ {{ _self.header(_context) }} - +
- + {{ _self.content(_context) }} -
+ {{ _self.actions(_context) }} {% else %} {{ _self.title(_context) }} {{ _self.header(_context) }} {{ _self.content(_context) }} + {{ _self.actions(_context) }} {% endif %}