]> git.agnieray.net Git - galette.git/blob - galette/templates/default/pages/documents_public_list.html.twig
a640705df528b616bd17d4c821215fc32e6c85f5
[galette.git] / galette / templates / default / pages / documents_public_list.html.twig
1 {#
2 /**
3 * Copyright © 2003-2024 The Galette Team
4 *
5 * This file is part of Galette (https://galette.eu).
6 *
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.
11 *
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.
16 *
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/>.
19 */
20 #}
21 {% extends 'public_page.html.twig' %}
22
23 {% macro getSlug(value) -%}
24 {{ value|lower|spaceless|slug|e('html_attr') }}
25 {%- endmacro %}
26
27 {% block content %}
28 {% if typed_documents|length == 0 %}
29 <div class="ui small message">
30 <div class="content">
31 <em>{{ _T("No document to show") }}</em>
32 </div>
33 </div>
34 {% else %}
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) }}">
40 {{ _T(type) }}
41 <p class="ui small disabled text">({{ _Tn("%count document", "%count documents", documents|length)|replace({"%count": documents|length}) }})</p>
42 </a>
43 {% endfor %}
44 </div>
45 </div>
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">
51 <div class="item">
52 <div class="ui tiny image">
53 <i class="large file middle aligned icon"></i>
54 </div>
55 <div class="content">
56 <a class="ui small header" href="{{ url_for('getDocumentFile', {'id': document.getID()}) }}">
57 {{ document.getDocumentFilename() }}
58 </a>
59 <div class="description">
60 {% if document.getComment %}{{ document.getComment()|raw }}{% endif %}
61 </div>
62 <div class="extra">
63 <div class="ui right floated meta">
64 <span class="date ui small text">
65 <i class="clock outline icon"></i>
66 {{ document.getCreationDate() }}
67 </span>
68 <div class="ui label">{{ document.getPermissionName() }}</div>
69 </div>
70 </div>
71 </div>
72 </div>
73 </div>
74 {% endfor %}
75 </div>
76 {% endfor %}
77 </div>
78 </div>
79 {% endif %}
80 {% endblock %}