diff --git a/CHANGELOG.md b/CHANGELOG.md index b9a272e53..abaa3fdd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to * allow every person which has part for a workflow to see the workflow page * able to see the workflow if the evaluation document has been deleted * hardcode the list of supported mime types for edition with collabora +* list of accompanying course: allow to see the pinned comment in list_item ### 2021-04-06 diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig index 65e514b14..62d0682df 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig @@ -116,14 +116,40 @@ {% endif %} -
- {% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) %} - {% if notif_counter.total > 0 %} -
- {{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) }} + + {% if show_pinned_comment|default(false) and period.pinnedComment is not empty%} +
+
+

{{ 'Pinned comment'|trans }}

+
+ {{ period.pinnedComment.content|u.truncate(750, '…', false)|chill_markdown_to_html }} + {% if period.pinnedComment.content|length > 750 %} + {{ 'Read more'|trans }} + {% endif %} + +
- {% endif %} - {% if itemMeta is defined %} +
+ {% endif %} + +
+ {% if itemMeta is not defined %} + {% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) %} + {% if notif_counter.total > 0 %} +
+ {{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) }} +
+ {% endif %} + {% else %} {{ itemMeta }} {% endif %}