eyecandy for programmers
authorJakob Kramer <jakob.kramer@gmx.de>
Sun, 20 Nov 2011 20:30:46 +0000 (21:30 +0100)
committerJakob Kramer <jakob.kramer@gmx.de>
Sun, 20 Nov 2011 20:30:46 +0000 (21:30 +0100)
mediagoblin/templates/mediagoblin/utils/tags.html

index 20c50f6e0d78d08a5c2bbb38ef0386c8eac3c1b1..49bc3cee7397225dd1b93374bdc960d17ccb4406 100644 (file)
   <p>{% trans %}Tagged with{% endtrans %}
     {% for tag in media.tags %}
       {% if loop.last %}
+        {# the 'and' should only appear if there is more than one tag #}
         {% if media.tags|length > 1 %}
-        {% trans %}and{% endtrans %}
+          {% trans %}and{% endtrans %}
         {% endif %}
-      <a href="{{ request.urlgen(
-                        'mediagoblin.listings.tags_listing',
-                        tag=tag['slug']) }}">{{ tag['name'] }}</a>.
-      {% elif loop.revindex==2 %}
-      <a href="{{ request.urlgen(
-                        'mediagoblin.listings.tags_listing',
-                        tag=tag['slug']) }}">{{ tag['name'] }}</a> 
-      {% else %}<a href="{{ request.urlgen(
-                        'mediagoblin.listings.tags_listing',
-                        tag=tag['slug']) }}">{{ tag['name'] }}</a>, 
+
+        <a href="{{ request.urlgen(
+                          'mediagoblin.listings.tags_listing',
+                          tag=tag['slug']) }}">{{ tag['name'] }}</a>.
+        {% elif loop.revindex==2 %}
+        <a href="{{ request.urlgen(
+                          'mediagoblin.listings.tags_listing',
+                          tag=tag['slug']) }}">{{ tag['name'] }}</a> 
+        {% else %}<a href="{{ request.urlgen(
+                          'mediagoblin.listings.tags_listing',
+                          tag=tag['slug']) }}">{{ tag['name'] }}</a>, 
       {% endif %}
     {% endfor %}
   </p>