[extensions-web] extensions: s/live/approved/



commit 43f706d3c5d94dbd7a7bd7e40a11dc7528a6b5e7
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Apr 26 02:15:44 2012 -0400

    extensions: s/live/approved/
    
    What a terrible name "live" was, meaning something that passed the
    review process

 sweettooth/extensions/models.py                    |    8 ++++----
 .../templates/extensions/detail_edit.html          |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/sweettooth/extensions/models.py b/sweettooth/extensions/models.py
index 0892b0d..679b2de 100644
--- a/sweettooth/extensions/models.py
+++ b/sweettooth/extensions/models.py
@@ -27,8 +27,8 @@ STATUSES = {
     STATUS_ACTIVE: u"Active",
 }
 
-LIVE_STATUSES = (STATUS_ACTIVE, STATUS_INACTIVE)
-REVIEWED_STATUSES = (STATUS_REJECTED, STATUS_INACTIVE, STATUS_ACTIVE)
+APPROVED_STATUSES = (STATUS_INACTIVE, STATUS_ACTIVE)
+REVIEWED_STATUSES = (STATUS_INACTIVE, STATUS_ACTIVE, STATUS_REJECTED)
 
 def validate_uuid(uuid):
     if re.match(r'[-a-zA-Z0-9  _]+$', uuid) is None:
@@ -395,8 +395,8 @@ class ExtensionVersion(models.Model):
     def get_status_class(self):
         return STATUSES[self.status].lower()
 
-    def is_live(self):
-        return self.status in LIVE_STATUSES
+    def is_approved(self):
+        return self.status in APPROVED_STATUSES
 
     def is_active(self):
         return self.status == STATUS_ACTIVE
diff --git a/sweettooth/extensions/templates/extensions/detail_edit.html b/sweettooth/extensions/templates/extensions/detail_edit.html
index 14708b2..d61532f 100644
--- a/sweettooth/extensions/templates/extensions/detail_edit.html
+++ b/sweettooth/extensions/templates/extensions/detail_edit.html
@@ -39,7 +39,7 @@
           <code class="extension_shell_versions">{{ shell_version.version_string }}</code>
           {% endfor %}
         </td>
-        {% if version.is_live %}
+        {% if version.is_approved %}
         <td class="extension_status_toggle{% if version.is_active %} visible{% endif %}">
           <a href="{% url extensions-ajax-set-status-inactive %}">Inactivate</a>
         </td>



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