summaryrefslogtreecommitdiffstats
path: root/templates/patchwork/patch-list.html
blob: a0a8cec98a7c579bbcb729302626f33fa6774352 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
{% load person %}
{% load listurl %}

{% include "patchwork/pagination.html" %}


<table class="patchlist">
 <tr>
  <td class="patchlistfilters">
 {% include "patchwork/filters.html" %}
  </td>
 </tr>
</table>

{% if page.paginator.long_page and user.is_authenticated %}
<div class="floaty">
 <a title="jump to form" href="#patchforms"><span
  style="font-size: 120%">&#9662;</span></a>
</div>
{% endif %}

<form method="post">
<input type="hidden" name="form" value="patchlistform"/>
<input type="hidden" name="project" value="{{project.id}}"/>
<table class="patchlist">
 <tr>
  {% if patchform or bundle %}
  <th/>
  {% endif %}

  <th>
   {% ifequal order.name "name" %}
    <a class="colactive"
     href="{% listurl order=order.reversed_name %}">Patch</a>
   {% else %}
    <a class="colinactive" href="{% listurl order="name" %}">Patch</a>
   {% endifequal %}
  </th>

  <th>
   {% ifequal order.name "date" %}
    <a class="colactive"
     href="{% listurl order=order.reversed_name %}">Date</a>
   {% else %}
    <a class="colinactive" href="{% listurl order="date" %}">Date</a>
   {% endifequal %}
  </th>

  <th>
   {% ifequal order.name "submitter" %}
    <a class="colactive"
     href="{% listurl order=order.reversed_name %}">Submiter</a>
   {% else %}
    <a class="colinactive" href="{% listurl order="submitter" %}">Submitter</a>
   {% endifequal %}
  </th>

  <th>
   {% ifequal order.name "state" %}
    <a class="colactive"
     href="{% listurl order=order.reversed_name %}">State</a>
   {% else %}
    <a class="colinactive" href="{% listurl order="state" %}">State</a>
   {% endifequal %}
  </th>

 </tr>

{% if page %}
 {% for patch in page.object_list %}
  <tr class="{% cycle 'odd' 'even' %}">
    {% if patchform or bundle %}
    <td>
    <input type="checkbox" name="patch_id:{{patch.id}}"/>
    </td>
    {% endif %}
   <td><a href="{% url patchwork.views.patch.patch patch_id=patch.id %}"
     >{{ patch.name }}</a></td>
   <td>{{ patch.date|date:"Y-m-d" }}</td>
   <td>{{ patch.submitter|personify }}</td>
   <td>{{ patch.state }}</td>
  </tr>
 {% endfor %}
</table>

{% include "patchwork/pagination.html" %}

<div class="patchforms" id="patchforms" name="patchforms">

{% if patchform %}
 <div class="patchform patchform-properties">
  <h3>Properties</h3>
    <table class="form">
     <tr>
      <th>Change state:</th>
      <td>
       {{ patchform.state }}
       {{ patchform.state.errors }}
      </td>
     </tr>
     <tr>
      <th>Delegate to:</td>
      <td>
       {{ patchform.delegate }}
       {{ patchform.delegate.errors }}
      </td>
     </tr>
     <tr>
      <th>Archive:</td>
      <td>
       {{ patchform.archived }}
       {{ patchform.archived.errors }}
      </td>
     </tr>
     <tr>
      <td></td>
      <td>
       <input type="submit" name="action" value="Update"/>
      </td>
     </tr>
    </table>
 </div>

{% endif %}

{% if user.is_authenticated %}
 <div class="patchform patchform-bundle">
  <h3>Bundling</h3>
   <table class="form">
   <!--
    <tr>
     <td>Ack:</td>
     <td>
       <input type="submit" name="action" value="Ack"/>
      </form>
     </td>
    </tr>
    -->
    <tr>
     <td>Create bundle:</td>
     <td>
      <input type="text" name="bundle_name"/>
      <input name="action" value="Create" type="submit"/>
      </td>
    </tr>
  {% if bundles %}
    <tr>
     <td>Add to bundle:</td>
     <td>
       <select name="bundle_id"/>
        {% for bundle in bundles %}
         <option value="{{bundle.id}}">{{bundle.name}}</option>
        {% endfor %}
        </select>
       <input name="action" value="Add" type="submit"/>
     </td>
    </tr>
  {% endif %}
  {% if bundle %}
   <tr>
     <td>Remove from bundle:</td>
     <td>
       <input type="hidden" name="removed_bundle_id" value="{{bundle.id}}"/>
       <input name="action" value="Remove" type="submit"/>
     </td>
    </tr>
  {% endif %}
  </table>
 </div>
{% endif %}


 <div style="clear: both;">
 </div>
</div>

{% else %}
 <tr>
  <td colspan="5">No patches to display</td>
 </tr>
{% endif %}

 </table>
</form>