Rearrange source to src dir.
[redakcja.git] / src / redakcja / templates / registration / head_login.html
diff --git a/src/redakcja/templates/registration/head_login.html b/src/redakcja/templates/registration/head_login.html
new file mode 100644 (file)
index 0000000..2a8fd3b
--- /dev/null
@@ -0,0 +1,16 @@
+{% load i18n %}
+
+{% if user.is_authenticated %}
+<span class="user_name">{{ user.username }}</span> |
+
+{% if user.is_staff %}
+    <a href="{% url 'admin:index' %}">{% trans "Admin" %}</a> |
+{% endif %}
+
+<a href='{% url "logout" %}{% if logout_to %}?next={{ logout_to }}{% endif %}'>{% trans "Log Out" %}</a>
+{% else %}
+{% url "login" as login_url %}
+{% ifnotequal login_url request.path %}
+    <a href='{{ login_url }}'>{% trans "Log In" %}</a>
+{% endifnotequal %}
+{% endif %}