From 7943c22ae7d6e2958acf9f29dbe4f6ccf1425657 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 26 Jan 2022 12:54:53 +0100 Subject: [PATCH] comments truncated and link added to comment page --- .../Resources/views/AccompanyingCourse/index.html.twig | 5 ++++- src/Bundle/ChillPersonBundle/translations/messages.fr.yml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig index dac937001..ce95b8401 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig @@ -77,7 +77,10 @@

{{ 'Pinned comment'|trans }}

- {{ accompanyingCourse.pinnedComment.content|chill_markdown_to_html }} + {{ accompanyingCourse.pinnedComment.content|u.truncate(250, '…', false)|chill_markdown_to_html }} + {% if accompanyingCourse.pinnedComment.content|length > 250 %} + {{ 'Read more'|trans }} + {% endif %}