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