<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title><?= $titulo?></title>
	<?php
		$this->load->view('main/link');
		echo script_tag('js/modulos/xca.js?'.$_SESSION['app.gxc_sesion_version']);
	?>
	<script type="text/javascript">
		$(function () {
			fn_xca_listar();
			$('.date').datepicker({
                autoclose   : true,
                format      : 'dd/mm/yyyy'
            });
		});
	</script>
</head>
<body>
	<div class="container">
		<div class="panel panel-primary">
			<?= $cabecera?>
			<?= $menu?>
			<div class="panel-body" style="text-align: center;">
				<h3><b>LISTAR CITAS</b></h3>
			</div>
			<div class="panel-body">
				<form class="form-inline" id="form_buscar" method="post" action="javascript:fn_xca_listar();">
					<div class="form-group">
						<label for="cbo_xco">Consultorio: </label>
						<select name="cbo_xco" id="cbo_xco" class="form-control">
							<?= $xco?>
						</select>
					</div>
					<div class="form-group">
						<label for="txt_desde">Desde</label>
						<div class="input-group date">
							<input type="text" id="txt_desde" name="txt_desde" value="<?= date('d/m/Y')?>" readonly class="form-control" autocomplete="off">
							<span class="input-group-addon">
								<span class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</div>
					<div class="form-group">
						<label for="txt_hasta">Hasta</label>
						<div class="input-group date">
							<input type="text" id="txt_hasta" name="txt_hasta" value="<?= date('d/m/Y')?>" readonly class="form-control" autocomplete="off">
							<span class="input-group-addon">
								<span class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</div>
					<button type="submit" class="btn btn-default">
						<span class="glyphicon glyphicon-search"></span>
					</button>
					<a href="<?= base_url('movimientos/xca/nuevo')?>" class="btn btn-primary">
						<span class="glyphicon glyphicon-plus"></span> <b>Nuevo</b>
					</a>
				</form>
			</div>
			<div class="panel-body">
				<table id="xca_data" class="display table table-hover table-bordered table-condensed table-stripped responsive nowrap">
					<thead>
						<tr>
							<th>Consultorio</th>
							<th>Personal</th>
							<th>Fecha</th>
							<th>Acción</th>
						</tr>
					</thead>
					<tbody></tbody>
				</table>
			</div>
			<?= $pie?>
		</div>
	</div>
</body>
</html>