Commit dd222cdb2b3391b4eebec6b60597420eadbbd708
1 parent
b6cc0536a9
Exists in
master
creada la vista para mostrar la adscripcion enviada por el docente
Showing
3 changed files
with
398 additions
and
2 deletions
Show diff stats
app/Resources/views/solicitudes/adscripcion_show.twig
| ... | ... | @@ -0,0 +1,370 @@ |
| 1 | +{% extends 'base_app.html.twig' %} | |
| 2 | +{% block stylesheets %} | |
| 3 | + {{ parent() }} | |
| 4 | + <link href="{{ asset('assets/vendor/lightbox2/dist/css/lightbox.css') }}" rel="stylesheet"> | |
| 5 | + <style> | |
| 6 | + .wrapper { | |
| 7 | + width: 6.9rem; | |
| 8 | + height: 2rem; | |
| 9 | + position: relative; | |
| 10 | + margin: 0rem auto; | |
| 11 | + border-radius: 2rem; | |
| 12 | + background: gray; | |
| 13 | + } | |
| 14 | + | |
| 15 | + .wrapper .toggle { | |
| 16 | + width: 1.8rem; | |
| 17 | + height: 1.8rem; | |
| 18 | + position: absolute; | |
| 19 | + left: 2.5rem; | |
| 20 | + top: 0.1rem; | |
| 21 | + border-radius: 50%; | |
| 22 | + box-sizing: border-box; | |
| 23 | + border: 0.1rem solid #ff6c00; | |
| 24 | + background: #ff8933; | |
| 25 | + box-shadow: 0 0 0.2rem 0.1rem #ff6c00 inset, 0 0 0.2rem 0.1rem #ff6c00; | |
| 26 | + transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); | |
| 27 | + } | |
| 28 | + | |
| 29 | + .wrapper label { | |
| 30 | + cursor: pointer; | |
| 31 | + width: 2rem; | |
| 32 | + height: 2rem; | |
| 33 | + position: absolute; | |
| 34 | + margin: 0; | |
| 35 | + padding: 0; | |
| 36 | + z-index: 1; | |
| 37 | + display: inline-block; | |
| 38 | + text-align: center; | |
| 39 | + line-height: 2rem; | |
| 40 | + text-transform: uppercase; | |
| 41 | + font-family: FontAwesome; | |
| 42 | + font-style: normal; | |
| 43 | + font-weight: normal; | |
| 44 | + color: white; | |
| 45 | + | |
| 46 | + } | |
| 47 | + | |
| 48 | + .wrapper input { | |
| 49 | + position: absolute; | |
| 50 | + left: 0; | |
| 51 | + margin: 0; | |
| 52 | + padding: 0; | |
| 53 | + opacity: 0; | |
| 54 | + } | |
| 55 | + | |
| 56 | + .yes_radio:checked ~ .toggle { | |
| 57 | + border: 0.1rem solid #008000; | |
| 58 | + background: #00b300; | |
| 59 | + box-shadow: 0 0 0.2rem 0.1rem #008000 inset, 0 0 0.2rem 0.1rem #008000; | |
| 60 | + left: 0.1rem; | |
| 61 | + } | |
| 62 | + | |
| 63 | + .no_radio:checked { | |
| 64 | + background: red; | |
| 65 | + } | |
| 66 | + | |
| 67 | + .no_radio:checked ~ .toggle { | |
| 68 | + border: 0.1rem solid #ff0000; | |
| 69 | + background: #ff3333; | |
| 70 | + box-shadow: 0 0 0.2rem 0.1rem #ff0000 inset, 0 0 0.2rem 0.1rem #ff0000; | |
| 71 | + left: 4.97rem; | |
| 72 | + } | |
| 73 | + | |
| 74 | + .maybe_radio, .maybe-lbl { | |
| 75 | + left: 33.33333%; | |
| 76 | + } | |
| 77 | + | |
| 78 | + .no_radio, .no-lbl { | |
| 79 | + left: 66.66667%; | |
| 80 | + } | |
| 81 | + | |
| 82 | + .maybe-lbl { | |
| 83 | + -webkit-animation-delay: 2s; | |
| 84 | + -o-animation-delay: 2s; | |
| 85 | + -moz-animation-delay: 2s; | |
| 86 | + animation-delay: 2s; | |
| 87 | + } | |
| 88 | + | |
| 89 | + .no-lbl { | |
| 90 | + -webkit-animation-delay: 4s; | |
| 91 | + -o-animation-delay: 4s; | |
| 92 | + -moz-animation-delay: 4s; | |
| 93 | + animation-delay: 4s; | |
| 94 | + } | |
| 95 | + | |
| 96 | + | |
| 97 | + </style> | |
| 98 | +{% endblock %} | |
| 99 | + | |
| 100 | +{% block body %} | |
| 101 | + | |
| 102 | + <div class="content-wrapper"> | |
| 103 | + <div class="container"> | |
| 104 | + {% for message in app.session.flashBag.get('notice') %} | |
| 105 | + <h4 class="alert alert-success">{{ message }}</h4> | |
| 106 | + | |
| 107 | + {% endfor %} | |
| 108 | + <div class="row"> | |
| 109 | + <div class="col-md-9"> | |
| 110 | + <h4 class="page-head-line">Solicitud de Adscripción número | |
| 111 | + <code>CEA-{{ todo.idInstitucion.idEjeParroquia.IdEje.abreviacion }}-{{ todo.adscripcion.anoAdscripcion }}-{{ todo.adscripcion.correlativoAdscripcion }}</code>: | |
| 112 | + {{ todo }} | |
| 113 | + </h4> | |
| 114 | + </div> | |
| 115 | + <div class="col-md-3"> | |
| 116 | + {% if servicio.idEstatus.id == 1 %} | |
| 117 | + <h4 class="alert alert-success">Estatus <strong>{{ servicio.idEstatus }}</strong> </h4> | |
| 118 | + <small>Activo desde: {{ servicio.fechaUltimaActualizacion | date("d-m-Y h:i:s") }}</small> | |
| 119 | + {% elseif servicio.idEstatus.id == 3 %} | |
| 120 | + <h4 class="alert alert-danger">Estatus <strong>{{ servicio.idEstatus }}</strong></h4> | |
| 121 | + {% else %} | |
| 122 | + <h4 class="alert alert-warning">Estatus <strong>{{ servicio.idEstatus }}</strong></h4> | |
| 123 | + {% endif %} | |
| 124 | + | |
| 125 | + </div> | |
| 126 | + | |
| 127 | + </div> | |
| 128 | + <form action="{{ path('cea_solicitudes_actualizar', { 'id': todo.adscripcion.id}) }}" method="POST" | |
| 129 | + name="rechazar"> | |
| 130 | + <div class="row"> | |
| 131 | + | |
| 132 | + <div class="col-md-6"> | |
| 133 | + | |
| 134 | + <div class="col-md-4"> | |
| 135 | + <img src="{{ asset('bundles/framework/images/portal/logo_ubv.png') }}"/> | |
| 136 | + </div> | |
| 137 | + | |
| 138 | + <div class="col-md-8"> | |
| 139 | + | |
| 140 | + | |
| 141 | + <div class="form-group"> | |
| 142 | + <label for="username">Fecha de Ingreso UBV:</label> | |
| 143 | + <input type="date" class="form-control" id="username" name="primerApellido" | |
| 144 | + value="{{ todo.adscripcion.fechaIngreso|date('Y-m-d') }}"/> | |
| 145 | + </div> | |
| 146 | + {% if todo.escalafones is not null %} | |
| 147 | + <div class="form-group"> | |
| 148 | + <label for="Escalafones">Escalafones:</label> | |
| 149 | + <table class="table table-striped table-bordered"> | |
| 150 | + <th>Escalafón</th> | |
| 151 | + <th>Fecha</th> | |
| 152 | + <th>Tipo</th> | |
| 153 | + {% for escala in todo.escalafones %} | |
| 154 | + | |
| 155 | + <tr> | |
| 156 | + <td>{{ escala.idEscala }}</td> | |
| 157 | + <td>{{ escala.fechaEscala | date('d-m-Y') }}</td> | |
| 158 | + <td>{{ escala.idTipoEscala }}</td> | |
| 159 | + </tr> | |
| 160 | + {% endfor %} | |
| 161 | + </table> | |
| 162 | + | |
| 163 | + {% if todo.escalafones is empty %} | |
| 164 | + <div class="form-group"> | |
| 165 | + <h6 class="alert alert-warning">El Docente al momento de la solicitud | |
| 166 | + informa no | |
| 167 | + haber realizado Concurso de oposición</h6> | |
| 168 | + </div> | |
| 169 | + <!-- <button class="btn btn-success btn-sm">Añadir Concurso de Oposición</button> --> | |
| 170 | + {% endif %} | |
| 171 | + | |
| 172 | + | |
| 173 | + </div> | |
| 174 | + {% endif %} | |
| 175 | + | |
| 176 | + | |
| 177 | + {% if todo.adscripcion.idLineaInvestigacion is not null %} | |
| 178 | + <div class="form-group"> | |
| 179 | + <label for="username">Area y Línea de Investigación:</label> | |
| 180 | + <ul> | |
| 181 | + <li>{{ todo.adscripcion.idLineaInvestigacion.idAreaInvestigacion }}</li> | |
| 182 | + <li>{{ todo.adscripcion.idLineaInvestigacion }}</li> | |
| 183 | + </ul> | |
| 184 | + </div> | |
| 185 | + {% endif %} | |
| 186 | + | |
| 187 | + | |
| 188 | + {% if todo.adscripcion.tituloTrabajo is not null %} | |
| 189 | + <div class="form-group"> | |
| 190 | + <label for="titulo">Título del Trabajo:</label> | |
| 191 | + <input type="text" class="form-control" | |
| 192 | + value="{{ todo.adscripcion.tituloTrabajo }}"/> | |
| 193 | + </div> | |
| 194 | + {% endif %} | |
| 195 | + | |
| 196 | + </div> | |
| 197 | + </div> | |
| 198 | + <div class="col-md-5"> | |
| 199 | + <h3>Documentos Consignados</h3> | |
| 200 | + | |
| 201 | + <div class="widget-content"> | |
| 202 | + | |
| 203 | + {% for verificado in todo.documentosVerificados %} | |
| 204 | + {% if verificado.idServicio.id == servicio.id %} | |
| 205 | + {% set extension = verificado.ubicacion | split('.') | last %} | |
| 206 | + <div {% if extension != "pdf" %}class="col-xs-6"{% else %}class="col-xs-12"{% endif %}> | |
| 207 | + | |
| 208 | + <div class="thumbnail"> | |
| 209 | + {% if extension == "pdf" %} | |
| 210 | + {% if verificado.idTipoDocumentos.id <= 4 %} | |
| 211 | + <object type="application/pdf" data="{{asset('uploads/adscripcion/'~ verificado.ubicacion)}}" width="100%" height="300px"></object> | |
| 212 | + {% else %} | |
| 213 | + <object type="application/pdf" data="{{asset('uploads/ascenso/'~ verificado.ubicacion)}}" width="100%" height="300px"></object> | |
| 214 | + {% endif %} | |
| 215 | + {% else %} | |
| 216 | + {% if verificado.idTipoDocumentos.id <= 4 %} | |
| 217 | + <a href="{{ asset('uploads/adscripcion/'~ verificado.ubicacion) }}" | |
| 218 | + data-lightbox="adscripcion"> | |
| 219 | + <img src="{{ asset('uploads/adscripcion/thumb/'~ verificado.ubicacion) }}"/> | |
| 220 | + </a> | |
| 221 | + {% else %} | |
| 222 | + <a href="{{ asset('uploads/ascenso/'~ verificado.ubicacion) }}" | |
| 223 | + data-lightbox="adscripcion"> | |
| 224 | + <img src="{{ asset('uploads/ascenso/thumb/'~ verificado.ubicacion) }}"/> | |
| 225 | + </a> | |
| 226 | + {% endif %} | |
| 227 | + {% endif %} | |
| 228 | + | |
| 229 | + <div class="caption"> | |
| 230 | + <p>{{ verificado.idTipoDocumentos.nombre }}</p> | |
| 231 | + {% if verificado.idEstatus.id == 2 or verificado.idEstatus.id == 3 %} | |
| 232 | + <div class="wrapper"> | |
| 233 | + <label for="yes_radio{{ loop.index }}" class="yes-lbl"><i class="fa fa-check"></i> | |
| 234 | + </label> | |
| 235 | + <input type="radio" value="1" name="{{ verificado.idTipoDocumentos.identificador }}" class="yes_radio" id="yes_radio{{ loop.index }}" {% if verificado.idEstatus.id == 1 %} checked="checked" {% endif %}> | |
| 236 | + <label for="maybe_radio{{ loop.index }}" class="maybe-lbl"> | |
| 237 | + <i class="fa fa-question"></i> | |
| 238 | + </label> | |
| 239 | + <input type="radio" value="" name="{{ verificado.idTipoDocumentos.identificador }}" class="maybe_radio" id="maybe_radio{{ loop.index }}" {% if verificado.idEstatus.id == 2 %} checked="checked" {% endif %} disabled> | |
| 240 | + <label for="no_radio{{ loop.index }}" class="no-lbl"><i | |
| 241 | + class="fa fa-close"></i></label><input type="radio" value="3" | |
| 242 | + name="{{ verificado.idTipoDocumentos.identificador }}" | |
| 243 | + class="no_radio" | |
| 244 | + id="no_radio{{ loop.index }}" {% if verificado.idEstatus.id == 3 %} checked="checked" {% endif %}> | |
| 245 | + | |
| 246 | + <div class="toggle"></div> | |
| 247 | + </div> | |
| 248 | + {% endif %} | |
| 249 | + </div> | |
| 250 | + {% endif %} | |
| 251 | + </div> | |
| 252 | + | |
| 253 | + </div> | |
| 254 | + | |
| 255 | + {% endfor %} | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + </div> | |
| 263 | + </div> | |
| 264 | + | |
| 265 | + | |
| 266 | + </div> | |
| 267 | + | |
| 268 | + <!-- MOSTRAR ACTIVIDAD PIDA DEL DOCENTE --> | |
| 269 | + {% if not todo.pida %} | |
| 270 | + <p class="alert alert-warning">El Docente no ha registrado todavía su actividad PIDA</p> | |
| 271 | + {% else %} | |
| 272 | + <div class="form-group"> | |
| 273 | + <label for="pida">PIDA:</label> | |
| 274 | + {% for pida in todo.pida %} | |
| 275 | + <ul> | |
| 276 | + <li>Objetivo Estratégico: {{ pida.idPlanHistoricoNacionalEstrategico.nombre }}</li> | |
| 277 | + <li>Ámbito: {{ pida.idActividadDocente.nombre }}</li> | |
| 278 | + <li>Objetivo Específico: {{ pida.ObjetivoEspecifico }}</li> | |
| 279 | + <li>Fecha inicio: {{ pida.fechaInicio | date('d-m-Y') }} </li> | |
| 280 | + <li>Fecha final: {{ pida.fechaFinal | date('d-m-Y') }} </li> | |
| 281 | + | |
| 282 | + </ul> | |
| 283 | + {% endfor %} | |
| 284 | + | |
| 285 | + </div> | |
| 286 | + {% endif %} | |
| 287 | + {% if servicio.idEstatus.id == 3 %} | |
| 288 | + <button type="submit" class="btn btn-success" id="aprobar" name="aprobar">Aprobar</button> | |
| 289 | + {% elseif servicio.idEstatus.id == 2 %} | |
| 290 | + <button type="submit" class="btn btn-success" id="aprobar" name="aprobar">Aprobar</button> | |
| 291 | + <a data-toggle="modal" data-target="#motivo_rechazo" class="btn btn-danger">Rechazar</a> | |
| 292 | + {% endif %} | |
| 293 | + | |
| 294 | + | |
| 295 | + <!-- Modal --> | |
| 296 | + <div class="modal fade" id="motivo_rechazo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
| 297 | + <div class="modal-dialog" role="document"> | |
| 298 | + | |
| 299 | + <div class="modal-content"> | |
| 300 | + <div class="modal-header"> | |
| 301 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span | |
| 302 | + aria-hidden="true">×</span></button> | |
| 303 | + <h4 class="modal-title" id="myModalLabel">Rechazo de Solicitud</h4> | |
| 304 | + </div> | |
| 305 | + | |
| 306 | + <div class="modal-body"> | |
| 307 | + | |
| 308 | + | |
| 309 | + <div class="form-group"> | |
| 310 | + <label for="message-text" class="control-label">Mensaje:</label> | |
| 311 | + <textarea class="form-control" id="message-text" name="message-text"></textarea> | |
| 312 | + </div> | |
| 313 | + | |
| 314 | + </div> | |
| 315 | + <div class="modal-footer"> | |
| 316 | + <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |
| 317 | + <button type="submit" class="btn btn-primary" name="rechazar" id="rechazar">Enviar | |
| 318 | + Correo | |
| 319 | + </button> | |
| 320 | + </div> | |
| 321 | + </div> | |
| 322 | + | |
| 323 | + </div> | |
| 324 | + </div> | |
| 325 | + </div> | |
| 326 | + | |
| 327 | + </div> | |
| 328 | + </form> | |
| 329 | +{% endblock %} | |
| 330 | + | |
| 331 | + | |
| 332 | +{% block javascripts %} | |
| 333 | + {{ parent() }} | |
| 334 | + <script type="text/javascript" src="{{ asset('assets/vendor/lightbox2/dist/js/lightbox.min.js') }}"></script> | |
| 335 | + <script> | |
| 336 | + | |
| 337 | + var buttonpressed; | |
| 338 | + $('#aprobar').click(function() { | |
| 339 | + buttonpressed = $(this).attr('name') | |
| 340 | + }); | |
| 341 | + | |
| 342 | + $('#rechazar').click(function() { | |
| 343 | + buttonpressed = $(this).attr('name') | |
| 344 | + }); | |
| 345 | + | |
| 346 | + $('form').submit(function() { | |
| 347 | + console.log($(':radio:checked', this).length); | |
| 348 | + for (var i = 0; i < $(':radio:checked', this).length; i ++){ | |
| 349 | + console.log($(':radio:checked', this)[i]); | |
| 350 | + if ( ($(':radio:checked', this)[i].value == "")) { | |
| 351 | + alert('Debes revisar todos los documentos para poder enviar la solicitud!'); | |
| 352 | + return false; | |
| 353 | + } | |
| 354 | + | |
| 355 | + } | |
| 356 | + console.log($("input[type=submit][clicked=true]").val()); | |
| 357 | + if (buttonpressed == "aprobar") { | |
| 358 | + for (var i = 0; i < $(':radio:checked', this).length; i++) { | |
| 359 | + console.log($(':radio:checked', this)[i]); | |
| 360 | + if (($(':radio:checked', this)[i].value == "3")) { | |
| 361 | + alert('No puedes aprobar una solicitud con documentos en estatus de rechazado'); | |
| 362 | + return false; | |
| 363 | + } | |
| 364 | + | |
| 365 | + } | |
| 366 | + } | |
| 367 | + | |
| 368 | + }); | |
| 369 | + </script> | |
| 370 | +{% endblock %} | |
| 0 | 371 | \ No newline at end of file | ... | ... |
app/Resources/views/solicitudes/index.html.twig
| ... | ... | @@ -45,8 +45,11 @@ |
| 45 | 45 | <!-- solo imprime el servicio si está activo --> |
| 46 | 46 | {%if servicio.idServicioCe.id == 1 and servicio.idEstatus.id == 1 %} |
| 47 | 47 | <a href="{{ path('servicio_antiguedad_imprimir', { 'id': servicio.id }) }}" target="_blank" class="btn btn-xs btn-info"><i class="fa fa-print"> </i></a> |
| 48 | - {% elseif servicio.idServicioCe.id == 2 and servicio.idEstatus.id == 1 %} | |
| 49 | - <a href="{{ path('servicio_adscripcion_imprimir', { 'id': servicio.id }) }}" target="_blank" class="btn btn-xs btn-info"><i class="fa fa-print"> </i></a> | |
| 48 | + {% elseif servicio.idServicioCe.id == 2 %} | |
| 49 | + {% if servicio.idEstatus.id == 1 %} | |
| 50 | + <a href="{{ path('servicio_adscripcion_imprimir', { 'id': servicio.id }) }}" target="_blank" class="btn btn-xs btn-info"><i class="fa fa-print"> </i></a> | |
| 51 | + {% endif %} | |
| 52 | + <a href="{{ path('adscripcion_show', { 'id': servicio.id }) }}" class="btn btn-xs btn-info"><i class="fa fa-eye"> </i></a> | |
| 50 | 53 | {%endif%} |
| 51 | 54 | </td> |
| 52 | 55 | </tr> | ... | ... |
src/AppBundle/Controller/AdscripcionController.php
| ... | ... | @@ -571,6 +571,29 @@ class AdscripcionController extends Controller |
| 571 | 571 | 'todo' => $todo |
| 572 | 572 | )); |
| 573 | 573 | } |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + /** | |
| 578 | + * Encuentra y muestra una entidad de tipo Adscripción para los docentes. | |
| 579 | + * | |
| 580 | + * @Route("/adscripcion_show/{id}", name="adscripcion_show") | |
| 581 | + * @Method("GET") | |
| 582 | + * | |
| 583 | + */ | |
| 584 | + public function adscripcionShowAction(DocenteServicio $servicio) | |
| 585 | + { | |
| 586 | + $em = $this->getDoctrine()->getManager(); | |
| 587 | + $todo = $em->getRepository("AppBundle:RolInstitucion")->findOneById($servicio->getIdRolInstitucion()); | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + return $this->render('solicitudes/adscripcion_show.twig', array( | |
| 592 | + 'servicio' => $servicio, | |
| 593 | + 'servicio' => $servicio, | |
| 594 | + 'todo' => $todo | |
| 595 | + )); | |
| 596 | + } | |
| 574 | 597 | |
| 575 | 598 | |
| 576 | 599 | /** | ... | ... |