]> git.ozlabs.org Git - patchwork/blob - templates/patchwork/patch-list.html
Add delegate column
[patchwork] / templates / patchwork / patch-list.html
1 {% load person %}
2 {% load listurl %}
3
4 {% include "patchwork/pagination.html" %}
5
6
7 <table class="patchlist">
8  <tr>
9   <td class="patchlistfilters">
10  {% include "patchwork/filters.html" %}
11   </td>
12  </tr>
13 </table>
14
15 {% if page.paginator.long_page and user.is_authenticated %}
16 <div class="floaty">
17  <a title="jump to form" href="#patchforms"><span
18   style="font-size: 120%">&#9662;</span></a>
19 </div>
20 {% endif %}
21
22 <form method="post">
23 <input type="hidden" name="form" value="patchlistform"/>
24 <input type="hidden" name="project" value="{{project.id}}"/>
25 <table class="patchlist">
26  <tr>
27   {% if patchform or bundle %}
28   <th/>
29   {% endif %}
30
31   <th>
32    {% ifequal order.name "name" %}
33     <a class="colactive"
34      href="{% listurl order=order.reversed_name %}"><img
35      src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png"
36      width="16" height="16"
37     ></a> <a class="colactive"
38      href="{% listurl order=order.reversed_name %}">Patch</a>
39    {% else %}
40     <a class="colinactive" href="{% listurl order="name" %}">Patch</a>
41    {% endifequal %}
42   </th>
43
44   <th>
45    {% ifequal order.name "date" %}
46     <a class="colactive"
47      href="{% listurl order=order.reversed_name %}"><img
48      src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png"
49      width="16" height="16"
50     ></a> <a class="colactive"
51      href="{% listurl order=order.reversed_name %}">Date</a>
52    {% else %}
53     <a class="colinactive" href="{% listurl order="date" %}">Date</a>
54    {% endifequal %}
55   </th>
56
57   <th>
58    {% ifequal order.name "submitter" %}
59     <a class="colactive"
60      href="{% listurl order=order.reversed_name %}"><img
61      src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png"
62      width="16" height="16"
63     ></a> <a class="colactive"
64      href="{% listurl order=order.reversed_name %}">Submitter</a>
65    {% else %}
66     <a class="colinactive" href="{% listurl order="submitter" %}">Submitter</a>
67    {% endifequal %}
68   </th>
69
70   <th>
71    {% ifequal order.name "delegate" %}
72     <a class="colactive"
73      href="{% listurl order=order.reversed_name %}"><img
74      src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png"
75      width="16" height="16"
76     ></a> <a class="colactive"
77      href="{% listurl order=order.reversed_name %}">Delegate</a>
78    {% else %}
79     <a class="colinactive" href="{% listurl order="delegate" %}">Delegate</a>
80    {% endifequal %}
81   </th>
82
83   <th>
84    {% ifequal order.name "state" %}
85     <a class="colactive"
86      href="{% listurl order=order.reversed_name %}"><img
87      src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png"
88      width="16" height="16"
89     ></a> <a class="colactive"
90      href="{% listurl order=order.reversed_name %}">State</a>
91    {% else %}
92     <a class="colinactive" href="{% listurl order="state" %}">State</a>
93    {% endifequal %}
94   </th>
95
96  </tr>
97
98 {% if page %}
99  {% for patch in page.object_list %}
100   <tr class="{% cycle 'odd' 'even' %}">
101     {% if patchform or bundle %}
102     <td>
103     <input type="checkbox" name="patch_id:{{patch.id}}"/>
104     </td>
105     {% endif %}
106    <td><a href="{% url patchwork.views.patch.patch patch_id=patch.id %}"
107      >{{ patch.name }}</a></td>
108    <td>{{ patch.date|date:"Y-m-d" }}</td>
109    <td>{{ patch.submitter|personify }}</td>
110    <td>{{ patch.delegate.username }}</td>
111    <td>{{ patch.state }}</td>
112   </tr>
113  {% endfor %}
114 </table>
115
116 {% include "patchwork/pagination.html" %}
117
118 <div class="patchforms" id="patchforms" name="patchforms">
119
120 {% if patchform %}
121  <div class="patchform patchform-properties">
122   <h3>Properties</h3>
123     <table class="form">
124      <tr>
125       <th>Change state:</th>
126       <td>
127        {{ patchform.state }}
128        {{ patchform.state.errors }}
129       </td>
130      </tr>
131      <tr>
132       <th>Delegate to:</td>
133       <td>
134        {{ patchform.delegate }}
135        {{ patchform.delegate.errors }}
136       </td>
137      </tr>
138      <tr>
139       <th>Archive:</td>
140       <td>
141        {{ patchform.archived }}
142        {{ patchform.archived.errors }}
143       </td>
144      </tr>
145      <tr>
146       <td></td>
147       <td>
148        <input type="submit" name="action" value="Update"/>
149       </td>
150      </tr>
151     </table>
152  </div>
153
154 {% endif %}
155
156 {% if user.is_authenticated %}
157  <div class="patchform patchform-bundle">
158   <h3>Bundling</h3>
159    <table class="form">
160    <!--
161     <tr>
162      <td>Ack:</td>
163      <td>
164        <input type="submit" name="action" value="Ack"/>
165       </form>
166      </td>
167     </tr>
168     -->
169     <tr>
170      <td>Create bundle:</td>
171      <td>
172       <input type="text" name="bundle_name"/>
173       <input name="action" value="Create" type="submit"/>
174       </td>
175     </tr>
176   {% if bundles %}
177     <tr>
178      <td>Add to bundle:</td>
179      <td>
180        <select name="bundle_id"/>
181         {% for bundle in bundles %}
182          <option value="{{bundle.id}}">{{bundle.name}}</option>
183         {% endfor %}
184         </select>
185        <input name="action" value="Add" type="submit"/>
186      </td>
187     </tr>
188   {% endif %}
189   {% if bundle %}
190    <tr>
191      <td>Remove from bundle:</td>
192      <td>
193        <input type="hidden" name="removed_bundle_id" value="{{bundle.id}}"/>
194        <input name="action" value="Remove" type="submit"/>
195      </td>
196     </tr>
197   {% endif %}
198   </table>
199  </div>
200 {% endif %}
201
202
203  <div style="clear: both;">
204  </div>
205 </div>
206
207 {% else %}
208  <tr>
209   <td colspan="5">No patches to display</td>
210  </tr>
211 {% endif %}
212
213  </table>
214 </form>
215