[extensions-web] Don't show the "We extracted" message for existing extensions



commit 8b1c3cd3bce5561461c9e878b584a69990f96a0e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Nov 8 12:03:07 2011 -0500

    Don't show the "We extracted" message for existing extensions

 .../templates/extensions/detail_edit.html          |    2 +-
 sweettooth/extensions/views.py                     |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/extensions/templates/extensions/detail_edit.html b/sweettooth/extensions/templates/extensions/detail_edit.html
index 9775729..23024a3 100644
--- a/sweettooth/extensions/templates/extensions/detail_edit.html
+++ b/sweettooth/extensions/templates/extensions/detail_edit.html
@@ -6,7 +6,7 @@
   <div class="step edit">
     <h2 class="steptitle">Step <span>2</span></h2>
     <p>
-      We extracted this metadata from the file you uploaded.
+      {% if is_new_extension %} We extracted this metadata from the file you uploaded. {% endif %}
       Edit anything in yellow by clicking on it.
     </p>
 
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index a6444a5..8acfc01 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -98,6 +98,7 @@ def extension_version_view(request, obj, **kwargs):
                    is_preview = is_preview,
                    is_visible = status in models.VISIBLE_STATUSES,
                    is_rejected = status in models.REJECTED_STATUSES,
+                   is_new_extension = (extension.versions.count() == 1),
                    status = status)
 
     if extension.latest_version is not None:



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