Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b77acb1e97
Fetching contributors…

Cannot retrieve contributors at this time

file 45 lines (44 sloc) 1.287 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
{% set amo_user = request.amo_user %}
{% if user.is_authenticated() %}
  {% if tools_links and tools_links|count > 1 %}
    <ul class="tools">
      <li>
        <a href="#" class="controller">{{ tools_title }}</a>
        <ul>
          {% for link in tools_links %}
            <li><a href="{{ link.href }}">{{ link.text }}</a></li>
          {% endfor %}
        </ul>
      </li>
    </ul>
  {% else %}
    <p class="context tools">
      <a href="{{ tools_links[0].href }}">{{ tools_links[0].text }}</a>
    </p>
  {% endif %}
  <ul class="account">
      <li>
      <a href="#" class="controller" title="{{ amo_user.email }}">
        {{ _('My Account') }}</a>
        {% if account_links %}
          <ul>
            {% for link in account_links %}
              <li><a href="{{ link.href }}">{{ link.text }}</a></li>
            {% endfor %}
          </ul>
        {% endif %}
      </li>
  </ul>
{% endif %}

<p class="context">
  {% if user.is_authenticated() %}
    <span class="greeting">
      {{ _('Welcome, {0}')|f(amo_user.welcome_name) }}
    </span>
  {% else %}
    {# TODO(jbalogh): reverse #}
    {% trans reg="/users/register", login=login_link() %}
      <a href="{{ reg }}">Register</a> or <a href="{{ login }}">Log in</a>
    {% endtrans %}
  {% endif %}
</p>
Something went wrong with that request. Please try again.