Compare commits

...

3 Commits

Author SHA1 Message Date
25eeca26b7 Merge branch 'master' into '462-display-calendar-items-for-person'
# Conflicts:
#   src/Bundle/ChillCalendarBundle/Resources/public/chill/scss/calendar-list.scss
2025-12-05 12:36:06 +00:00
0e2cc6cc3a Take next calendars twig code out of person renderbox and add it directly to list_with_period.html.twig 2025-11-24 13:15:32 +01:00
ce74233282 Improve the display of upcoming calendar items within the person render box 2025-11-20 16:10:40 +01:00
2 changed files with 41 additions and 1 deletions

View File

@@ -212,4 +212,3 @@
</div>
</div>
{%- endif -%}

View File

@@ -301,6 +301,47 @@
'customButtons': { 'after': _self.button_person_after(person), 'before': _self.button_person_before((person)) }
}) }}
{% set calendars = [] %}
{% for c in person.getNextCalendarsForPerson(10) %}
{% if is_granted('CHILL_CALENDAR_CALENDAR_SEE', c) %}
{% set calendars = calendars|merge([c]) %}
{% endif %}
{% endfor %}
{% if calendars|length > 0 %}
<div class="wrap-list periods-list">
<div class="wl-row">
<div class="wl-col title">
<h3>{{ 'chill_calendar.Next calendars'|trans }}</h3>
</div>
<div class="wl-col list">
<div class="calendar-list">
<ul class="calendar-list">
{% for c in calendars %}
<li>
{% if is_granted('CHILL_CALENDAR_CALENDAR_EDIT', c) %}
<a href="{{ chill_path_add_return_path('chill_calendar_calendar_edit', { id: c.id }) }}">
<span class="badge bg-secondary">
{{ c.startDate|format_datetime('long', 'short') }}
</span>
</a>
{% else %}
<span class="badge bg-secondary">
{{ c.startDate|format_datetime('long', 'short') }}
</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% if is_granted('CHILL_CALENDAR_CALENDAR_SEE', person) %}
<a href="{{ chill_path_add_return_path('chill_calendar_calendar_list_by_person', {'id': person.id}) }}" class="calendar-list__global"><i class="fa fa-list"></i></a>
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{#- 'acps' is for AcCompanyingPeriodS #}
{%- set acps = [] %}
{%- set acpsClosed = [] %}