Fixed collection sidebar for media_home to user collection.url_for_self instead of...
authorAaron Williamson <aaron@copiesofcopies.org>
Sun, 2 Sep 2012 23:19:41 +0000 (19:19 -0400)
committerJoar Wandborg <git@wandborg.com>
Tue, 18 Sep 2012 16:10:36 +0000 (18:10 +0200)
mediagoblin/db/mixin.py
mediagoblin/templates/mediagoblin/utils/collections.html

index 929c1c7f77ee898cdd9336afcd496fb1b04c51dd..e389fef59440d6212bd8c280334eb05d576cc099 100644 (file)
@@ -183,7 +183,7 @@ class CollectionMixin(object):
         creator = self.get_creator
 
         return urlgen(
-            'mediagoblin.user_pages.collections_home',
+            'mediagoblin.user_pages.user_collection',
             user=creator.username,
             collection=self.slug_or_id,
             **extra_args)
index feb5dac6e38edd6f03d586a19cda94d3e24543f6..6cb5a342500c5321278430f50f8cf38d53c22e7a 100644 (file)
         {% if media.collections|length > 1 %}
           &middot;
         {% endif %}
-        <a href="{{ request.urlgen(
-                          'mediagoblin.user_pages.user_collection',
-                          collection=collection['slug'], user=request.user.username) }}">{{ collection['title'] }}</a>
+        <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a>
       {% elif loop.revindex == 2 %}
-        <a href="{{ request.urlgen(
-                          'mediagoblin.user_pages.user_collection',
-                          collection=collection['slug'], user=request.user.username) }}">{{ collection['title'] }}</a>
+        <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a>
       {% else %}
-        <a href="{{ request.urlgen(
-                          'mediagoblin.user_pages.user_collection',
-                          collection=collection['slug'], user=request.user.username) }}">{{ collection['title'] }}</a> &middot;
+        <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a> &middot;
       {% endif %}
     {% endfor %}
   </p>