<div class="right_col" role="main">
    <div class="clearfix"></div>
      <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
          <div class="x_panel">

            <div class="x_title">
              <h2>Dependencias - Listado <small></small></h2>
              <div class="clearfix"></div>
            </div>

            <div class="x_content">
              <?php if(count($dependencias)>0): ?>
              <div class="container-fluid">
                    <div class="row encabezado">
                      <div class="col-xs col-sm-1"><p class="text-center"></p></div>
                      <div class="col-xs col-sm-1"><p class="text-center">No.</p></div>
                      <div class="col-xs col-sm-3"><p class="text-center">Dependencia</p></div>
                      <div class="col-xs col-sm-2"><p class="text-center">Nombre Titular</p></div>
                      <div class="col-xs col-sm-1"><p class="text-center">Cargo</p></div>
                      <div class="col-xs col-sm-4"><p class="text-center">Opciones</p></div>
                      <!-- Optional: clear the XS cols if their content doesn't match in height -->
                      <div class="clearfix visible-xs-block"></div>
                    </div>
                  <?php ($numero = 0); ?>
                  <?php $__currentLoopData = $dependencias; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dependencia): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if($dependencia->status_dep == 1): ?>
                      <?php ($numero++); ?>
                        <div class="row renglon" id="<?php echo e($dependencia->id_dep); ?>" <?php if($fecha>$dependencia->terminoconvenio_dep ): ?> style="color: red;" <?php endif; ?>>
                          <div class="col-xs col-sm-1 text-center" id="num<?php echo e($numero); ?>">
                            <button type="button" id="btnEliminar" class="btn btn-eliminar btn-danger btn-xs" data-toggle="modal" data-id4="<?php echo e($dependencia->id_dep); ?>" ><span class="fa fa-trash-o"></span></button>
                          </div>                          
                          <div class="col-xs col-sm-1 text-center" id="num<?php echo e($numero); ?>"><?php echo e($numero); ?></div>
            							<div class="col-xs col-sm-3" id="nombreDiv<?php echo e($dependencia->id_dep); ?>"><?php echo e($dependencia->nombre_dep); ?></div>
            							<div class="col-xs col-sm-2" id="titularDiv<?php echo e($dependencia->id_dep); ?>"><?php echo e($dependencia->titular_dep); ?></div>
            							<div class="col-xs col-sm-1" id="puestoDiv<?php echo e($dependencia->id_dep); ?>"><?php echo e($dependencia->cargo_dep); ?></div>
            							<div class="col-xs col-sm-4" align="center">

                            <button type="button" id="btnModificar" class="btn btn-modificar btn-turq btn-xs" data-toggle="modal" data-id2="<?php echo e($dependencia->id_dep); ?>" ><span class="fa fa-edit"> </span> Modificar </button>

                            <button type="button" id="btnConsulta" class="btn btn-consulta btn-primary btn-xs" data-toggle="modal" data-id1="<?php echo e($dependencia->id_dep); ?>" ><span class="fa fa-eye">  </span> Consultar</button>

                          </div>

                          <!-- Optional: clear the XS cols if their content doesn't match in height -->
                          <div class="clearfix visible-xs-block"></div>
                        </div>
                    <?php endif; ?>
        					<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              </div>
              <?php else: ?>
                <h4 align="center">No hay dependencias registradas</h4>
              <?php endif; ?>
            </div>
          </div>
        </div>
      </div>
    </div>


    <!-- MODAL DE CONSULTA -->
    <div class="modal fade" id="consultaModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close btn-modal close_dependencia" data-dismiss="modal" aria-label="Close_dependencia">
              <span aria-hidden="true">&times;</span>
            </button>
            <h4 class="modal-title" id="miModalLabel">Información</h4>
          </div>
          <div class="modal-body">
            <form class="form-horizontal" role="form">
              <div class="form-group">
                <label class="control-label col-sm-2" for="id">ID:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="text" class="form-control" id="id_show" disabled>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="nombre">Nombre:</label>
                <div class="col-sm-10 col-xs-12">
                  <textarea class="textarea form-control" id="nombre_show" cols="5" rows="2" disabled></textarea>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="titular">Titular:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="name" class="form-control" id="titular_show" disabled>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="puesto">Puesto:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="name" class="form-control" id="puesto_show" disabled>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="telefono">Teléfono:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="text" class="form-control" id="telefono_show" disabled>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="domicilio">Domicilio:</label>
                <div class="col-sm-10 col-xs-12">
                  <textarea class="textarea form-control" id="domicilio_show" cols="5" rows="2" disabled></textarea>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="email">E-mail:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="name" class="form-control" id="email_show" disabled>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="email">Fecha inicio de convenio:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="date" class="form-control" id="inicioconvenio_show" disabled>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="email">Fecha termino de convenio:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="date" class="form-control" id="terminoconvenio_show" disabled>
                </div>
              </div>
            </form>
              <div class="modal-footer">
                <button type="button" class="btn btn-warning" data-dismiss="modal">
                  <span class='fa fa-remove'></span> Cerrar
                </button>
              </div>
			</div>
		</div>
	</div>
</div>

<!-- MODAL DE ACTUALIZAR -->
    <div class="modal fade" data-backdrop="static" data-keyboard="false" id="modificarModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close btn-modal close_dependencia cerrar_modal" data-dismiss="modal" aria-label="Close_dependencia">
              <span aria-hidden="true">&times;</span>
            </button>
            <h4 class="modal-title" id="miModalLabel">ACTUALIZAR</h4>
          </div>
          <div class="modal-body">
            <form class="form-horizontal" name="formModificar" id="formModificar" role="form">
              <?php echo e(csrf_field()); ?>

              <div class="form-group">
                <label class="control-label col-sm-2" for="id">ID:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="text" class="form-control" name="id_mod" id="id_mod" disabled>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="nombre">Nombre: <span class="required">*</span></label>
                <div class="col-sm-10 col-xs-12">
                  <textarea class="textarea form-control" name="nombre_mod" id="nombre_mod" cols="5" rows="2" ></textarea>
                  <div class="col-sm-10 col-xs-12" id="errorNombre" style="color: red"></div>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="titular">Titular: <span class="required">*</span></label>
                <div class="col-sm-10 col-xs-12">
                  <input type="name" class="form-control" name="titular_mod" id="titular_mod" >
                  <div class="col-sm-10 col-xs-12" id="errorTitular" style="color: red"></div>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="puesto">Cargo: <span class="required">*</span></label>
                <div class="col-sm-10 col-xs-12">
                  <input type="name" class="form-control" name="puesto_mod" id="puesto_mod" >
                  <div class="col-sm-10 col-xs-12" id="errorPuesto" style="color: red"></div>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="telefono">Teléfono:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="text" class="form-control" name="telefono_mod" id="telefono_mod" >
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="domicilio">Domicilio: <span class="required">*</span></label>
                <div class="col-sm-10 col-xs-12">
                  <textarea class="textarea form-control" name="domicilio_mod" id="domicilio_mod" cols="5" rows="2" ></textarea>
                  <div class="col-sm-10 col-xs-12" id="errorDomicilio" style="color: red"></div>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="email">E-mail:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="name" class="form-control" name="email_mod" id="email_mod" >
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="email">Fecha inicio de convenio:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="date" class="form-control" id="inicio_convenio" name="inicio_convenio" value="" onchange="javascript:suma_fecha();">
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-sm-2" for="email">Fecha termino de convenio:</label>
                <div class="col-sm-10 col-xs-12">
                  <input type="date" class="form-control" id="termino_convenio" name="termino_convenio" value="" readonly="">
                </div>
              </div>
            
              <div class="modal-footer">
                <button type="button" class="btn btn-warning cerrar_modal" id="close_dependencia" data-dismiss="modal">
                  <span class='fa fa-remove'></span> Cancelar
                </button>
                <button type="button" class="btn btn-actualizar btn-success" >
                  <span class='fa fa-edit'></span> Actualizar datos
                </button>
              </div>
            </form>
      </div>
    </div>
  </div>
</div>
