- <div class="collapse navbar-collapse">
- {% block header_collapse %}
- <div class="col-sm-7 col-md-8 col-lg-7">
- <form class="navbar-form form-inline" role="search" action="{% url 'forum_search:search' %}">
- <div class="form-group col-sm-6 col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" placeholder="{% trans 'Search...' %}" name="q">
- <div class="input-group-btn">
- <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
- </div>
- </div>
- </div>
- <div class="form-group col-sm-5">
- <a href="{% url 'forum_search:search' %}" class="btn btn-link">{% trans "Advanced search" %}</a>
- </div>
- </form>
- </div>
-
- <div class="col-sm-3 col-md-2 col-lg-2 navbar-right">
- <div style="padding: 1em">
- {{ user }}
- </div>
- </div>
- {% endblock header_collapse %}
+ <div class="navbar-nav mr-auto">
+ {% if request.user.is_authenticated %}
+ <div class="nav-item">
+ <a class="nav-link disabled">
+ {{ request.user.username }}
+ </a>
+ </div>
+ {% if request.user.is_staff %}
+ <div class="nav-item">
+ <a class="nav-link" href="{% url 'admin:index' %}">
+ {% trans "Administration" %}
+ </a>
+ </div>
+ {% endif %}
+ <div class="nav-item">
+ <a class="nav-link" href="{% url 'logout' %}">{% trans "Logout" %}</a>
+ </div>
+ {% endif %}