<!DOCTYPE html>
<html>

<head><meta charset="gb18030">
	
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>
		{% block title %}{% endblock %}
		| Admin</title>
	<!-- Tell the browser to be responsive to screen width -->
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<!-- Bootstrap 3.3.5 -->
	<link rel="stylesheet" href="public/dist_admin/css/bootstrap.min.css">
	<!-- Font Awesome -->
	<link rel="stylesheet" href="public/dist_admin/css/font-awesome.css">
	<!-- Theme style -->
	<link rel="stylesheet" href="public/dist_admin/css/AdminLTE.min.css">
	<!-- AdminLTE Skins. Choose a skin from the css/skins
						         folder instead of downloading all of them to reduce the load. -->
	<link rel="stylesheet" href="public/dist_admin/css/_all-skins.min.css">
	<link rel="stylesheet" href="public/css/style.css">
	<link rel="apple-touch-icon" href="public/dist_admin/img/apple-touch-icon.png">
	<link rel="shortcut icon" href="public/dist_admin/img/apple-touch-icon.png">
	
	<style>
		.menu2{
			list-style: none;
			margin: 0;
			padding: 0.5em;
			max-height: 400px;
			overflow: auto;
			
		}

		.menu2 li a{
			width: 100%;
			display: inline-block;
			color: rgb(129, 129, 129) !important;
			border-bottom: 1px solid rgba(0, 0, 0, 0.1);
			font-size: .9em;
		}

		.menu2 li a h4{
			font-size: 1.2em;
			color: black;
		}

	</style>

</head>

<body class="hold-transition skin-green sidebar-mini">
	<div class="wrapper" style="height: 100vh;">

		<header class="main-header">
			<a href="admin.php" class="logo">
				<!-- mini logo for sidebar mini 50x50 pixels -->
				<span class="logo-mini">
					<img src="public/galeria/{{empresa.logo}}" alt="logo" width="35">
				</span>
				<!-- logo for regular state and mobile devices -->
				<span class="logo-lg" style="font-size: .5em;">
					<b>{{user.nombre}}</b>
				</span>
			</a>

			<!-- Header Navbar: style can be found in header.less -->
			<nav class="navbar navbar-static-top nav-header" role="navigation">
				<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
					<span class="sr-only">Navegation</span>
				</a>
				<!-- Navbar Right Menu -->
				<div class="navbar-custom-menu">
					<ul class="nav navbar-nav">
                        <!-- Messages: style can be found in dropdown.less-->
						<li class="dropdown messages-menu">
							<!-- Menu toggle button -->
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">
								<i class="fa fa-envelope-o"></i>
								<span class="label label-success" id="notificacionnumero">4</span>
							</a>
							<ul class="dropdown-menu" style="width: 400px;">
								<li class="header" id="numerodocumentomensage">Hay 4 documentos pendientes</li>
								<li>
									<!-- inner menu: contains the messages -->
									<ul class="menu2" id="contenedormensages">
									    <!-- aqui se dibuja con js -->
									</ul>
									<!-- /.menu -->
								</li>
								
							</ul>
						</li>
						<!-- /.messages-menu -->


						<!-- User Account: style can be found in dropdown.less -->
						<li class="dropdown user user-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">
								<span class="hidden-xs"><small>Usuario:</small> {{user.nick}}</span>
							</a>
							<ul class="dropdown-menu">
								<!-- User image -->
								<li class="user-header">
									<p class="text-left" style="font-size: .9em;">
									    Nombre: <b>{{user.nombre}}</b><br>
									    Usuario: <b>{{user.nick}}</b><br>
									    Cargo: <b>{{user.cargo}}</b>
									</p>
								</li>

								<!-- Menu Footer-->
								<li class="user-footer">
									<div class="pull-right">
										<a href="perfil.php" class="btn btn-default btn-flat">Cambiar contrase&ntilde;a</a>
										<a href="logout.php" class="btn btn-danger btn-flat">Cerrar session</a>
									</div>
								</li>
							</ul>
						</li>

					</ul>
				</div>

			</nav>
		</header>
		<!-- Left side column. contains the logo and sidebar -->
		<aside class="main-sidebar">
			<!-- sidebar: style can be found in sidebar.less -->
			<section class="sidebar">
				<!-- Sidebar user panel -->

				<!-- sidebar menu: : style can be found in sidebar.less -->
				<ul class="sidebar-menu">
					<li class="header"></li>

					
					<li class="treeview {% if nav_active == 'tablas' %}active{% endif %}">
						<a href="#">
							<i class="fa fa-th"></i>
							<span>Tablas</span>
							<i class="fa fa-angle-left pull-right"></i>
						</a>
						<ul class="treeview-menu">
							{% for privilegio in privilegios %}
							{% if privilegio.nombre == "tipo persona" %}
							<li>
								<a href="soporte_tipopersona.php">
									<i class="fa fa-circle-o"></i>
									Tipo persona</a>
							</li>
							{% endif %}
							{% if privilegio.nombre == "tipo documento" %}
							<li>
								<a href="soporte_tipodocumento.php">
									<i class="fa fa-circle-o"></i>
									Tipo documento</a>
							</li>
							{% endif %}
							{% if privilegio.nombre == "lugar" %}
							<li>
								<a href="soporte_lugares.php">
									<i class="fa fa-circle-o"></i>
									Lugar</a>
							</li>
							{% endif %}
							{% endfor %}
						</ul>
					</li>

					{% for privilegio in privilegios %}
					{% if privilegio.nombre == "usuarios" %}
					<li class="treeview {% if nav_active == 'acceso' %}active{% endif %}">
						<a href="#">
							<i class="fa fa-key"></i>
							<span>Acceso</span>
							<i class="fa fa-angle-left pull-right"></i>
						</a>
						<ul class="treeview-menu">
							<li>
								<a href="soporte_usuario.php">
									<i class="fa fa-circle-o"></i>
									Usuarios</a>
							</li>
							{% if user.nick == "MARTERMUNI" %}
							<li>
								<a href="tipo_acceso.php">
									<i class="fa fa-circle-o"></i>
									Tipo de acceso</a>
							</li>
							<li>
								<a href="privilegios.php">
									<i class="fa fa-circle-o"></i>
									Privilegios</a>
							</li>
							{% endif %}
						</ul>
					</li>
					{% endif %}
					{% endfor %}

					<li class="treeview {% if nav_active == 'configuracion' %}active{% endif %}">
						<a href="#">
							<i class="fa fa-gear"></i>
							<span>Configuraci&oacuten</span>
							<i class="fa fa-angle-left pull-right"></i>
						</a>
						<ul class="treeview-menu">
							{% for privilegio in privilegios %}
							{% if privilegio.nombre == "empresa" %}
							<li>
								<a href="c-empresa.php">
									<i class="fa fa-circle-o"></i>
									Empresa</a>
							</li>
							{% endif %}
							{% if privilegio.nombre == "carrusel" %}
							<li>
								<a href="soporte_carrusel.php">
									<i class="fa fa-circle-o"></i>
									Carrusel</a>
							</li>
							{% endif %}
							{% endfor %}
							<li>
								<a href="perfil.php">
									<i class="fa fa-circle-o"></i>
									Cuenta</a>
							</li>
						</ul>
					</li>

					{% for privilegio in privilegios %}
					{% if privilegio.nombre == "recibidos" %}
					<li {% if nav_active == "recibidos" %}class="active"{% endif %}>
						<a href="admin.php">
							<i class="fa fa-check"></i>
							<span>Recibidos</span>
						</a>
					</li>
					{% endif %}
					{% if privilegio.nombre == "reporte" %}
					<li {% if nav_active == "reportes" %}class="active"{% endif %}>
						<a href="reporte.php">
							<i class="fa fa-file"></i>
							<span>Reporte</span>
						</a>
					</li>
					{% endif %}
					{% endfor %}
					<li>
						<a target="__blank" href="php_info.php">
							<i class="fa fa-info-circle"></i>
							<span>Acerca De...</span>
							<small class="label pull-right bg-yellow">Centecp</small>
						</a>
					</li>

				</ul>
			</section>
			<!-- /.sidebar -->
		</aside>

		<!--Contenido-->
		<!-- Content Wrapper. Contains page content -->
		<div class="content-wrapper" style="height: 80vh;">

			<!-- Main content -->
			<section class="content" style="height: 100%;overflow-y: scroll;overflow-x: hidden;">
				<div class="row">
					<div class="col-md-12">
						{% block content %}
						<!-- **** **** **** Aqui el contenido **** **** **** -->
						{% endblock %}
					</div>
					<!-- /.col -->
				</div>
				<!-- /.row -->
			</section>
			<!-- /.content -->
		</div>
		<!-- /.content-wrapper -->
		<!--Fin-Contenido-->

		<footer class="main-footer">
			<div class="pull-right hidden-xs">
				<b>Version</b>
				1.0.0
			</div>
			<strong>Copyright &copy; 2020
				<a href="https://www.centecp.com" class="text-verdedark">Centecp</a>.</strong>
			Todo los derechos reservados.
		</footer>


		<!-- jQuery 2.1.4 -->
		<script src="public/dist_admin/js/jQuery-2.1.4.min.js"></script>
		<!-- Bootstrap 3.3.5 -->
		<script src="public/dist_admin/js/bootstrap.min.js"></script>
		<!-- AdminLTE App -->
		<script src="public/dist_admin/js/app.min.js"></script>
		<script src="public/js/main.js"></script>
		<script src="public/js/ajax.js"></script>
</body>
</body>

</html>