]> git.ozlabs.org Git - patchwork/blob - templates/patchwork/patchlist.html
templates: Add CSRF (cross-site request forgery) values to form posts
[patchwork] / templates / patchwork / patchlist.html
1
2 {% load person %}
3
4 {% if patches %}
5 <form method="post">
6 {% csrf_token %}
7 <table class="patchlist">
8  <tr>
9   {% if patchform %}
10   <th/>
11   {% endif %}
12   <th><a class="colinactive" href="list?person=846&order=patch">Patch</a></th>
13   <th><a class="colinactive" href="list?person=846&order=date">Date</a></th>
14   <th><a class="colinactive" href="list?person=846&order=submitter">Submitter</a></th>
15   <th><a class="colinactive" href="list?person=846&order=state">State</a></th>
16  </tr>
17  {% for patch in patches %}
18   <tr>
19     {% if patchform %}
20     <td>
21     <input type="hidden" name="patch_ids" value="{{ patch.id }}"/>
22     <input type="checkbox" name="patch-{{patch.id}}">
23     </td>
24     {% endif %}
25    <td><a href="{% url patchwork.views.patch.patch patch_id=patch.id %}">{{ patch.name }}</a></td>
26    <td>{{ patch.date|date:"Y-m-d" }}</td>
27    <td>{{ patch.submitter|personify }}</td>
28    <td>{{ patch.state }}</td>
29   </tr>
30  {% endfor %}
31 </table>
32
33 {% include "patchwork/patch-form.html" %}
34
35 {% else %}
36  <p>No patches to display</p>
37 {% endif %}