mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 14:44:18 +00:00
fix navbar showing user info even when not logged in
This commit is contained in:
parent
68a506e1a7
commit
4b098bea15
1 changed files with 14 additions and 10 deletions
|
@ -9,14 +9,18 @@
|
||||||
<a href="{% url 'public-index' %}">Public</a> |
|
<a href="{% url 'public-index' %}">Public</a> |
|
||||||
<a href="/admin/">Admin</a>
|
<a href="/admin/">Admin</a>
|
||||||
|
|
||||||
{% block welcome-msg %}
|
{% if user.is_authenticated %}
|
||||||
{% trans 'User' %}
|
{% block welcome-msg %}
|
||||||
<strong>{% firstof user.get_short_name user.get_username %}</strong>
|
{% trans 'User' %}
|
||||||
{% endblock %}
|
<strong>{% firstof user.get_short_name user.get_username %}</strong>
|
||||||
{% block userlinks %}
|
{% endblock %}
|
||||||
{% if user.has_usable_password %}
|
{% block userlinks %}
|
||||||
<a href="{% url 'admin:password_change' %}">Account</a> /
|
{% if user.has_usable_password %}
|
||||||
{% endif %}
|
<a href="{% url 'admin:password_change' %}">Account</a> /
|
||||||
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
|
{% endif %}
|
||||||
{% endblock %}
|
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
|
||||||
|
{% endblock %}
|
||||||
|
{% else %}
|
||||||
|
<a href="{% url 'admin:login' %}">{% trans 'Log in' %}</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue