Fixed collection sidebar for media_home to user collection.url_for_self instead of incorrectly getting the session user
This commit is contained in:
parent
cdb35b9717
commit
256f816f50
@ -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)
|
||||
|
@ -25,17 +25,11 @@
|
||||
{% if media.collections|length > 1 %}
|
||||
·
|
||||
{% 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> ·
|
||||
<a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a> ·
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user