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 'elements/list.html.twig' %}
25 'name': "documentsList",
31 'label': _Tn("%count document", "%count documents", nb)|replace({"%count": nb})
36 {% block infoline_actions %}
37 {% if not is_public and (login.isAdmin() or login.isStaff()) %}
39 class="ui tiny labeled icon button"
40 href="{{ url_for("addDocument") }}"
42 <i class="ui user check green icon" aria-hidden="true"></i>
43 {{ _T("Add a document") }}
51 {'label': _T('Type')},
52 {'label': _T('Visibility')},
53 {'label': _T("Filename")},
54 {'label': _T("Creation date")}
61 {% for document in documents %}
62 <tr class="" id="row_{{ document.id }}">
64 {% if preferences.pref_show_id %}
70 <td data-col-label="{{ _T("Type") }}">{{ document.getType() }}</td>
71 <td data-col-label="{{ _T("Visibility") }}">{{ document.getPermissionName() }}</td>
72 <td data-col-label="{{ _T("Filename") }}">
73 <a href="{{ url_for('getDocumentFile', {'id': document.getID()}) }}">
74 {{ document.getDocumentFilename() }}
77 <td data-col-label="{{ _T("Creation date") }}">{{ document.getCreationDate() }}</td>
78 {% if mode != 'ajax' %}
79 <td class="actions_row center">
80 {% if (login.isAdmin() or login.isStaff()) %}
82 href="{{ url_for("editDocument", {"id": document.getID()}) }}"
85 <i class="ui edit icon tooltip" aria-hidden="true"></i>
86 <span class="ui special popup">{{ _T("Edit document") }}</span>
89 href="{{ url_for("removeDocument", {"id": document.getID()}) }}"
92 <i class="ui trash red icon tooltip" aria-hidden="true"></i>
93 <span class="ui special popup">{{ _T("Delete document") }}</span>
100 <tr><td colspan="{% if login.isAdmin() or login.isStaff() %}6{% else %}5{% endif %}" class="emptylist">{{ _T("No document") }}</td></tr>