put attachments into sidebar
authorJakob Kramer <jakob.kramer@gmx.de>
Sat, 7 Jul 2012 19:37:46 +0000 (21:37 +0200)
committerJoar Wandborg <git@wandborg.com>
Sat, 7 Jul 2012 19:44:04 +0000 (21:44 +0200)
also added {% trans %} tags

mediagoblin/templates/mediagoblin/user_pages/media.html

index 21990442a6cfadfe8b95584ee0d6eaadccf1fa15..15ac498868cdb2888b45e257c4f0e6fce9fc3d7b 100644 (file)
     {% autoescape False %}
       <p>{{ media.description_html }}</p>
     {% endautoescape %}
-    {% if media.attachment_files|count %}
-      <h3>Attachments</h3>
-      <ul>
-        {% for attachment in media.attachment_files %}
-          <li>
-            <a href="{{ request.app.public_store.file_url(attachment.filepath) }}">
-              {{ attachment.name }}
-            </a>
-          </li>
-        {% endfor %}
-      </ul>
-    {% endif %}
-    {% if app_config['allow_attachments']
-          and request.user
-          and (media.uploader == request.user._id
-               or request.user.is_admin) %}
-      <p>
-        <a href="{{ request.urlgen('mediagoblin.edit.attachments',
-                      user=media.get_uploader.username,
-                      media=media._id) }}">Add attachment</a>
-      </p>
-    {% endif %}
     {% if comments %}
           <a
             {% if not request.user %}
 
     {% include "mediagoblin/utils/exif.html" %}
     
+    {% if media.attachment_files|count %}
+      <h3>{% trans %}Attachments{% endtrans %}</h3>
+      <ul>
+        {% for attachment in media.attachment_files %}
+          <li>
+            <a href="{{ request.app.public_store.file_url(attachment.filepath) }}">
+              {{ attachment.name }}
+            </a>
+          </li>
+        {% endfor %}
+      </ul>
+    {% endif %}
+    {% if app_config['allow_attachments']
+          and request.user
+          and (media.uploader == request.user._id
+               or request.user.is_admin) %}
+      {% if not media.attachment_files|count %}
+        <h3>{% trans %}Attachments{% endtrans %}</h3>
+      {% endif %}
+      <p>
+        <a href="{{ request.urlgen('mediagoblin.edit.attachments',
+                      user=media.get_uploader.username,
+                      media=media._id) }}">{% trans %}Add attachment{% endtrans %}</a>
+      </p>
+    {% endif %}
+
     {% block mediagoblin_sidebar %}
     {% endblock %}
   </div>