django-refunds/templates/navbar.html

45 lines
No EOL
2.3 KiB
HTML

<nav class="navbar navbar-default">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'home' %}">Refunds</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="{% url 'about' %}">About</a></li>
{% if user.is_authenticated %}
<li><a href="{% url 'not_refunded_payments' %}">Payments</a></li>
<li><a href="{% url 'latest_refunds' %}">Refunds</a></li>
{% endif %}
</ul>
<ul class="nav navbar-nav navbar-right">
{% if not user.is_authenticated %}
<li><a href="{% url 'auth_login' %}?next={{ request.path }}">Login</a></li>
{% elif user.is_staff %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
{% firstof user.get_full_name user.username %} <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="{% url 'admin:index' %}">Admin</a></li>
<li role="separator" class="divider"></li>
<li><a href="{% url 'auth_logout' %}?next={{ request.path }}">Logout</a></li>
</ul>
</li>
{% else %}
<li><a href="{% url 'auth_logout' %}?next={{ request.path }}">Logout</a></li>
{% endif %}
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>