From patchwork Wed Feb 23 16:34:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guilherme Salgado X-Patchwork-Id: 84206 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 0784FB714A for ; Thu, 24 Feb 2011 03:34:48 +1100 (EST) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by ozlabs.org (Postfix) with ESMTP id 58386B7144 for ; Thu, 24 Feb 2011 03:34:46 +1100 (EST) Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PsHfn-0007WX-V8; Wed, 23 Feb 2011 16:34:43 +0000 Received: from [187.126.171.60] (helo=feioso) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PsHfn-0004FR-81; Wed, 23 Feb 2011 16:34:43 +0000 Received: from localhost6.localdomain6 (localhost.localdomain [127.0.0.1]) by feioso (Postfix) with ESMTP id 4FFF8422BE; Wed, 23 Feb 2011 13:34:40 -0300 (BRT) Subject: [PATCH] Remove unused templates and some code for processing them. To: patchwork@lists.ozlabs.org From: Guilherme Salgado Date: Wed, 23 Feb 2011 13:34:40 -0300 Message-ID: <20110223163211.404.63660.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 Cc: patches@linaro.org X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org These seem to be what was used in the past to archive/unarchive and delete patches. Signed-off-by: Guilherme Salgado --- I couldn't find anything using these removed bits, but given that there's not many tests for the views/templates it's possible I might have gone too far with the removals. Please let me know if this is the case. apps/patchwork/utils.py | 17 ----------------- apps/patchwork/views/patch.py | 17 ----------------- 2 files changed, 0 insertions(+), 34 deletions(-) diff --git a/apps/patchwork/utils.py b/apps/patchwork/utils.py index 3f2b433..53cf40b 100644 --- a/apps/patchwork/utils.py +++ b/apps/patchwork/utils.py @@ -173,23 +173,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: diff --git a/apps/patchwork/views/patch.py b/apps/patchwork/views/patch.py index 7114104..1583009 100644 --- a/apps/patchwork/views/patch.py +++ b/apps/patchwork/views/patch.py @@ -76,23 +76,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 index aae673a..0000000 --- a/templates/patchwork/patch-form.html +++ /dev/null @@ -1,91 +0,0 @@ - -
- -
-

Properties

- - - - - - - - - - - - -
Change state:{{ patchform.state }}
Delegate to: - {{ patchform.delegate }}
- -
- -
- -
-

Actions

- - - - - - - - - -{% if bundles %} - - - - -{% endif %} - - - - -
Ack: -
- {% csrf_token %} - - -
-
Create bundle: - {% if createbundleform.name.errors %} - {{createbundleform.errors}} - {% endif %} -
- {% csrf_token %} - - {{ createbundleform.name }} - -
-
Add to bundle: -
- {% csrf_token %} - - - - -
-
Archive: -
- {% csrf_token %} - - -
-
- - -
- -
-
-
- diff --git a/templates/patchwork/patch-list.html b/templates/patchwork/patch-list.html index fe4d606..43e0550 100644 --- a/templates/patchwork/patch-list.html +++ b/templates/patchwork/patch-list.html @@ -198,15 +198,6 @@

Bundling

-
Create bundle: diff --git a/templates/patchwork/patch.html b/templates/patchwork/patch.html index b9addc6..25c9962 100644 --- a/templates/patchwork/patch.html +++ b/templates/patchwork/patch.html @@ -127,19 +127,6 @@ function toggle_headers(link_id, headers_id)

Bundling

-
Create bundle: @@ -180,26 +167,6 @@ function toggle_headers(link_id, headers_id) {% endif %} -{% if actionsform %} -
-

Actions

- - - - - -
Ack: -
- {% csrf_token %} - - -
-
- -
- -{% endif %}
diff --git a/templates/patchwork/patchlist.html b/templates/patchwork/patchlist.html deleted file mode 100644 index d6709cd..0000000 --- a/templates/patchwork/patchlist.html +++ /dev/null @@ -1,37 +0,0 @@ - -{% load person %} - -{% if patches %} -
-{% csrf_token %} - - - {% if patchform %} - - - - - - {% for patch in patches %} - - {% if patchform %} - - {% endif %} - - - - - - {% endfor %} -
- {% endif %} - PatchDateSubmitterState
- - - {{ patch.name }}{{ patch.date|date:"Y-m-d" }}{{ patch.submitter|personify }}{{ patch.state }}
- -{% include "patchwork/patch-form.html" %} - -{% else %} -

No patches to display

-{% endif %}