4 {% if user.is_authenticated %}
5 <div class="nav-item dropdown">
6 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="{{ user.username }}">
7 <img src="{% gravatar_url item.get_email 26 %}" alt="{{ user.username }}">
9 <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
10 <h6 class="dropdown-header">{{ user.username }}</h6>
11 {% if user.is_staff %}
12 <a target="_blank" class="dropdown-item" href="{% url 'admin:index' %}">{% trans "Admin" %}</a>
14 <a class="dropdown-item" href='{% url "logout" %}{% if logout_to %}?next={{ logout_to }}{% endif %}'>{% trans "Log Out" %}</a>
18 {% url "cas_ng_login" as login_url %}
19 {% if login_url != request.path %}
20 <a class="nav-item nav-link" href='{{ login_url }}'>{% trans "Log In" %}</a>