{% block menu %}
<nav class="navbar navbar-default navbar-static-top">
  <div class="container-fluid">
    <!-- 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' %}"><i class="far fa-fw fa-folder-open"></i> <strong>GEA</strong></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">
        <!-- Listados -->
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
            aria-expanded="false"><i class="fas fa-fw fa-list"></i> Listados <span class="caret"></span></a>
          <ul class="dropdown-menu">
            {% url 'expedientes' as url %}
            <li class="{% if request.path == url %} active{% endif %}">
              <a href="{{ url }}"><i class="far fa-fw fa-folder"></i> Expedientes</a>
            </li>
            {% url 'personas' as url %}
            <li class="{% if request.path == url %} active{% endif %}">
              <a href="{{ url }}"><i class="fas fa-fw fa-users"></i> Personas</a>
            </li>
            {% url 'catastros_locales' as url %}
            <li class="{% if request.path == url %} active{% endif %}">
              <a href="{{ url }}"><i class="fas fa-fw fa-map-signs"></i> Catatros Locales</a>
            </li>
          </ul>
        </li>
        <!-- Notas -->
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
            aria-expanded="false"><i class="fas fa-fw fa-paperclip"></i> Notas <span class="caret"></span></a>
          <ul class="dropdown-menu">
            {% url 'solicitud' as url %}
            <li class="{% if request.path == url %} active{% endif %}">
              <a href="{{ url }}"><i class="far fa-fw fa-sticky-note"></i> Solicitud de Inscripcion SCIT</a>
            </li>
            {% url 'visacion' as url %}
            <li class="{% if request.path == url %} active{% endif %}">
              <a href="{{ url }}"><i class="far fa-fw fa-sticky-note"></i> Visación Comunal/Municipal</a>
            </li>
          </ul>
        </li>
        <!-- Buscar -->
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
            aria-expanded="false"><i class="fas fa-fw fa-search"></i> Buscar <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li class="{% block nav-search-plano %}{% endblock %}">
              <a href="{% url 'buscar_plano' %}"><i class="far fa-fw fa-map"></i> Nº de Plano</a>
            </li>
            <li class="{% block nav-search-set %}{% endblock %}">
              <a href="{% url 'buscar_set' %}"><i class="far fa-fw fa-sticky-note"></i> Informe Catastral</a>
            </li>
            <li class="{% block nav-search-cl %}{% endblock %}">
              <a href="{% url 'buscar_catastro' %}"><i class="fas fa-fw fa-map-signs"></i> Catastros locales</a>
            </li>
          </ul>
        </li>
        <!-- Herramientas -->
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
            aria-expanded="false"><i class="fas fa-fw fa-wrench"></i> Herramientas <span class="caret"></span></a>
          <ul class="dropdown-menu">
            {% url 'caratula' as url %}
            <li class="{% if request.path == url %} active{% endif %}">
              <a href="{{ url }}"><i class="far fa-fw fa-map"></i> Carátula de Plano de Mensura</a>
            </li>
            {% url 'dvapi' as url %}
            <li class="{% if request.path == url %} active{% endif %}">
              <a href="{{ url }}"><i class="fas fa-fw fa-calculator"></i> Dígito Verificador API</a>
            </li>
            {% url 'sie' as url %}
            <li class="{% if request.path == url %} active{% endif %}">
              <a href="{{ url }}"><i class="far fa-fw fa-folder"></i> Sistema de Información de Expedientes del SCIT</a>
            </li>
          </ul>
        </li>
        <!-- Acerca de -->
        {% url 'about' as url %}
        <li class="{% if request.path == url %} active{% endif %}">
          <a href="{{ url }}"><i class="fas fa-fw fa-info"></i> Acerca de</a>
        </li>
      </ul>
      {% if user.is_authenticated %}
      <ul class="nav navbar-nav navbar-right">
        {% if user.is_staff %}
        <!-- admin -->
        <li><a href="{% url 'admin:index'%}"><i class="fas fa-fw fa-user-cog"></i> admin</a></li>
        {% endif %}
        <li>
          <a>
            <i class="far fa-fw fa-user"></i>
            {% if user.first_name %}{{ user.first_name }}{% else %}{{ user.get_username }}{% endif %}
          </a>
        </li>
        <!-- logout -->
        <li><a href="{% url 'logout'%}"><i class="fas fa-fw fa-sign-out-alt"></i> Salir</a></li>
      </ul>
      {% endif %}
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav><!-- /.navbar -->
{% endblock menu %}