Add a mention on next calendars on search results

This commit is contained in:
2022-07-01 18:01:42 +02:00
parent 3dcec5d44a
commit 8bbd3b01d9
7 changed files with 79 additions and 6 deletions

View File

@@ -149,6 +149,24 @@
{% endif %}
{% endif %}
{% set calendars = [] -%}
{% for c in acp.nextCalendarsForPerson(person, 10) -%}
{% if is_granted('CHILL_CALENDAR_CALENDAR_SEE', c) -%}
{% set calendars = calendars|merge([c]) -%}
{% endif -%}
{% endfor -%}
{% if calendars|length > 0 %}
<div class="wl-row">
<div class="wl-col title">
<h3>{{ 'chill_calendar.Next calendars'|trans }}</h3>
</div>
<div class="wl-col list">
{% for c in calendars %}<span>{{ c.startDate|format_datetime('long', 'short') }}</span>{% if not loop.last %}, {% endif %}{% endfor %}
</div>
</div>
{% endif %}
{% if acp.step == 'CLOSED' and acp.closingMotive is not null %}
<div class="wl-row">
<div class="wl-col title">