Commit f7a3c5df authored by Guilherme Salgado's avatar Guilherme Salgado Committed by Jeremy Kerr
Browse files

Remove unused templates and some code for processing them



These seem to be what was used in the past to archive/unarchive and delete
patches.
Signed-off-by: default avatarGuilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent 5d56a584
......@@ -174,23 +174,6 @@ def set_patches(user, project, action, data, patches, context):
form.save(patch)
str = 'updated'
elif action == 'ack':
pass
elif action == 'archive':
patch.archived = True
patch.save()
str = 'archived'
elif action == 'unarchive':
patch.archived = False
patch.save()
str = 'un-archived'
elif action == 'delete':
patch.delete()
str = 'un-archived'
if len(patches) > 0:
if len(patches) == 1:
......
......@@ -85,23 +85,6 @@ def patch(request, patch_id):
form.save()
context.add_message('Patch updated')
elif action == 'archive':
patch.archived = True
patch.save()
context.add_message('Patch archived')
elif action == 'unarchive':
patch.archived = False
patch.save()
context.add_message('Patch un-archived')
elif action == 'ack':
pass
elif action == 'delete':
patch.delete()
context['patch'] = patch
context['patchform'] = form
context['createbundleform'] = createbundleform
......
<div class="patchform"
style="border: thin solid black; padding-left: 0.8em; margin-top: 2em;">
<div class="patchform-properties"
style="float: left; margin-right: 4em;">
<h3>Properties</h3>
<table class="form">
<tr>
<th>Change state:</th>
<td>{{ patchform.state }}</td>
</tr>
<tr>
<th>Delegate to:</td>
<td>{{ patchform.delegate }}</td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" value="Update">
</td>
</tr>
</table>
</form>
</div>
<div class="patchform-actions" style="padding-left: 4em;">
<h3>Actions</h3>
<table class="form">
<tr>
<td>Ack:</td>
<td>
<form action="{% url patchwork.views.patch patch=patch.id %}"
method="post">
{% csrf_token %}
<input type="hidden" name="action" value="act"/>
<input type="submit" value="Ack"/>
</form>
</td>
</tr>
<tr>
<td>Create bundle:</td>
<td>
{% if createbundleform.name.errors %}
<span class="errors">{{createbundleform.errors}}</span>
{% endif %}
<form method="post">
{% csrf_token %}
<input type="hidden" name="action" value="createbundle"/>
{{ createbundleform.name }}
<input value="Create" type="submit"/>
</form>
</td>
</tr>
{% if bundles %}
<tr>
<td>Add to bundle:</td>
<td>
<form action="{% url patchwork.views.bundle.setbundle %}" method="post">
{% csrf_token %}
<input type="hidden" name="action" value="add"/>
<input type="hidden" name="patch_id" value="{{ patch.id }}"/>
<select name="name"/>
{% for bundle in bundles %}
<option value="{{bundle.id}}">{{bundle.name}}</option>
{% endfor %}
</select>
<input value="Add" type="submit"/>
</form>
</td>
</tr>
{% endif %}
<tr>
<td>Archive:</td>
<td>
<form method="post">
{% csrf_token %}
<input type="hidden" name="action" value="archive"/>
<input type="submit" value="Archive"/>
</form>
</td>
</tr>
</table>
</form>
</div>
<div style="clear: both;">
</div>
</div>
......@@ -198,15 +198,6 @@
<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>
......
......@@ -127,19 +127,6 @@ function toggle_headers(link_id, headers_id)
<div class="patchform patchform-bundle">
<h3>Bundling</h3>
<table class="form">
<!--
<tr>
<td>Ack:</td>
<td>
<form action="{% url patchwork.views.patch.patch patch_id=patch.id %}"
method="post">
{% csrf_token %}
<input type="hidden" name="action" value="act"/>
<input type="submit" value="Ack"/>
</form>
</td>
</tr>
-->
<tr>
<td>Create bundle:</td>
<td>
......@@ -180,26 +167,6 @@ function toggle_headers(link_id, headers_id)
</div>
{% endif %}
{% if actionsform %}
<div class="patchform patchform-actions">
<h3>Actions</h3>
<table class="form">
<tr>
<td>Ack:</td>
<td>
<form action="{% url patchwork.views.patch.patch patch_id=patch.id %}"
method="post">
{% csrf_token %}
<input type="hidden" name="action" value="act"/>
<input type="submit" value="Ack"/>
</form>
</td>
</tr>
</table>
</form>
</div>
{% endif %}
<div style="clear: both;">
</div>
</div>
......
{% load person %}
{% if patches %}
<form method="post">
{% csrf_token %}
<table class="patchlist">
<tr>
{% if patchform %}
<th/>
{% endif %}
<th><a class="colinactive" href="list?person=846&order=patch">Patch</a></th>
<th><a class="colinactive" href="list?person=846&order=date">Date</a></th>
<th><a class="colinactive" href="list?person=846&order=submitter">Submitter</a></th>
<th><a class="colinactive" href="list?person=846&order=state">State</a></th>
</tr>
{% for patch in patches %}
<tr>
{% if patchform %}
<td>
<input type="hidden" name="patch_ids" value="{{ patch.id }}"/>
<input type="checkbox" name="patch-{{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/patch-form.html" %}
{% else %}
<p>No patches to display</p>
{% endif %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment