{% load i18n static misago_avatars %}
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
  <a class="navbar-brand" href="{% url 'misago:admin:index' %}">
    <img src="{% static 'misago/admin/img/mred.png' %}" alt="">
    <span>Misago</span>
  </a>
  <span class="badge badge-light mr-auto">
    {{ MISAGO_VERSION }}
  </span>
  <a href="https://github.com/rafalp/misago" target="_blank" class="btn btn-light btn-sm mr-3">
    <span class="fab fa-github"></span>
    {% trans "GitHub" context "admin navbar" %}
  </a>
  <a href="https://misago-project.org" target="_blank" class="btn btn-light btn-sm mr-3">
    <span class="far fa-question-circle"></span>
    {% trans "Support forum" context "admin navbar" %}
  </a>
  <a href="{% url 'misago:index' %}" class="btn btn-light btn-sm mr-3">
    <span class="far fa-window-maximize"></span>
    {% trans "Site index" context "admin navbar" %}
  </a>
  <div class="dropdown">
    <button type="button" class="btn btn-user dropdown-toggle" id="openAdminDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
      <img src="{{ user|avatar:30 }}" alt="{% trans 'Your avatar' context 'admin navbar' %}">
    </button>
    <div class="dropdown-menu dropdown-menu-right" aria-labelledby="openAdminDropdown">
      <h6 class="dropdown-header">{{ user }}</h6>
      <a class="dropdown-item" href="{% url 'misago:admin:users:edit' pk=user.pk %}">
        {% trans "Edit your account" context "admin navbar" %}
      </a>
      <div class="dropdown-divider"></div>
      <form action="{% url 'misago:admin:logout' %}" method="post">
        {% csrf_token %}
        <button type="submit" class="dropdown-item">
          {% trans "Close admin session" context "admin navbar" %}
        </button>
      </form>
      <form action="{% url 'misago:logout' %}" method="post">
        {% csrf_token %}
        <button type="submit" class="dropdown-item">
          {% trans "Log out completely" context "admin navbar" %}
        </button>
      </form>
    </div>
  </div>
</nav>