Rename catalogue to documents.
[redakcja.git] / src / documents / templates / documents / image_table.html
1 {% load i18n %}
2 {% load pagination_tags %}
3 {% load username from common_tags %}
4
5 <div class="card">
6         <div class="card-body">
7
8
9 <form name='filter' action='{{ request.path }}'>
10 <input type='hidden' name="title" value="{{ request.GET.title }}" />
11 <input type='hidden' name="stage" value="{{ request.GET.stage }}" />
12 {% if not viewed_user %}
13     <input type='hidden' name="user" value="{{ request.GET.user }}" />
14 {% endif %}
15 <input type='hidden' name="status" value="{{ request.GET.status }}" />
16 <input type='hidden' name="project" value="{{ request.GET.project }}" />
17 </form>
18
19 <table id="file-list" class="table {% if viewed_user %}book-list-user{% endif %}">
20     <thead><tr>
21         <th></th>
22         <th></th>
23         <th class='book-search-column'>
24             <form>
25             <input title='{% trans "Search in book titles" %}' name="title"
26                 class='form-control text-filter' value="{{ request.GET.title }}" />
27             </form>
28         </th>
29         <th><select name="stage" class="form-control filter">
30             <option value=''>- {% trans "stage" %} -</option>
31             <option {% if request.GET.stage == '-' %}selected="selected"
32                     {% endif %}value="-">- {% trans "none" %} -</option>
33             {% for stage in stages %}
34                 <option {% if request.GET.stage == stage.slug %}selected="selected"
35                     {% endif %}value="{{ stage.slug }}">{{ stage.name }}</option>
36             {% endfor %}
37         </select></th>
38
39         {% if not viewed_user %}
40             <th><select name="user" class="form-control filter">
41                 <option value=''>- {% trans "editor" %} -</option>
42                 <option {% if request.GET.user == '-' %}selected="selected"
43                         {% endif %}value="-">- {% trans "none" %} -</option>
44                 {% for user in users %}
45                     <option {% if request.GET.user == user.username %}selected="selected"
46                         {% endif %}value="{{ user.username }}">{{ user|username }} ({{ user.count }})</option>
47                 {% endfor %}
48             </select></th>
49         {% endif %}
50
51         <th><select name="status" class="form-control filter">
52             <option value=''>- {% trans "status" %} -</option>
53             {% for state, label in states %}
54                 <option {% if request.GET.status == state %}selected="selected"
55                         {% endif %}value='{{ state }}'>{{ label }}</option>
56             {% endfor %}
57         </select></th>
58
59         <th><select name="project" class="form-control filter">
60             <option value=''>- {% trans "project" %} -</option>
61                 <option {% if request.GET.project == '-' %}selected="selected"
62                         {% endif %}value="-">- {% trans "none" %} -</option>
63             {% for project in projects %}
64                 <option {% if request.GET.project == project.pk|slugify %}selected="selected"
65                         {% endif %}value='{{ project.pk }}'>{{ project.name }}</option>
66             {% endfor %}
67         </select></th>
68
69     </tr></thead>
70
71     {% autopaginate objects 100 as objects_page %}
72     <tbody>
73     {% for image in objects_page %}
74         {% include 'documents/image_short.html' %}
75     {% endfor %}
76     </tbody>
77 </table>
78     {% paginate %}
79     {% blocktrans count c=objects|length %}{{c}} image{% plural %}{{c}} images{% endblocktrans %}</th></tr>
80 {% if not objects %}
81     <p>{% trans "No images found." %}</p>
82 {% endif %}
83
84 <form id='chunk_mass_edit' action='{% url "documents_image_mass_edit" %}' style="display:none;">
85 {% csrf_token %}
86 <input type="hidden" name="ids" />
87 <label for="mass_edit_stage">{% trans "Set stage" %}</label><input type="hidden" name="stage" id="mass_edit_stage"/>
88 <label for="mass_edit_user">{% trans "Set user" %}</label><input type="hidden" name="user" id="mass_edit_stage" />
89 <input type="hidden" name="status" />
90 <label for="mass_edit_project">{% trans "Project" %}</label><input type="hidden" name="project" id="mass_edit_project" />
91 <label for="mass_edit_more_users">{% trans "More users" %}</label>
92 </form>
93
94 <select name="other-user" style="display:none;">
95   {% for user in other_users %}
96   <option {% if request.GET.user == user.username %}selected="selected"
97           {% endif %}value="{{ user.username }}">{{ user|username }} ({{ user.count }})</option>
98   {% endfor %}
99 </select>
100
101         </div>
102 </div>