Commit 2ad8f0a8 authored by hynek's avatar hynek 🤤
Browse files

feat(templates): use login/logout views in top-nav

parent 6c78b274
......@@ -18,23 +18,20 @@
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon" />
</button>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<input class="w-25 form-control mx-auto" type="text" placeholder="Search" name="q" ic-get-from="{% url 'ddusers:search' %}" ic-target="#content" aria-label="Search">
<ul class="navbar-nav ml-auto">
{% if request.user.is_authenticated %}
<ul class="navbar-nav ml-auto">
{% if request.user.is_authenticated %}
<li class="nav-item">
<a class="nav-link" href="#">{% trans "Sign Out" %}</a>
<a class="nav-link" href="{% url 'ddusers.user_logout' %}">{% trans "Sign Out" %}</a>
</li>
{% else %}
<li class="nav-item">
<a id="sign-up-link" class="nav-link" href="#">{% trans "Sign Up" %}</a>
</li>
<li class="nav-item" data-toggle="modal" data-target="#signIn">
<a id="log-in-link" class="nav-link" href="#">{% trans "Sign In" %}</a>
<a id="log-in-link" class="nav-link" href="{% url 'ddusers.user_login' %}">{% trans "Sign In" %}</a>
</li>
{% endif %}
</ul>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment