]> git.ozlabs.org Git - patchwork/blob - templates/patchwork/patch-list.html
57491e20ccc7fdd15019425b204ff4e6beb5e57c
[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 "state" %}
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 %}">State</a>
78    {% else %}
79     <a class="colinactive" href="{% listurl order="state" %}">State</a>
80    {% endifequal %}
81   </th>
82
83  </tr>
84
85 {% if page %}
86  {% for patch in page.object_list %}
87   <tr class="{% cycle 'odd' 'even' %}">
88     {% if patchform or bundle %}
89     <td>
90     <input type="checkbox" name="patch_id:{{patch.id}}"/>
91     </td>
92     {% endif %}
93    <td><a href="{% url patchwork.views.patch.patch patch_id=patch.id %}"
94      >{{ patch.name }}</a></td>
95    <td>{{ patch.date|date:"Y-m-d" }}</td>
96    <td>{{ patch.submitter|personify }}</td>
97    <td>{{ patch.state }}</td>
98   </tr>
99  {% endfor %}
100 </table>
101
102 {% include "patchwork/pagination.html" %}
103
104 <div class="patchforms" id="patchforms" name="patchforms">
105
106 {% if patchform %}
107  <div class="patchform patchform-properties">
108   <h3>Properties</h3>
109     <table class="form">
110      <tr>
111       <th>Change state:</th>
112       <td>
113        {{ patchform.state }}
114        {{ patchform.state.errors }}
115       </td>
116      </tr>
117      <tr>
118       <th>Delegate to:</td>
119       <td>
120        {{ patchform.delegate }}
121        {{ patchform.delegate.errors }}
122       </td>
123      </tr>
124      <tr>
125       <th>Archive:</td>
126       <td>
127        {{ patchform.archived }}
128        {{ patchform.archived.errors }}
129       </td>
130      </tr>
131      <tr>
132       <td></td>
133       <td>
134        <input type="submit" name="action" value="Update"/>
135       </td>
136      </tr>
137     </table>
138  </div>
139
140 {% endif %}
141
142 {% if user.is_authenticated %}
143  <div class="patchform patchform-bundle">
144   <h3>Bundling</h3>
145    <table class="form">
146    <!--
147     <tr>
148      <td>Ack:</td>
149      <td>
150        <input type="submit" name="action" value="Ack"/>
151       </form>
152      </td>
153     </tr>
154     -->
155     <tr>
156      <td>Create bundle:</td>
157      <td>
158       <input type="text" name="bundle_name"/>
159       <input name="action" value="Create" type="submit"/>
160       </td>
161     </tr>
162   {% if bundles %}
163     <tr>
164      <td>Add to bundle:</td>
165      <td>
166        <select name="bundle_id"/>
167         {% for bundle in bundles %}
168          <option value="{{bundle.id}}">{{bundle.name}}</option>
169         {% endfor %}
170         </select>
171        <input name="action" value="Add" type="submit"/>
172      </td>
173     </tr>
174   {% endif %}
175   {% if bundle %}
176    <tr>
177      <td>Remove from bundle:</td>
178      <td>
179        <input type="hidden" name="removed_bundle_id" value="{{bundle.id}}"/>
180        <input name="action" value="Remove" type="submit"/>
181      </td>
182     </tr>
183   {% endif %}
184   </table>
185  </div>
186 {% endif %}
187
188
189  <div style="clear: both;">
190  </div>
191 </div>
192
193 {% else %}
194  <tr>
195   <td colspan="5">No patches to display</td>
196  </tr>
197 {% endif %}
198
199  </table>
200 </form>
201