[extensions-web] Junk EDITABLE_STATUSES



commit 5bb3664d5c9ea8693ad98b9c875f23cc9e0fc563
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Oct 26 14:16:01 2011 -0400

    Junk EDITABLE_STATUSES
    
    The "locked" metaphor has been gone for a little while now. It was just false
    security at this point.

 sweettooth/extensions/models.py                    |    1 -
 .../templates/extensions/detail_edit.html          |    2 --
 sweettooth/extensions/views.py                     |    2 --
 3 files changed, 0 insertions(+), 5 deletions(-)
---
diff --git a/sweettooth/extensions/models.py b/sweettooth/extensions/models.py
index 4b2608a..c687e55 100644
--- a/sweettooth/extensions/models.py
+++ b/sweettooth/extensions/models.py
@@ -29,7 +29,6 @@ STATUSES = {
 
 VISIBLE_STATUSES = (STATUS_ACTIVE,)
 REJECTED_STATUSES = (STATUS_REJECTED,)
-EDITABLE_STATUSES = (STATUS_NEW, STATUS_ACTIVE)
 REVIEWED_STATUSES = (STATUS_REJECTED, STATUS_INACTIVE, STATUS_ACTIVE)
 
 class ExtensionManager(models.Manager):
diff --git a/sweettooth/extensions/templates/extensions/detail_edit.html b/sweettooth/extensions/templates/extensions/detail_edit.html
index 764d086..b9e3bfb 100644
--- a/sweettooth/extensions/templates/extensions/detail_edit.html
+++ b/sweettooth/extensions/templates/extensions/detail_edit.html
@@ -72,11 +72,9 @@
 {% endblock %}
 
 {% block document-ready %}{{ block.super }}
-    {% if is_editable %}
     $("h3, p.description").csrfEditable("{% url extensions-ajax-inline pk=version.extension.pk %}");
     require(['uploader'], function() {
         $(".screenshot.upload").uploadify("{% url extensions-ajax-screenshot pk=version.extension.pk %}");
         $(".icon.upload").uploadify("{% url extensions-ajax-icon pk=version.extension.pk %}");
     });
-    {% endif %}
 {% endblock %}
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index 8e4c92d..ff45ebb 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -53,7 +53,6 @@ def extension_latest_version_view(request, obj, **kwargs):
     status = version.status
     context = dict(version = version,
                    extension = extension,
-                   is_editable = status in models.EDITABLE_STATUSES,
                    is_visible = status in models.VISIBLE_STATUSES,
                    status = status)
     return render(request, template_name, context)
@@ -96,7 +95,6 @@ def extension_version_view(request, obj, **kwargs):
     context = dict(version = version,
                    extension = extension,
                    is_preview = is_preview,
-                   is_editable = status in models.EDITABLE_STATUSES,
                    is_visible = status in models.VISIBLE_STATUSES,
                    is_rejected = status in models.REJECTED_STATUSES,
                    status = status)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]