eyecandy for programmers

This commit is contained in:
Jakob Kramer 2011-11-20 21:30:46 +01:00
parent 9404a9fed2
commit a00f1c1e1c

View File

@ -20,19 +20,21 @@
<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>