]> git.agnieray.net Git - galette.git/blob - galette/templates/default/pages/export.html.twig
Some slight accessibility related improvements
[galette.git] / galette / templates / default / pages / export.html.twig
1 {% extends 'page.html.twig' %}
2
3 {% block content %}
4 <div class="ui icon info visible message">
5 <i class="info circle blue icon" aria-hidden="true"></i>
6 <div class="content">
7 {{ _T("Each selected export will be stored into a separate file in the exports directory.") }}
8 </div>
9 </div>
10 <form class="form" action="{{ url_for("doExport") }}" method="post" enctype="multipart/form-data">
11
12 {% set written_exports = flash.getMessage('written_exports') %}
13
14 {% if written is iterable and written|length > 0 %}
15 <div class="ui icon success visible message with-transition">
16 <i class="download icon" aria-hidden="true"></i>
17 <div class="content">
18 <p>{{ _T('The following files have been written on disk:') }}</p>
19 <ul>
20 {% for ex in written %}
21 <li>{{ ex|raw }}</li>
22 {% endfor %}
23 </ul>
24 </div>
25 </div>
26 {% endif %}
27
28 {% if existing|length > 0 %}
29 <div class="ui basic fitted segment">
30 <div class="ui styled fluid accordion row">
31 <div class="active title">
32 <i class="jsonly displaynone icon dropdown" aria-hidden="true"></i>
33 {{ _T('Existing exports') }}
34 </div>
35 <div class="active content field">
36 <p>{{ _T('The following exports already seems to exist on the disk:') }}</p>
37 <table class="listing ui celled striped table">
38 <thead>
39 <tr>
40 <th class="id_row">#</th>
41 <th>{{ _T('Name') }}</th>
42 <th>{{ _T('Date') }}</th>
43 <th>{{ _T('Size') }}</th>
44 <th class="actions_row"></th>
45 </tr>
46 </thead>
47 <tbody>
48 {% for export in existing %}
49 <tr>
50 <td data-scope="id">
51 {{ loop.index }}
52 </td>
53 <td data-scope="row">
54 <a href="{{ url_for("getCsv", {"type": "export", "file": export.name}) }}">{{ export.name }}</a>
55 </td>
56 <td data-title="{{ _T('Date') }}">
57 {{ export.date }}
58 </td>
59 <td data-title="{{ _T('Size') }}">
60 {{ export.size }}
61 </td>
62 <td class="actions_row">
63 <a
64 href="{{ url_for("removeCsv", {"type": "export", "file": export.name}) }}"
65 class="delete "
66 >
67 <i class="ui trash red icon tooltip" aria-hidden="true"></i>
68 <span class="ui special popup">{{ _T('Remove \'%file\' from disk')|replace({'%file': export.name}) }}</span>
69 </a>
70 </td>
71 </tr>
72 {% endfor %}
73 </tbody>
74 </table>
75 </div>
76 </div>
77 </div>
78 {% endif %}
79 <div class="ui basic fitted segment">
80 <div class="ui styled fluid accordion row">
81 <div class="active title">
82 <i class="jsonly displaynone icon dropdown" aria-hidden="true"></i>
83 {{ _T('Parameted exports') }}
84 </div>
85 <div class="active content field">
86 {% if parameted|length > 0 %}
87 <p>{{ _T('Which parameted export(s) do you want to run?') }}</p>
88 <table class="listing ui celled striped table">
89 <thead>
90 <tr>
91 <th class="small_head"/>
92 <th>{{ _T('Name') }}</th>
93 <th>{{ _T('Description') }}</th>
94 </tr>
95 </thead>
96 <tbody>
97 {% for param in parameted %}
98 <tr>
99 <td data-scope="id">
100 <input type="checkbox" name="export_parameted[]" id="{{ param.id }}" value="{{ param.id }}"/>
101 </td>
102 <td data-scope="row">
103 <label for="{{ param.id }}">{{ param.name }}</label>
104 </td>
105 <td data-title="{{ _T('Description') }}">
106 <label for="{{ param.id }}">{{ param.description }}</label>
107 </td>
108 </tr>
109 {% endfor %}
110 </tbody>
111 </table>
112 {% else %}
113 <p>{{ _T('No parameted exports are available.') }}</p>
114 {% endif %}
115 </div>
116 </div>
117 </div>
118 <div class="ui basic fitted segment">
119 <div class="ui styled fluid accordion row">
120 <div class="active title">
121 <i class="jsonly displaynone icon dropdown" aria-hidden="true"></i>
122 {{ _T('Galette tables exports') }}
123 </div>
124 <div class="active content field">
125 <p>{{ _T('Additionnaly, which table(s) do you want to export?') }}</p>
126 <table class="listing same ui celled striped table">
127 <thead>
128 <tr>
129 <th class="small_head"/>
130 <th>{{ _T('Table name') }}</th>
131 </tr>
132 </thead>
133 <tbody>
134 {% for table in tables_list %}
135 <tr>
136 <td>
137 <input type="checkbox" name="export_tables[]" id="{{ table }}" value="{{ table }}"/>
138 </td>
139 <td class="left">
140 <label for="{{ table }}">{{ table }}</label>
141 </td>
142 </tr>
143 {% endfor %}
144 </tbody>
145 </table>
146 </div>
147 </div>
148 </div>
149 <div class="ui basic center aligned segment">
150 <button type="submit" name="valid" class="ui labeled icon primary button">
151 <i class="download icon" aria-hidden="true"></i>
152 {{ _T('Continue') }}
153 </button>
154 {% include "components/forms/csrf.html.twig" %}
155 </div>
156 </form>
157 {% endblock %}
158
159 {% block javascripts %}
160 <script type="text/javascript">
161 $(function() {
162 {% include "elements/js/removal.js.twig" with {
163 single_action: "true"
164 } %}
165 });
166 </script>
167 {% endblock %}