Reorganize templates to allow re-use of _list.html.twig within listByUser.html.twig template

This commit is contained in:
2025-09-30 15:30:14 +02:00
parent 1675c56f3d
commit 68a0ef7115
5 changed files with 254 additions and 403 deletions

View File

@@ -6,22 +6,35 @@
{% block content %}
<h1>{{ 'Invitation list' |trans }}</h1>
<h1>{{ 'invite.list.title'|trans }}</h1>
{% if invitations|length == 0 %}
<p class="chill-no-data-statement">
{{ "invite.list.none"|trans }}
</p>
{% else %}
{{ include ('@ChillCalendar/Invitations/_list_item.html.twig') }}
<div class="flex-table list-records">
{% for invitation in invitations %}
{% set calendar = invitation.getCalendar %}
{{ include('@ChillCalendar/Calendar/_list.html.twig', {context: 'user'}) }}
{% endfor %}
</div>
{% if invitations|length < paginator.getTotalItems %}
{{ chill_pagination(paginator) }}
{% endif %}
{% endif %}
{% endblock %}
{% block js %}
{{ parent() }}
{{ encore_entry_script_tags('mod_answer') }}
{{ encore_entry_script_tags('mod_document_action_buttons_group') }}
{% endblock %}
{% block css %}
{{ parent() }}
{{ encore_entry_link_tags('mod_answer') }}
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
{% endblock %}