<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>Calendario - Listado <small></small></h2>

              <div class="clearfix"></div>

            </div>



            <div class="x_content">

              @if (count($calendarios)>0)

              <div class="container-fluid">

                    <div class="row encabezado">

                      @if (Session::get('dpto')==16)

                      <div class="col-xs col-sm-2"><p class="text-center"></p></div>

                      @endif

                      <div class="col-xs col-sm-2"><p class="text-center">No.</p></div>

                      <div class="col-xs col-sm-3"><p class="text-center">Periodo</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)

                  @foreach ($calendarios as $c)

                      @php ($numero++)

                        <div class="row renglon" id="{{ $c->id_cal }}">

                          @if (Session::get('dpto')==16)

                          <div class="col-xs col-sm-2 text-center" id="{{ $c->id_cal }}">

                            <button type="button" id="btnEliminar" class="btn btn-eliminar btn-danger btn-xs" data-toggle="modal" data-id4="{{$c->id_cal}}" onclick="eliminaCalendario({{ $c->id_cal }});" ><span class="fa fa-trash-o"></span></button>

                          </div>  



                          @endif                        

                          <div class="col-xs col-sm-2 text-center" id="num{{ $c->id_cal }}">{{ $numero }}</div>

            							<div class="col-xs col-sm-3" id="nombreDiv{{ $c->id_cal }}">{{ $c->periodo_cal }}</div>

            							<div class="col-xs col-sm-4" align="center" id="op{{ $c->id_cal }}">



                            <button type="button" id="btn-consultaCal" class="btn btn-consultaCal btn-turq btn-xs" data-toggle="modal" data-id1="{{$c->id_cal}}" ><span class="fa fa-eye"> </span>Consultar </button>

                            



                            <button type="button" id="btnDescargaCal" class="btn btn-descargaCal btn-primary btn-xs" data-toggle="modal" data-id3="{{$c->id_cal}}" ><span class="fa fa-download"> <a href="calendario/descargar/{{$c->id_cal}}" style="color: white"> </span>Descargar</a> </button>



                          </div>



                          <!-- Optional: clear the XS cols if their content doesn't match in height -->

                          <div class="clearfix visible-xs-block"></div>

                        </div>

        					@endforeach

              </div>

              @else

                <h4 align="center">No hay calendarios pendientes.</h4>

              @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 close" data-dismiss="modal" aria-label="Close">

              <span aria-hidden="true">&times;</span>

            </button>

            <h4 class="modal-title col-lg-10 col-sm-10 col-md-10 col-xs-10" id="miModalLabel">Información</h4>

          </div>

          <div class="modal-body">

            <div id="calendarioinfo"></div>

            <form class="form-horizontal" role="form">

            

            </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 CONSULTA -->

    <div class="modal fade" id="firmaModal" 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" data-dismiss="modal" aria-label="Close">

              <span aria-hidden="true">&times;</span>

            </button>

            <h4 class="modal-title col-lg-10 col-sm-10 col-md-10 col-xs-10" id="miModalLabel">Información</h4>

          </div>

          <div class="modal-body">

            <div id="calendariofirma"></div>

            <form class="form-horizontal" role="form">

            <input type="hidden" name="idCal" id="idCal">

            </form>

              <div class="modal-footer">

                <button type="button" class="btn btn-warning" data-dismiss="modal">

                  <span class='fa fa-remove'></span> Cerrar

                </button>

                <button type="button" id="btnFirma" class="btn btnFirma" data-dismiss="modal">

                  <span class='fa fa-qrcode'></span> Firmar Calendario

                </button>

              </div>

      </div>

    </div>

  </div>

</div>



<!-- MODAL DE ACTUALIZAR -->

    <div class="modal fade" 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" data-dismiss="modal" aria-label="Close">

              <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">

              {{ 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:</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>

              </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" name="titular_mod" id="titular_mod" >

                </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" name="puesto_mod" id="puesto_mod" >

                </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:</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>

              </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="modal-footer">

                <button type="button" class="btn btn-warning" data-dismiss="modal">

                  <span class='fa fa-remove'></span> Cancelar

                </button>

                <button type="button" class="btn btn-actualizar btn-success" data-dismiss="modal" >

                  <span class='fa fa-edit'></span> Actualizar datos

                </button>

              </div>

            </form>

      </div>

    </div>

  </div>

</div>

