mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
allow to display pinned comment in item of accompanying course list
This commit is contained in:
@@ -116,14 +116,40 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="item-row separator">
|
||||
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) %}
|
||||
{% if notif_counter.total > 0 %}
|
||||
<div class="item-col item-meta">
|
||||
{{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) }}
|
||||
|
||||
{% if show_pinned_comment|default(false) and period.pinnedComment is not empty%}
|
||||
<div class="item-row separator comment">
|
||||
<div style="width: 100%">
|
||||
<h4 class="item-key visually-hidden">{{ 'Pinned comment'|trans }}</h4>
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ period.pinnedComment.content|u.truncate(750, '…', false)|chill_markdown_to_html }}
|
||||
{% if period.pinnedComment.content|length > 750 %}
|
||||
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_comment_list', {'accompanying_period_id': period.id}) }}">{{ 'Read more'|trans }}</a>
|
||||
{% endif %}
|
||||
<div class="metadata">
|
||||
{{ 'Last updated by'| trans }}
|
||||
<span class="user">
|
||||
{{ period.pinnedComment.updatedBy|chill_entity_render_box }}
|
||||
</span>
|
||||
{{ 'on'|trans ~ ' ' }}
|
||||
<span class="date">
|
||||
{{ period.pinnedComment.updatedAt|format_datetime("medium", "short") }}
|
||||
</span>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if itemMeta is defined %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="item-row separator">
|
||||
{% if itemMeta is not defined %}
|
||||
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) %}
|
||||
{% if notif_counter.total > 0 %}
|
||||
<div class="item-col item-meta">
|
||||
{{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ itemMeta }}
|
||||
{% endif %}
|
||||
<div class="item-col">
|
||||
|
Reference in New Issue
Block a user