This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up users sidebar navigation on My Purchases page (bug 705052)
- Loading branch information
Showing
3 changed files
with
54 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
<div class="secondary"> | ||
{% set links = [ | ||
(_('My Profile'), amo_user.get_url_path()), | ||
(_('Account Settings'), url('users.edit')), | ||
] %} | ||
{% if not webapp %} | ||
{% do links.append((_('My Collections'), url('collections.mine'))) %} | ||
{% if amo_user.favorite_addons %} | ||
{% do links.append((_('My Favorites'), | ||
url('collections.mine', 'favorites'))) %} | ||
{% endif %} | ||
{% endif %} | ||
{% if waffle.switch('marketplace') %} | ||
{% do links.append((_('My Purchases'), url('users.purchases'))) %} | ||
{% endif %} | ||
<div id="secondary-nav" class="secondary"> | ||
<h2>{{ _('My Account') }}</h2> | ||
<ul> | ||
<li><a href="{{ request.user.get_profile().get_url_path() }}">{{ _('My Profile') }}</a></li> | ||
<li><a href="{{ url('users.edit') }}">{{ _('Account Settings') }}</a></li> | ||
<li><a href="{{ url('collections.user', amo_user.username) }}">{{ _('My Collections') }}</a></li> | ||
{% if amo_user.favorite_addons %} | ||
<li><a href="{{ url('collections.detail', amo_user.username, 'favorites') }}">{{ _('My Favorites') }}</a></li> | ||
{% endif %} | ||
{% if waffle.switch('marketplace') %} | ||
<li><a href="{{ url('users.purchases') }}">{{ _('My Purchases') }}</a></li> | ||
{% endif %} | ||
{% for title, link in links %} | ||
<li><a href="{{ link }}"{% if request.path == link %} class="selected"{% endif %}> | ||
{{ title }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{% if webapp or settings.APP_PREVIEW %} | ||
{% set WEBAPPS = True %} | ||
{% set webapp, WEBAPPS = True, True %} | ||
{% endif %} | ||
{% extends "webapps/base.html" if WEBAPPS else "impala/base.html" %} |