]> git.ozlabs.org Git - patchwork/blob - patchwork/templates/patchwork/patch-list.html
login: Focus the username field on load
[patchwork] / patchwork / templates / patchwork / patch-list.html
1 {% load person %}
2 {% load listurl %}
3 {% load patch %}
4 {% load static %}
5
6 {% load cycle from future %}
7
8 {% include "patchwork/pagination.html" %}
9
10
11 <table class="patchlist">
12  <tr>
13   <td class="patchlistfilters">
14  {% include "patchwork/filters.html" %}
15   </td>
16  {% if order.editable %}
17   <td class="patchlistreorder">
18    <form method="post" id="reorderform">
19     {% csrf_token %}
20     <input type="hidden" name="form" value="reorderform"/>
21     <input type="hidden" name="order_start" value="0"/>
22     <span id="reorderhelp"></span>
23     <input id="reorder-cancel" type="button" value="Cancel"
24      onClick="order_cancel_click(this)"/>
25     <input id="reorder-change" type="button" value="Change order"
26      onClick="order_button_click(this)"/>
27     </form>
28   </td>
29  {% endif %}
30  </tr>
31 </table>
32
33 {% if page.paginator.long_page and user.is_authenticated %}
34 <div class="floaty">
35  <a title="jump to form" href="#patchforms"><span
36   style="font-size: 120%">&#9662;</span></a>
37 </div>
38 {% endif %}
39
40 <form method="post">
41 {% csrf_token %}
42 <input type="hidden" name="form" value="patchlistform"/>
43 <input type="hidden" name="project" value="{{project.id}}"/>
44 <table class="patchlist" id="patchlist">
45  <thead>
46   <tr>
47    {% if user.is_authenticated %}
48    <th>
49     <input type="checkbox" onChange="select_all(this)"/>
50    </th>
51    {% endif %}
52
53    <th>
54     {% ifequal order.name "name" %}
55      <a class="colactive"
56       href="{% listurl order=order.reversed_name %}"><img
57       {% if order.reversed %}
58       src="{% static "images/16-arrow-up.png" %}"
59       {% else %}
60       src="{% static "images/16-arrow-down.png" %}"
61       {%endif%}
62       width="16" height="16"
63      ></a> <a class="colactive"
64       href="{% listurl order=order.reversed_name %}">Patch</a>
65     {% else %}
66      {% if not order.editable %}
67      <a class="colinactive" href="{% listurl order="name" %}">Patch</a>
68      {% else %}
69      <span class="colinactive">Patch</span>
70      {% endif %}
71     {% endifequal %}
72    </th>
73
74    <th>
75     <span
76      title="{% for tag in project.tags %}{{tag.name}}{% if not forloop.last %} / {% endif %}{% endfor %}"
77      >{% for tag in project.tags %}{{tag.abbrev}}{% if not forloop.last %}/{% endif %}{% endfor %}</span>
78    </th>
79
80    <th>
81     {% ifequal order.name "date" %}
82      <a class="colactive"
83       href="{% listurl order=order.reversed_name %}"><img
84       {% if order.reversed %}
85       src="{% static "images/16-arrow-up.png" %}"
86       {% else %}
87       src="{% static "images/16-arrow-down.png" %}"
88       {%endif%}
89       width="16" height="16"
90      ></a> <a class="colactive"
91       href="{% listurl order=order.reversed_name %}">Date</a>
92     {% else %}
93      {% if not order.editable %}
94      <a class="colinactive" href="{% listurl order="date" %}">Date</a>
95      {% else %}
96      <span class="colinactive">Date</span>
97      {% endif %}
98     {% endifequal %}
99    </th>
100
101    <th>
102     {% ifequal order.name "submitter" %}
103      <a class="colactive"
104       href="{% listurl order=order.reversed_name %}"><img
105       {% if order.reversed %}
106       src="{% static "images/16-arrow-up.png" %}"
107       {% else %}
108       src="{% static "images/16-arrow-down.png" %}"
109       {%endif%}
110       width="16" height="16"
111      ></a> <a class="colactive"
112       href="{% listurl order=order.reversed_name %}">Submitter</a>
113     {% else %}
114      {% if not order.editable %}
115      <a class="colinactive" href="{% listurl order="submitter" %}">Submitter</a>
116      {% else %}
117      <span class="colinactive">Submitter</span>
118      {% endif %}
119     {% endifequal %}
120    </th>
121
122    <th>
123     {% ifequal order.name "delegate" %}
124      <a class="colactive"
125       href="{% listurl order=order.reversed_name %}"><img
126       {% if order.reversed %}
127       src="{% static "images/16-arrow-up.png" %}"
128       {% else %}
129       src="{% static "images/16-arrow-down.png" %}"
130       {%endif%}
131       width="16" height="16"
132      ></a> <a class="colactive"
133       href="{% listurl order=order.reversed_name %}">Delegate</a>
134     {% else %}
135      {% if not order.editable %}
136      <a class="colinactive" href="{% listurl order="delegate" %}">Delegate</a>
137      {% else %}
138      <span class="colinactive">Delegate</span>
139      {% endif %}
140     {% endifequal %}
141    </th>
142
143    <th>
144     {% ifequal order.name "state" %}
145      <a class="colactive"
146       href="{% listurl order=order.reversed_name %}"><img
147       {% if order.reversed %}
148       src="{% static "images/16-arrow-up.png" %}"
149       {% else %}
150       src="{% static "images/16-arrow-down.png" %}"
151       {%endif%}
152       width="16" height="16"
153      ></a> <a class="colactive"
154       href="{% listurl order=order.reversed_name %}">State</a>
155     {% else %}
156      {% if not order.editable %}
157      <a class="colinactive" href="{% listurl order="state" %}">State</a>
158      {% else %}
159      <span class="colinactive">State</span>
160      {% endif %}
161     {% endifequal %}
162    </th>
163
164   </tr>
165  </thead>
166
167 {% if page.paginator.count %}
168  <tbody>
169  {% for patch in page.object_list %}
170   <tr id="patch_row:{{patch.id}}" class="{% cycle 'odd' 'even' %}">
171     {% if user.is_authenticated %}
172     <td>
173     <input type="checkbox" name="patch_id:{{patch.id}}"/>
174     </td>
175     {% endif %}
176    <td><a href="{% url 'patchwork.views.patch.patch' patch_id=patch.id %}"
177      >{{ patch.name|default:"[no subject]" }}</a></td>
178    <td style="white-space: nowrap;">{{ patch|patch_tags }}</td>
179    <td>{{ patch.date|date:"Y-m-d" }}</td>
180    <td>{{ patch.submitter|personify:project }}</td>
181    <td>{{ patch.delegate.username }}</td>
182    <td>{{ patch.state }}</td>
183   </tr>
184  {% endfor %}
185  </tbody>
186 </table>
187
188 {% include "patchwork/pagination.html" %}
189
190 <div class="patchforms" id="patchforms" name="patchforms">
191
192 {% if patchform %}
193  <div class="patchform patchform-properties">
194   <h3>Properties</h3>
195     <table class="form">
196      <tr>
197       <th>Change state:</th>
198       <td>
199        {{ patchform.state }}
200        {{ patchform.state.errors }}
201       </td>
202      </tr>
203      <tr>
204       <th>Delegate to:</td>
205       <td>
206        {{ patchform.delegate }}
207        {{ patchform.delegate.errors }}
208       </td>
209      </tr>
210      <tr>
211       <th>Archive:</td>
212       <td>
213        {{ patchform.archived }}
214        {{ patchform.archived.errors }}
215       </td>
216      </tr>
217      <tr>
218       <td></td>
219       <td>
220        <input type="submit" name="action" value="{{patchform.action}}"/>
221       </td>
222      </tr>
223     </table>
224  </div>
225
226 {% endif %}
227
228 {% if user.is_authenticated %}
229  <div class="patchform patchform-bundle">
230   <h3>Bundling</h3>
231    <table class="form">
232     <tr>
233      <td>Create bundle:</td>
234      <td>
235       <input type="text" name="bundle_name"/>
236       <input name="action" value="Create" type="submit"/>
237       </td>
238     </tr>
239   {% if bundles %}
240     <tr>
241      <td>Add to bundle:</td>
242      <td>
243        <select name="bundle_id"/>
244         {% for bundle in bundles %}
245          <option value="{{bundle.id}}">{{bundle.name}}</option>
246         {% endfor %}
247         </select>
248        <input name="action" value="Add" type="submit"/>
249      </td>
250     </tr>
251   {% endif %}
252   {% if bundle %}
253    <tr>
254      <td>Remove from bundle:</td>
255      <td>
256        <input type="hidden" name="removed_bundle_id" value="{{bundle.id}}"/>
257        <input name="action" value="Remove" type="submit"/>
258      </td>
259     </tr>
260   {% endif %}
261   </table>
262  </div>
263 {% endif %}
264
265
266  <div style="clear: both;">
267  </div>
268 </div>
269
270 {% else %}
271  <tr>
272   <td colspan="6">No patches to display</td>
273  </tr>
274 {% endif %}
275
276  </table>
277 </form>
278