Add non active users to context menu.
[redakcja.git] / apps / catalogue / templates / catalogue / book_list / book_list.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="all" value="{{ request.GET.all }}" />
12 <input type='hidden' name="status" value="{{ request.GET.status }}" />
13 </form>
14
15
16 <table id="file-list"{% if viewed_user %} class="book-list-user"{% endif %}>
17     <thead><tr>
18         <th></th>
19         <th></th>
20         <th>
21             <input class='check-filter' type='checkbox' name='all' title='{% trans "Show hidden books" %}'
22                 {% if request.GET.all %}checked='checked'{% endif %} />
23             </th>
24         <th class='book-search-column'>
25             <form>
26             <input title='{% trans "Search in book titles" %}' name="title"
27                 class='text-filter' value="{{ request.GET.title }}" />
28             </form>
29         </th>
30         <th><select name="stage" class="filter">
31             <option value=''>- {% trans "stage" %} -</option>
32             <option {% if request.GET.stage == '-' %}selected="selected"
33                     {% endif %}value="-">- {% trans "none" %} -</option>
34             {% for stage in stages %}
35                 <option {% if request.GET.stage == stage.slug %}selected="selected"
36                     {% endif %}value="{{ stage.slug }}">{{ stage.name }}</option>
37             {% endfor %}
38         </select></th>
39
40         {% if not viewed_user %}
41             <th><select name="user" class="filter">
42                 <option value=''>- {% trans "editor" %} -</option>
43                 <option {% if request.GET.user == '-' %}selected="selected"
44                         {% endif %}value="-">- {% trans "none" %} -</option>
45                 {% for user in users %}
46                     <option {% if request.GET.user == user.username %}selected="selected"
47                         {% endif %}value="{{ user.username }}">{{ user.first_name }} {{ user.last_name }} ({{ user.count }})</option>
48                 {% endfor %}
49             </select></th>
50         {% endif %}
51
52         <th><select name="status" class="filter">
53             <option value=''>- {% trans "status" %} -</option>
54             {% for state, label in states %}
55                 <option {% if request.GET.status == state %}selected="selected"
56                         {% endif %}value='{{ state }}'>{{ label }}</option>
57             {% endfor %}
58         </select></th>
59
60     </tr></thead>
61
62     {% with cnt=books|length %}
63     {% autopaginate books 100 %}
64     <tbody>
65     {% for item in books %}
66         {% with item.book as book %}
67             {{ book.short_html|safe }}
68             {% if not book.single %}
69                 {% for chunk in item.chunks %}
70                     {{ chunk.short_html|safe }}
71                 {% endfor %}
72             {% endif %}
73         {% endwith %}
74     {% endfor %}
75     <tr><th class='paginator' colspan="5">
76         {% paginate %}
77         {% blocktrans count c=cnt %}{{c}} book{% plural %}{{c}} books{% endblocktrans %}</th></tr>
78     </tbody>
79     {% endwith %}
80 </table>
81 {% if not books %}
82     <p>{% trans "No books found." %}</p>
83 {% endif %}
84
85 <form id='chunk_mass_edit' action='{% url catalogue_chunk_mass_edit %}' class="hidden">
86 {% csrf_token %}
87 <input type="hidden" name="ids" />
88 <input type="hidden" name="stage" />
89 <input type="hidden" name="user" />
90 <input type="hidden" name="status" />
91 </form>
92
93 <select name="other-user" style="display:none;">
94   {% for user in other_users %}
95   <option {% if request.GET.user == user.username %}selected="selected"
96           {% endif %}value="{{ user.username }}">{{ user.first_name }} {{ user.last_name }} ({{ user.count }})</option>
97   {% endfor %}
98 </select>
99