summaryrefslogtreecommitdiff
path: root/openstack_dashboard/templates/header/_user_menu.html
blob: 6cc26ca8cab60cb0f6b7fce4da62c318fe9540c7 (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{% load i18n %}
{% load themes %}

<li class="dropdown user-menu">
  <a data-toggle="dropdown" href="#" class="dropdown-toggle" role="button" aria-expanded="false">
    <span class="fa fa-user"></span>
    <span class="user-name">{{ request.user.username }}</span>
    <span class="fa fa-caret-down"></span>
  </a>
  <ul id="editor_list" class="dropdown-menu dropdown-menu-right selection-menu">
    <li>
      <a href="{% url 'horizon:settings:user:index' %}" target="_self">
        <span class="fa fa-cog"></span>
        {% trans "Settings" %}
      </a>
    </li>
    {% if HORIZON_CONFIG.bug_url %}
      <li>
        <a href="{{ HORIZON_CONFIG.bug_url }}" target="_blank">
          <span class="fa fa-bug"></span>
          {% trans "Report Bug" %}
        </a>
      </li>
    {% endif %}
    {% if HORIZON_CONFIG.help_url %}
      <li>
        <a href="{{ HORIZON_CONFIG.help_url }}" target="_blank">
          <span class="fa fa-question-circle"></span>
          {% trans "Help" %}
        </a>
      </li>
    {% endif %}

    {% for link in USER_MENU_LINKS %}
      <li>
        {% if link.external %}
          <a href="{{ link.url }}">
        {% else %}
          <a href="{% url link.url %}">
        {% endif %}

        {% if link.icon_classes %}
            <span class="fa {{ link.icon_classes | join:" "}}"></span>
        {% else %}
            <span class="fa fa-download"></span>
        {% endif %}
        {{ link.name }}
        </a>

      </li>
    {% endfor %}

    {% themes as available_themes %}
    {% if available_themes and available_themes|length > 1 %}
      <li class="divider"></li>
      <li>
        {% include 'header/_theme_list.html' %}
      </li>
    {% endif %}
    <li class="divider"></li>
    <li>
      <a href="{{ LOGOUT_URL }}" target="_self">
        <span class="fa fa-sign-out"></span>
        {% trans "Sign Out" %}
      </a>
    </li>
  </ul>
</li>