From 7d4ca8d149befb16eff0cc89baf871fa5d640549 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 6 Jan 2022 19:02:25 +0100 Subject: [PATCH] remove dropped tests, separate list item in external include --- .../views/Notification/_list_item.html.twig | 86 +++++++++ .../views/Notification/list.html.twig | 163 +----------------- .../showInNotification.html.twig | 2 +- 3 files changed, 88 insertions(+), 163 deletions(-) create mode 100644 src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig diff --git a/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig new file mode 100644 index 000000000..993d53a1b --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig @@ -0,0 +1,86 @@ +
+ +
+ +
+
    + {% if step == 'inbox' %} +
  • + + + {{ 'notification.from'|trans }} : + + + {% if not notification.isSystem %} + + {{ notification.sender|chill_entity_render_string }} + + {% else %} + {{ 'notification.is_system'|trans }} + {% endif %} +
  • + {% endif %} + {% if notification.addressees|length > 0 %} +
  • + + + {{ 'notification.to'|trans }} : + + + {% for a in notification.addressees %} + + {{ a|chill_entity_render_string }} + + {% endfor %} +
  • + {% endif %} +
+
+ +
+ {{ notification.date|format_datetime('long', 'short') }} +
+ +
+
+
+ {% include data.template with data.template_data %} +
+
+
+
+
+ {{ notification.message|u.truncate(250, '…', false)|chill_markdown_to_html }} +
+
+
+
+
    +
  • + {# Vue component #} + +
  • + {% if is_granted('CHILL_MAIN_NOTIFICATION_UPDATE', notification) %} +
  • + +
  • + {% endif %} + {% if is_granted('CHILL_MAIN_NOTIFICATION_SEE', notification) %} +
  • + +
  • + {% endif %} +
+
+
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Notification/list.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Notification/list.html.twig index 0b0949db9..cd0cc5b67 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Notification/list.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Notification/list.html.twig @@ -14,7 +14,6 @@ {% block content %}
-

{{ block('title') }}

diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig index 19b1f4559..f0b31ecec 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/showInNotification.html.twig @@ -2,7 +2,7 @@ {% if period is not null %} {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %} - Show and Go to Accompanying Course + Resume Accompanying Course (renderbox + links) {% else %} You are getting a notification for a period you are not allowed to see. This is the minimal details: {{ period.id }}