]> git.ozlabs.org Git - patchwork/blob - templates/patchwork/patch.html
templates: close table cell in project maintainer list
[patchwork] / templates / patchwork / patch.html
1 {% extends "base.html" %}
2
3 {% load syntax %}
4 {% load person %}
5 {% load patch %}
6
7 {% block title %}{{patch.name}}{% endblock %}
8 {% block heading %}{{patch.name}}{%endblock%}
9
10 {% block body %}
11 <script language="JavaScript" type="text/javascript">
12 function toggle_headers(link_id, headers_id)
13 {
14     var link = document.getElementById(link_id)
15     var headers = document.getElementById(headers_id)
16
17     var hidden = headers.style['display'] == 'none';
18
19     if (hidden) {
20         link.innerHTML = 'hide';
21         headers.style['display'] = 'block';
22     } else {
23         link.innerHTML = 'show';
24         headers.style['display'] = 'none';
25     }
26
27 }
28 </script>
29
30 <table class="patchmeta">
31  <tr>
32   <th>Submitter</th>
33   <td>{{ patch.submitter|personify }}</td></tr>
34  </tr>
35  <tr>
36   <th>Date</th>
37   <td>{{ patch.date }}</td>
38  </tr>
39  <tr>
40   <th>Message ID</th>
41   <td>{{ patch.msgid }}</td>
42  </tr>
43  <tr>
44   <th>Download</th>
45   <td>
46    <a href="{% url patchwork.views.patch.mbox patch_id=patch.id %}"
47    >mbox</a> |
48    <a href="{% url patchwork.views.patch.content patch_id=patch.id %}"
49    >patch</a>
50    </td>
51  </tr>
52  <tr>
53   <th>Permalink</th>
54   <td><a href="{{ patch.get_absolute_url }}">{{ patch.get_absolute_url }}</a>
55  </tr>
56   <tr>
57    <th>State</td>
58    <td>{{ patch.state.name }}{% if patch.archived %}, archived{% endif %}</td>
59   </tr>
60 {% if patch.commit_ref %}
61   <tr>
62    <th>Commit</td>
63    <td>{{ patch.commit_ref }}</td>
64   </tr>
65 {% endif %}
66 {% if patch.delegate %}
67   <tr>
68    <th>Delegated to:</td>
69    <td>{{ patch.delegate.get_profile.name }}</td>
70   </tr>
71 {% endif %}
72  <tr>
73   <th>Headers</th>
74   <td><a id="togglepatchheaders"
75    href="javascript:toggle_headers('togglepatchheaders', 'patchheaders')"
76    >show</a>
77    <div id="patchheaders" class="patchheaders" style="display:none;">
78     <pre>{{patch.headers}}</pre>
79    </div>
80   </td>
81  </tr>
82 </table>
83
84 <div class="patchforms">
85
86 {% if patchform %}
87  <div class="patchform patchform-properties">
88   <h3>Patch Properties</h3>
89    <form method="post">
90     <table class="form">
91      <tr>
92       <th>Change state:</th>
93       <td>
94        {{ patchform.state }}
95        {{ patchform.state.errors }}
96       </td>
97      </tr>
98      <tr>
99       <th>Delegate to:</td>
100       <td>
101        {{ patchform.delegate }}
102        {{ patchform.delegate.errors }}
103       </td>
104      </tr>
105      <tr>
106       <th>Archived:</td>
107       <td>
108        {{ patchform.archived }}
109        {{ patchform.archived.errors }}
110       </td>
111      </tr>
112      <tr>
113       <td></td>
114       <td>
115        <input type="submit" value="Update">
116       </td>
117      </tr>
118     </table>
119   </form>
120  </div>
121 {% endif %}
122
123 {% if createbundleform %}
124  <div class="patchform patchform-bundle">
125   <h3>Bundling</h3>
126    <table class="form">
127    <!--
128     <tr>
129      <td>Ack:</td>
130      <td>
131       <form action="{% url patchwork.views.patch.patch patch_id=patch.id %}"
132        method="post">
133        <input type="hidden" name="action" value="act"/>
134        <input type="submit" value="Ack"/>
135       </form>
136      </td>
137     </tr>
138     -->
139     <tr>
140      <td>Create bundle:</td>
141      <td>
142        {% if createbundleform.non_field_errors %}
143        <dd class="errors">{{createbundleform.non_field_errors}}</dd>
144        {% endif %}
145       <form method="post">
146        <input type="hidden" name="action" value="createbundle"/>
147        {% if createbundleform.name.errors %}
148        <dd class="errors">{{createbundleform.name.errors}}</dd>
149        {% endif %}
150         {{ createbundleform.name }}
151        <input value="Create" type="submit"/>
152       </form>
153       </td>
154     </tr>
155 {% if bundles %}
156     <tr>
157      <td>Add to bundle:</td>
158      <td>
159       <form method="post">
160        <input type="hidden" name="action" value="addtobundle"/>
161        <select name="bundle_id"/>
162         {% for bundle in bundles %}
163          <option value="{{bundle.id}}">{{bundle.name}}</option>
164         {% endfor %}
165         </select>
166        <input value="Add" type="submit"/>
167       </form>
168      </td>
169     </tr>
170 {% endif %}
171    </table>
172   </form>
173
174  </div>
175 {% endif %}
176
177 {% if actionsform %}
178  <div class="patchform patchform-actions">
179   <h3>Actions</h3>
180    <table class="form">
181     <tr>
182      <td>Ack:</td>
183      <td>
184       <form action="{% url patchwork.views.patch.patch patch_id=patch.id %}"
185        method="post">
186        <input type="hidden" name="action" value="act"/>
187        <input type="submit" value="Ack"/>
188       </form>
189      </td>
190     </tr>
191    </table>
192   </form>
193  </div>
194
195 {% endif %}
196  <div style="clear: both;">
197  </div>
198 </div>
199
200
201
202
203 <h2>Comments</h2>
204 {% for comment in patch.comments %}
205 <div class="comment">
206 <div class="meta">{{ comment.submitter|personify }} - {{comment.date}}</div>
207 <pre class="content">
208 {{ comment|commentsyntax }}
209 </pre>
210 </div>
211 {% endfor %}
212
213 <h2>Patch</h2>
214 <div class="patch">
215 <pre class="content">
216 {{ patch|patchsyntax }}
217 </pre>
218 </div>
219
220 {% endblock %}