{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %} {% set
activeRouteKey = '' %} {% block title %}
{{ "Documents" }}
{% endblock %} {% block js %}
{{ parent() }}
{{ encore_entry_script_tags("mod_docgen_picktemplate") }}
{{ encore_entry_script_tags("mod_entity_workflow_pick") }}
{{ encore_entry_script_tags("mod_document_action_buttons_group") }}
{% endblock %} {% block css %}
{{ parent() }}
{{ encore_entry_script_tags("mod_docgen_picktemplate") }}
{{ encore_entry_link_tags("mod_entity_workflow_pick") }}
{{ encore_entry_link_tags("mod_document_action_buttons_group") }}
{% endblock %} {% block content %}
<div class="document-list">
    <h1>{{ "Documents" }}</h1>

    {{ filter | chill_render_filter_order_helper }}

    {% if documents|length > 5 %}
    <div
        data-docgen-template-picker="data-docgen-template-picker"
        data-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod"
        data-entity-id="{{ accompanyingCourse.id }}"
    ></div>
    {% endif %} {% if documents|length == 0 %}
    <p class="chill-no-data-statement">{{ "No documents" | trans }}</p>
    {% else %}
    <div class="flex-table chill-task-list">
        {% for document in documents %}
        {{ document | chill_generic_doc_render }}
        {% endfor %}
    </div>
    {% endif %}

    {{ chill_pagination(pagination) }}

    <div
        data-docgen-template-picker="data-docgen-template-picker"
        data-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod"
        data-entity-id="{{ accompanyingCourse.id }}"
    ></div>

    {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE',
    accompanyingCourse) %}
    <ul class="record_actions sticky-form-buttons">
        <li class="create">
            <a
                href="{{
                    path('accompanying_course_document_new', {
                        course: accompanyingCourse.id
                    })
                }}"
                class="btn btn-create"
            >
                {{ "Create" | trans }}
            </a>
        </li>
    </ul>
    {% endif %}
</div>
{% endblock %}
