]> git.agnieray.net Git - galette.git/blob - galette/templates/default/pages/saved_searches_list.html.twig
Drop few duplicated source strings
[galette.git] / galette / templates / default / pages / saved_searches_list.html.twig
1 {% extends 'elements/list.html.twig' %}
2
3 {% block infoline %}
4 {% set infoline = {
5 'label': _Tn("%count search", "%count searches", nb)|replace({"%count": nb}),
6 } %}
7 {{ parent() }}
8 {% endblock %}
9
10 {% block header %}
11 {% set columns = [
12 {'label': '#'},
13 {'label': _T("Creation date")},
14 {'label': _T("Name")},
15 {'label': _T("Parameters")}
16 ] %}
17 {{ parent() }}
18 {% endblock %}
19
20 {% block body %}
21 {% for search in searches %}
22 <tr class="{% if loop.index % 2 == 0 %}even{% else %}odd{% endif %}">
23 <td data-scope="row">
24 {% if preferences.pref_show_id %}
25 {{ search.id }}
26 {% else %}
27 {{ loop.index1 }}
28 {% endif %}
29 </td>
30 <td class="left" data-title="{{ _T("Creation date") }}">{{ search.creation_date }}</td>
31 <td class="left" data-title="{{ _T("Name") }}">{{ search.name|default("-") }}</td>
32 <td class="left" data-title="{{ _T("Search parameters") }}">
33 <details class="ui basic styled accordion">
34 <summary class="title">
35 <i class="info circle primary icon" aria-hidden="true"></i> {{ _T("Show parameters") }}
36 </summary>
37 <div class="content">
38 {% for key, parameter in search.sparameters %}
39 <strong>{{ key }}:</strong> {{ parameter }}{% if not loop.last %}<br />{% endif %}
40 {% endfor %}
41 </div>
42 </details>
43 </td>
44 <td class="center actions_row">
45 <a
46 href="{{ url_for("loadSearch", {"id": search.id}) }}"
47 >
48 <i class="ui search icon tooltip" aria-hidden="true"></i>
49 <span class="ui special popup">{{ _T("Load saved search") }}</span>
50 </a>
51
52 <a
53 href="{{ url_for("removeSearch", {"id": search.id}) }}"
54 class="delete"
55 >
56 <i class="ui trash red icon tooltip" aria-hidden="true"></i>
57 <span class="ui special popup">{{ _T("Remove saved search") }}</span>
58 </a>
59 </td>
60 </tr>
61 {% else %}
62 <tr><td colspan="5" class="emptylist">{{ _T("no search") }}</td></tr>
63 {% endfor %}
64 {% endblock %}
65
66 {% block javascripts %}
67 <script type="text/javascript">
68 $(function() {
69 {% include "elements/js/removal.js.twig" with {
70 single_action: "true"
71 } %}
72 });
73 </script>
74 {% endblock %}