[extensions-web] "Upload a new version" shouldn't be there on a preview page, for realsies



commit f725566a5fa9fe464f2771ff47a686969e9e0a62
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Sep 26 17:40:10 2011 -0400

    "Upload a new version" shouldn't be there on a preview page, for realsies

 .../templates/extensions/detail_edit.html          |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/sweettooth/extensions/templates/extensions/detail_edit.html b/sweettooth/extensions/templates/extensions/detail_edit.html
index b48faf4..272533b 100644
--- a/sweettooth/extensions/templates/extensions/detail_edit.html
+++ b/sweettooth/extensions/templates/extensions/detail_edit.html
@@ -20,17 +20,14 @@
 
 {% block extra %}
   {% if is_preview %}
-    <button id="submit-ajax" data-url="{% url extensions-ajax-submit pk=version.pk %}">Submit the extension for review.</button>
-  <a href="{% url extensions-upload-file pk=version.extension.pk %}">Upload a new version</a>
+    <button id="submit-ajax" data-url="{% url extensions-ajax-submit pk=version.pk %}">
+      Submit the extension for review.
+    </button>
   {% endif %}
-{% endblock %}
 
-{% block extra-extension-info %}
-    <ul>
-      {% if user == extension.creator %}
-      <li><a href="{% url extensions-upload-file pk=extension.pk %}">Upload a new version</a></li>
-      {% endif %}
-    </ul>
+  {% if request.user == version.extension.creator and not is_preview %}
+    <a href="{% url extensions-upload-file pk=version.extension.pk %}">Upload a new version</a>
+  {% endif %}
 {% endblock %}
 
 {% block screenshot %}



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