diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-02-24 16:09:45 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-02-24 18:44:29 +0100 |
commit | 5a0501689625176b712f3da5711fed325e9033f9 (patch) | |
tree | fe582b0d1c6cbcca28dd84d627f5fd84506b7fbc | |
parent | 96a2249bc01ba67ee4487703f1b8757d9e6e77e7 (diff) | |
download | mediagoblin-5a0501689625176b712f3da5711fed325e9033f9.tar.lz mediagoblin-5a0501689625176b712f3da5711fed325e9033f9.tar.xz mediagoblin-5a0501689625176b712f3da5711fed325e9033f9.zip |
Add owner to list of collections.
When listing the collections, that a media is contained in,
also show the owner of the collection.
Also simplify the whole looping a lot.
-rw-r--r-- | mediagoblin/templates/mediagoblin/utils/collections.html | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/mediagoblin/templates/mediagoblin/utils/collections.html b/mediagoblin/templates/mediagoblin/utils/collections.html index 2cff7a29..69738e26 100644 --- a/mediagoblin/templates/mediagoblin/utils/collections.html +++ b/mediagoblin/templates/mediagoblin/utils/collections.html @@ -21,17 +21,13 @@ <h3>{% trans %}Collected in{% endtrans %}</h3> <p> {%- for collection in media.collections %} - {% if loop.last %} - {# the 'and' should only appear if there is more than one collections #} - {% if media.collections|length > 1 %} - · - {% endif %} - <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a> - {% elif loop.revindex == 2 %} - <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a> - {% else %} - <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a> · - {% endif %} + {%- if not loop.first %} + · + {%- endif %} + <a href="{{ collection.url_for_self(request.urlgen) }}"> + {{- collection.title }} ( + {{- collection.get_creator.username -}} + )</a> {%- endfor %} </p> {%- endif %} |