Created
February 21, 2012 18:33
-
-
Save washort/1878014 to your computer and use it in GitHub Desktop.
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
{% set amo_user = request.amo_user %} | |
{% if user.is_authenticated() %} | |
<li class="account"> | |
<a href="#" class="user" title="{{ amo_user.email }}"> | |
{{ amo_user.welcome_name }}</a> | |
{% if account_links %} | |
<ul> | |
{% for link in account_links %} | |
{% if not loop.last %} | |
<li><a href="{{ link.href }}">{{ link.text }}</a></li> | |
{% endif %} | |
{% endfor %} | |
</ul> | |
{% endif %} | |
</li> | |
<li class="nomenu logout"> | |
<a href="{{ url('users.logout') }}">{{ _('Log out') }}</a> | |
</li> | |
{% else %} | |
<li class="account anonymous nomenu logout{{ ' legacy' if not waffle.switch('browserid-login') }}"> | |
{% if waffle.switch('browserid-login') %} | |
<a contextmenu="login" href="{{ login_link() }}" class="browserid-login" | |
data-url="{{ url('users.browserid_login') }}" | |
data-profile-form-url="{{ url('users.complete_profile_form') }}"> | |
{{ _('Log in / Register') }}</a> | |
<menu type="context" id="login"> | |
<menuitem data-url="{{ login_link() }}#open" label="{{ _('Admin / Editor Log in') }}" id="admin-login"></menuitem> | |
</menu> | |
{% else %} | |
{% trans login=login_link() %} | |
<a id="amo-register" href="#">Register</a> or <a href="{{ login }}">Log in</a> | |
{% endtrans %} | |
<div id="register-dropdown">Email: <form action="{{ url('users.maybe_register') }}" method="POST">{{ csrf }}<input type="text" name="email"><button type="submit">{{ _('Register') }}</button></div> | |
{% endif %} | |
</li> | |
{% endif %} | |
{% if user.is_authenticated() %} | |
{% if tools_links|count > 1 %} | |
<li class="tools"> | |
<a href="#">{{ tools_title }}</a> | |
<ul> | |
{% for link in tools_links %} | |
<li><a href="{{ link.href }}">{{ link.text }}</a></li> | |
{% endfor %} | |
</ul> | |
</li> | |
{% elif tools_links %} | |
<li class="context tools nomenu"> | |
<a href="{{ tools_links[0].href }}">{{ tools_links[0].text }}</a> | |
</li> | |
{% endif %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment