Change DCLNavbarPlugin to show login option only if set
This commit is contained in:
parent
d7be223fcb
commit
c9ac959ff6
3 changed files with 34 additions and 8 deletions
|
|
@ -35,14 +35,16 @@
|
|||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if not request.user.is_authenticated %}
|
||||
<li>
|
||||
<a href="{% url 'hosting:login' %}">{% trans "Login" %} <span class="fa fa-sign-in"></span></a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a href="{% url 'hosting:dashboard' %}">{% trans "Dashboard" %}</a>
|
||||
</li>
|
||||
{% if instance.show_login_option %}
|
||||
{% if not request.user.is_authenticated %}
|
||||
<li>
|
||||
<a href="{% url 'hosting:login' %}">{% trans "Login" %} <span class="fa fa-sign-in"></span></a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a href="{% url 'hosting:dashboard' %}">{% trans "Dashboard" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% comment %}
|
||||
<!-- to be used when more than one option for language -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue