]> git.ozlabs.org Git - patchwork/commitdiff
Remove unused templates and some code for processing them
authorGuilherme Salgado <guilherme.salgado@linaro.org>
Wed, 23 Feb 2011 06:34:40 +0000 (06:34 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 8 Mar 2011 07:07:33 +0000 (15:07 +0800)
These seem to be what was used in the past to archive/unarchive and delete
patches.

Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/patchwork/utils.py
apps/patchwork/views/patch.py
templates/patchwork/patch-form.html [deleted file]
templates/patchwork/patch-list.html
templates/patchwork/patch.html
templates/patchwork/patchlist.html [deleted file]

index fa26aef7e674d8be9ee299e0556cdc93c4ca1e0a..b6d86a4ddbd517892078b6030c32018f9dc0306a 100644 (file)
@@ -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:
index 3dac149acd393d119ccf2b53c6f9632f77a7f231..66b314e4068fc680c49f3f089cb92813753f988d 100644 (file)
@@ -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
diff --git a/templates/patchwork/patch-form.html b/templates/patchwork/patch-form.html
deleted file mode 100644 (file)
index aae673a..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-
-<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>
-
index fe4d6060e4cd5a16670ace0e06df834db810cae1..43e05503429f09af61999dfd4706c7a7545bb5cf 100644 (file)
  <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>
index b9addc626d5c30036ad0802d91c1404b15eb2d9a..25c9962838dff6c34cfd313f43ba1c455fdd7c51 100644 (file)
@@ -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>
diff --git a/templates/patchwork/patchlist.html b/templates/patchwork/patchlist.html
deleted file mode 100644 (file)
index d6709cd..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-
-{% 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 %}