Source fixes: avoid race and wait a minute after uploading to prevent unnecessary...
[redakcja.git] / src / redakcja / templates / registration / head_login.html
1 {% load i18n %}
2 {% load gravatar %}
3
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 user.email 26 %}" alt="{{ user.username }}">
8     </a>
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>
13       {% endif %}
14       <a class="dropdown-item" href='{% url "logout" %}{% if logout_to %}?next={{ logout_to }}{% endif %}'>{% trans "Log Out" %}</a>
15     </div>
16   </div>
17 {% else %}
18   {% url "cas_ng_login" as login_url %}
19   {% if login_url != request.path %}
20     <a id="login" class="nav-item nav-link" href='{{ login_url }}'>{% trans "Log In" %}</a>
21   {% endif %}
22 {% endif %}