Merge master into img-playground. Image support with new management features. Missing...
[redakcja.git] / apps / catalogue / templates / catalogue / image_table.html
1 {% load i18n %}
2 {% load pagination_tags %}
3
4
5 <form name='filter' action=''>
6 <input type='hidden' name="title" value="{{ request.GET.title }}" />
7 <input type='hidden' name="stage" value="{{ request.GET.stage }}" />
8 {% if not viewed_user %}
9     <input type='hidden' name="user" value="{{ request.GET.user }}" />
10 {% endif %}
11 <input type='hidden' name="status" value="{{ request.GET.status }}" />
12 </form>
13
14 <table id="file-list"{% if viewed_user %} class="book-list-user"{% endif %}>
15     <thead><tr>
16         <th></th>
17         <th class='book-search-column'>
18             <form>
19             <input title='{% trans "Search in book titles" %}' name="title"
20                 class='text-filter' value="{{ request.GET.title }}" />
21             </form>
22         </th>
23         <th><select name="stage" class="filter">
24             <option value=''>- {% trans "stage" %} -</option>
25             <option {% if request.GET.stage == '-' %}selected="selected"
26                     {% endif %}value="-">- {% trans "none" %} -</option>
27             {% for stage in stages %}
28                 <option {% if request.GET.stage == stage.slug %}selected="selected"
29                     {% endif %}value="{{ stage.slug }}">{{ stage.name }}</option>
30             {% endfor %}
31         </select></th>
32
33         {% if not viewed_user %}
34             <th><select name="user" class="filter">
35                 <option value=''>- {% trans "editor" %} -</option>
36                 <option {% if request.GET.user == '-' %}selected="selected"
37                         {% endif %}value="-">- {% trans "none" %} -</option>
38                 {% for user in users %}
39                     <option {% if request.GET.user == user.username %}selected="selected"
40                         {% endif %}value="{{ user.username }}">{{ user.first_name }} {{ user.last_name }} ({{ user.count }})</option>
41                 {% endfor %}
42             </select></th>
43         {% endif %}
44
45         <th><select name="status" class="filter">
46             <option value=''>- {% trans "status" %} -</option>
47             {% for state, label in states %}
48                 <option {% if request.GET.status == state %}selected="selected"
49                         {% endif %}value='{{ state }}'>{{ label }}</option>
50             {% endfor %}
51         </select></th>
52
53     </tr></thead>
54
55     {% with cnt=objects|length %}
56     {% autopaginate objects 100 %}
57     <tbody>
58     {% for item in objects %}
59         {{ item.short_html|safe }}
60     {% endfor %}
61     <tr><th class='paginator' colspan="5">
62         {% paginate %}
63         {% blocktrans count c=cnt %}{{c}} image{% plural %}{{c}} images{% endblocktrans %}</th></tr>
64     </tbody>
65     {% endwith %}
66 </table>
67 {% if not objects %}
68     <p>{% trans "No images found." %}</p>
69 {% endif %}