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