<nav class="navbar navbar-expand-lg navbar-dark bg-dark shadow">
  <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarToggler"
    aria-controls="navbarToggler" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand" href="{% url 'home' %}">
    <i class="far fa-folder-open fa-fw mr-2"></i><strong>GEA</strong>
  </a>
  <div class="collapse navbar-collapse" id="navbarToggler">
    <ul class="navbar-nav mr-auto">
      <!-- Expedientes -->
      {% url 'expedientes' as url %}
      <li class="nav-item {% if request.path == url %}active{% endif %}">
        <a class="nav-link" href="{{ url }}">
          <i class="fas fa-fw fa-folder"></i> Expedientes
        </a>
      </li>
      <!-- Personas -->
      {% url 'personas' as url %}
      <li class="nav-item {% if request.path == url %}active{% endif %}">
        <a class="nav-link" href="{{ url }}">
          <i class="fas fa-fw fa-users"></i> Personas
        </a>
      </li>
      <!-- Catastros Locales -->
      {% url 'catastros_locales' as url %}
      <li class="nav-item {% if request.path == url %}active{% endif %}">
        <a class="nav-link" href="{{ url }}?lugar=Ciudad%20de%20GÁLVEZ">
            <i class="fas fa-fw fa-map-signs"></i> Catatros Locales
        </a>
      </li>
      <!-- Notas -->
      <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" id="navbarDropdown" role="button" aria-haspopup="true" aria-expanded="false">
          <i class="fas fa-paperclip"></i> Notas
        </a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
          <a class="dropdown-item" href="{% url 'solicitud' %}">
            <i class="far fa-sticky-note"></i> Solicitud de Inscripcion SCIT
          </a>
          <a class="dropdown-item" href="{% url 'visacion' %}">
            <i class="far fa-sticky-note"></i> Visación Comunal/Municipal
          </a>
        </div>
      </li>
      <!-- Buscar -->
      <!-- <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" id="navbarDropdown" role="button" aria-haspopup="true" aria-expanded="false">
          <i class="fas fa-search"></i> Buscar
        </a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
          <a class="dropdown-item" href="{% url 'buscar_plano' %}">
            <i class="far fa-map"></i> Nº de Plano
          </a>
          <a class="dropdown-item" href="{% url 'buscar_set' %}">
            <i class="far fa-sticky-note"></i> Informe Catastral
          </a>
          <a class="dropdown-item" href="{% url 'buscar_catastro' %}">
            <i class="fas fa-map-signs"></i> Catastros locales
          </a>
        </div>
      </li> -->
      <!-- Herramientas -->
      <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" id="navbarDropdown" role="button" aria-haspopup="true" aria-expanded="false">
          <i class="fas fa-wrench"></i> Herramientas
        </a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
          <a class="dropdown-item" href="{% url 'caratula' %}">
            <i class="far fa-map"></i> Carátula Sencilla de Plano de Mensura
          </a>
          <a class="dropdown-item" href="{% url 'dvapi' %}">
            <i class="fas fa-calculator"></i> Dígito Verificador API
          </a>
          <a class="dropdown-item" href="{% url 'sie' %}">
            <i class="far fa-folder"></i> Sistema de Información de Expedientes del SCIT
          </a>
        </div>
      </li>
      <!-- Acerca de -->
      <li class="nav-item">
        <a class="nav-link" href="{% url 'about' %}">
          <i class="fas fa-info mr-2"></i> Acerca de
        </a>
      </li>
    </ul>
    <ul class="navbar-nav ml-md-auto">
      {% if user.is_staff %}
      <!-- admin -->
      <li class="nav-item">
        <a class="nav-link" href="{% url 'admin:index' %}">
          <i class="fas fa-user-shield"></i> admin
        </a>
      </li>
      {% endif %}
      {% if user.is_authenticated %}
      <!-- profile -->
      <li class="nav-item">
        <a class="nav-link" href="#">
          <i class="fas fa-user"></i>
          {% if user.first_name %}{{ user.first_name }}{% else %}{{ user.username }}{% endif %}
        </a>
      </li>
      <!-- logout -->
      <li class="nav-item">
        <a class="nav-link" href="{% url 'logout' %}">
          <i class="fas fa-sign-out-alt"></i> Salir
        </a>
      </li>
      {% endif %}
    </ul>
  </div>
</nav>