From 96a2249bc01ba67ee4487703f1b8757d9e6e77e7 Mon Sep 17 00:00:00 2001 From: Elrond Date: Sun, 24 Feb 2013 16:08:55 +0100 Subject: [PATCH] Use media.id for collecting media too. Also remove some useless whitespace while at it. --- .../mediagoblin/user_pages/media_collect.html | 2 +- .../templates/mediagoblin/utils/collections.html | 12 ++++++------ mediagoblin/user_pages/routing.py | 2 +- mediagoblin/user_pages/views.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mediagoblin/templates/mediagoblin/user_pages/media_collect.html b/mediagoblin/templates/mediagoblin/user_pages/media_collect.html index 0fa0a9f4..b4c9671c 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media_collect.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media_collect.html @@ -33,7 +33,7 @@ {% block mediagoblin_content %}

diff --git a/mediagoblin/templates/mediagoblin/utils/collections.html b/mediagoblin/templates/mediagoblin/utils/collections.html index db23625b..2cff7a29 100644 --- a/mediagoblin/templates/mediagoblin/utils/collections.html +++ b/mediagoblin/templates/mediagoblin/utils/collections.html @@ -20,7 +20,7 @@ {% if media.collections %}

{% trans %}Collected in{% endtrans %}

- {% for collection in media.collections %} + {%- 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 %} @@ -32,17 +32,17 @@ {% else %} {{ collection['title'] }} · {% endif %} - {% endfor %} + {%- endfor %}

- {% endif %} - {% if request.user %} + {%- endif %} + {%- if request.user %}

{% trans %}Add to a collection{% endtrans %}

- {% endif %} + {%- endif %} {% endblock %} diff --git a/mediagoblin/user_pages/routing.py b/mediagoblin/user_pages/routing.py index 7de3ab60..9cb665b5 100644 --- a/mediagoblin/user_pages/routing.py +++ b/mediagoblin/user_pages/routing.py @@ -50,7 +50,7 @@ add_route('mediagoblin.user_pages.atom_feed', 'mediagoblin.user_pages.views:atom_feed') add_route('mediagoblin.user_pages.media_collect', - '/u//m//collect/', + '/u//m//collect/', 'mediagoblin.user_pages.views:media_collect') add_route('mediagoblin.user_pages.collection_list', diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py index 601eef17..bbc3259a 100644 --- a/mediagoblin/user_pages/views.py +++ b/mediagoblin/user_pages/views.py @@ -180,7 +180,7 @@ def media_post_comment(request, media): return redirect(request, location=media.url_for_self(request.urlgen)) -@get_user_media_entry +@get_media_entry_by_id @require_active_login def media_collect(request, media): """Add media to collection submission""" -- 2.25.1