<!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 -->
  <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'/>
  
  {% 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">
            <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 %}
                    <li><a tabindex="-1" href="{{ link.url }}"><i class="{{ link.icon_class }}"></i> {{ link.name }}</a></li>
                    {% 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>
            <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 %}
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="/select_db/"><i class="glyphicon glyphicon-inbox"></i> Cambiar de empresa</a></li>
                  <li role="presentation" class="divider"></li>
                  <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" 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='content'>
    <div class="pagecontent">
      {% block content %}{% endblock %}
    </div>
  </section>
  <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) 587-7607<br>
          <abbr title="Telefono">Tel 2:</abbr> (625) 582-5014<br>
        </address>
      </div>
    </div>
    <div class="row-fluid row">
      SIC &copy; 2015
    </div>
  </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 type="text/javascript">
    $(document).ready(function(){
      $('#clave_id').focus();
      $('#clave_id').live('keydown', function(e) { 
        var keyCode = e.keyCode || e.which; 
        if (keyCode == 13)
        {
          event.preventDefault();
          window.location.href = '/articulo_consolidado/'+ $('#clave_id').val()+'/';
        } 

       $("#clave_id").bind('keyup', function (e) {
          if (e.which >= 97 && e.which <= 122) {
              var newKey = e.which - 32;
              // I have tried setting those
              e.keyCode = newKey;
              e.charCode = newKey;
          }

          $("#clave_id").val(($("#clave_id").val()).toUpperCase());
        });
      });
    });  
  </script>

{% block js_modulecode %}
{% endblock %}
{% block js_code %}
    
{% endblock %}
</body>
</html>