3 * Copyright © 2003-2024 The Galette Team
5 * This file is part of Galette (https://galette.eu).
7 * Galette is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * Galette is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Galette. If not, see <http://www.gnu.org/licenses/>.
21 {% extends 'public_page.html.twig' %}
23 {% macro getSlug(value) -%}
24 {{ value|lower|spaceless|slug|e('html_attr') }}
28 {% if typed_documents|length == 0 %}
29 <div class="ui small message">
31 <em>{{ _T("No document to show") }}</em>
35 <div class="ui stackable grid">
36 <div class="four wide left attached column">
37 <div class="ui stackable vertical fluid tabular menu tabbed">
38 {% for type, documents in typed_documents %}
39 <a class="{% if loop.index == 1 %}active {% endif %}item" data-tab="{{ _self.getSlug(type) }}">
41 <p class="ui small disabled text">({{ _Tn("%count document", "%count documents", documents|length)|replace({"%count": documents|length}) }})</p>
46 <div class="twelve wide stretched right attached column">
47 {% for type, documents in typed_documents %}
48 <div class="ui seamless right attached tab segment{% if loop.index == 1 %} active{% endif %}" data-tab="{{ _self.getSlug(type) }}">
49 {% for document in documents %}
50 <div class="ui relaxed divided list">
52 <div class="ui tiny image">
53 <i class="large file middle aligned icon"></i>
56 <a class="ui small header" href="{{ url_for('getDocumentFile', {'id': document.getID()}) }}">
57 {{ document.getDocumentFilename() }}
59 <div class="description">
60 {% if document.getComment %}{{ document.getComment()|raw }}{% endif %}
63 <div class="ui right floated meta">
64 <span class="date ui small text">
65 <i class="clock outline icon"></i>
66 {{ document.getCreationDate() }}
68 <div class="ui label">{{ document.getPermissionName() }}</div>