<nav class="navbar fixed-top navbar-expand-lg navbar-light bg-light">
  <div class="container">
    <a class="navbar-brand" href="#">
      <img src="/images/logo.png" width="30" height="30" alt=""> Davis
    </a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="{{ "toggle.navigation"|trans }}">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav">
        <li class="nav-item{% if menu == "dashboard" %} active{% endif %}">
          <a class="nav-link" href="{{ path('dashboard') }}">{{ "title.dashboard"|trans }}</a>
        </li>
        <li class="nav-item{% if menu == "resources" %} active{% endif %}">
          <a class="nav-link" href="{{ path('users') }}">{{ "title.users_and_resources"|trans }}</a>
        </li>
      </ul>
      {% if app.user %}
      <ul class="navbar-nav ml-auto">
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            {{ app.user.username }}
          </a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
            <a class="dropdown-item" href="{{ path('app_logout') }}">{{ "logout"|trans }}</a>
          </div>
        </li>
      </ul>
      {% endif %}
    </div>
  </div>
</nav>