<!DOCTYPE html>
<html lang='es'>

<head>
  <meta charset='utf-8'>
  <title>{% block title %}Microsip{% endblock %}</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1 maximum-scale=1" />

  <!-- Estilos base.html -->
  <link rel='stylesheet' href='{{STATIC_URL}}css/normalize.css' />
  <!-- Latest compiled and minified CSS -->
  <link href='http://fonts.googleapis.com/css?family=Marcellus' rel='stylesheet' type='text/css'>

  <!-- <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
  <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css"> -->
  <link rel="stylesheet" href="{{STATIC_URL}}css/bootstrap.min.css">
  <link rel="stylesheet" href="{{STATIC_URL}}css/bootstrap-theme.min.css">

  <link rel="stylesheet" href="{{STATIC_URL}}css/jquery-ui.css">
  <link rel='stylesheet' href='{{STATIC_URL}}css/base.css' />
  <link rel='stylesheet' href='{{STATIC_URL}}css/jquery.datetimepicker.min.css' />

  {% block style_css %}{% endblock %}
  <link rel='shortcut icon' href='{{STATIC_URL}}img/logo.ico'>
</head>

<body>
  <nav id="navbar-example" class="navbar navbar-default navbar-static" role="navigation">
    <div class="container-fluid">
      <div class="navbar-header">
        <button class="navbar-toggle collapsed" type="button" data-toggle="collapse"
          data-target=".bs-example-js-navbar-collapse">
          <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="#">{{ project_name }}</a>
        <a href="#" class='navbar-brand'>
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>
      </div>

      <div class="collapse navbar-collapse bs-example-js-navbar-collapse">
        <!-- PAGE MENU -->
        <ul class="nav navbar-nav">
          <li class="dropdown active">
            <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"> <i
                class="glyphicon glyphicon-home"></i> {{ menu.selected_app }} <b class="caret"></b></a>
            <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
              {% for link in menu.items %}
              {% if request.user.is_staff%}
                <li><a tabindex="-1" href="{{ link.url }}"><i class="{{ link.icon_class }}"></i> {{ link.name }}</a></li>
              {%else%}
                {% if link.name == 'Pedidos Web'%}
                  <li><a tabindex="-1" href="{{ link.url }}"><i class="{{ link.icon_class }}"></i> {{ link.name }}</a></li>
                {% endif%}
              {%endif%}              
              {% endfor %}
              {% if request.user.username == 'SYSDBA' %}
              <li><a tabindex="-1" href="/administrador/"><i class="glyphicon glyphicon-cog"></i> Administrador </a>
              </li>
              {% endif %}
            </ul>
          </li>

          {% block tools-module %}

          {% endblock %}
          <!-- <li class="dropdown">
                <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Ventas <b class="caret"></b></a>
                <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
                  <li role="presentation" class="divider"></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
                </ul>
              </li> -->
        </ul>
        <!-- USER MENU -->
        <ul class="nav navbar-nav navbar-right">
          {% if not user.is_anonymous %}
          <li id="fat-menu" class="dropdown">
            <a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown"><i
                class="glyphicon glyphicon-user"></i> {{ user.username }} ({{ request.session.selected_database }}) <b
                class="caret"></b></a>
            <ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
              <li role="presentation"><a role="menuitem" tabindex="-1" href="/"><i class="glyphicon glyphicon-home"></i>
                  Inicio</a></li>
              {% if request.user.username == 'SYSDBA' %}
              <li role="presentation"><a role="menuitem" tabindex="-1" href="/conexiones/"><i
                    class="glyphicon glyphicon-random"></i> Conexiones</a></li>
              {% endif %}
              {% if not request.user.last_name == 'clasificadores' %}
              <li role="presentation"><a role="menuitem" tabindex="-1" href="/select_db/"><i
                    class="glyphicon glyphicon-inbox"></i> Cambiar de empresa</a></li>
              {% endif %}               
              <li role="presentation" class="divider"></li>
              {% if request.user.last_name == 'clasificadores' %}
              <li role="presentation"><a role="menuitem" tabindex="-1" href="/pedidos_web/cambiar_contrasena/"><i
                    class="glyphicon glyphicon-transfer"></i> Cambiar Contraseña</a></li>
              {% endif %}          
              <li role="presentation"><a role="menuitem" tabindex="-1" href="/logout/"><i
                    class="glyphicon glyphicon-log-out"></i> Cerrar Sesion</a></li>
            </ul>
          </li>
          {% else %}
          <li id="fat-menu">
            <a href="/login/" class="btn"><i class="glyphicon glyphicon-user"></i> Ingresar</a>
          </li>
          {% endif %}
        </ul>
      </div><!-- /.nav-collapse -->
    </div><!-- /.container-fluid -->
  </nav>
  <div id="tools-module-bar" class="navbar-inner navbar-inner_min nav-tools hidden-xs">

  </div>
  <ol class="breadcrumb hidden-print" style="background-color: transparent; margin: 0;">
    <li><a href="/" class="active"><i class="glyphicon glyphicon-home"></i></a></li>
    {% block breadcrumb %}{% endblock %}
  </ol>
  <section class='container-fluid'>
    <div class="pagecontent">
      {% block content %}{% endblock %}
    </div>
  </section>
  <footer class="hidden-print">
  {% block footer %}
    <br>
    <div class="row-fluid text-left hidden-xs">
      <div class="col-md-2 col-md-offset-1">
        <strong>CONTACTO </strong>
        <br>
        <address>
          <abbr title="Telefono">Tel 1:</abbr> (625) 138-27-40<br>
          <abbr title="Telefono">Tel 2:</abbr> (625) 582-5014<br>
        </address>
      </div>
    </div>
    <div class="row-fluid row">
      SIC &copy; 2019
    </div>
  {% endblock %}
  </footer>
  

  <!--<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
   <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
   <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>-->

  <script src='{{STATIC_URL}}js/jquery.min.js'></script>
  <script src='{{STATIC_URL}}js/jquery-migrate-1.2.1.min.js'></script>
  <script src='{{STATIC_URL}}js/bootstrap.min.js'></script>

  <script src="{{ STATIC_URL }}endless_pagination/js/endless-pagination.js"></script>
  <script src='{{STATIC_URL}}js/jquery-ui.min.js'></script>
  <script src='{{STATIC_URL}}js/jquery-ui-timepicker.js'></script>
  <script src='{{STATIC_URL}}js/jquery.datetimepicker.js'></script>
  <script src='{{STATIC_URL}}js/ajax_post.js'></script>


  {% block js_modulecode %}
  {% endblock %}
  {% block js_code %}

  {% endblock %}
</body>

</html>