Commit 8fcefe16c3bd62feeb0396d19e31586c205decc2
1 parent
3f805e5367
Exists in
master
validado y mejorada la solicitud de antiguedad
Showing
3 changed files
with
47 additions
and
20 deletions
Show diff stats
app/Resources/views/cea/servicios_mostar.html.twig
| @@ -113,13 +113,13 @@ | @@ -113,13 +113,13 @@ | ||
| 113 | </div> | 113 | </div> |
| 114 | <div class="col-md-3"> | 114 | <div class="col-md-3"> |
| 115 | {% if servicio.idEstatus.id == 1 %} | 115 | {% if servicio.idEstatus.id == 1 %} |
| 116 | - <h4 class="alert alert-success">Estatus <strong>{{servicio.idEstatus}}</strong> | 116 | + <h4 class="alert alert-success">Estatus <strong>{{servicio.idEstatus}}</strong></h4> |
| 117 | {% elseif servicio.idEstatus.id == 3 %} | 117 | {% elseif servicio.idEstatus.id == 3 %} |
| 118 | - <h4 class="alert alert-danger">Estatus <strong>{{servicio.idEstatus}}</strong> | 118 | + <h4 class="alert alert-danger">Estatus <strong>{{servicio.idEstatus}}</strong> </h4> |
| 119 | {% else %} | 119 | {% else %} |
| 120 | - <h4 class="alert alert-warning">Estatus <strong>{{servicio.idEstatus}}</strong> | 120 | + <h4 class="alert alert-warning">Estatus <strong>{{servicio.idEstatus}}</strong> </h4> |
| 121 | {% endif %} | 121 | {% endif %} |
| 122 | - </h4> | 122 | + |
| 123 | </div> | 123 | </div> |
| 124 | 124 | ||
| 125 | </div> | 125 | </div> |
| @@ -131,9 +131,7 @@ | @@ -131,9 +131,7 @@ | ||
| 131 | <img src="{{ asset('bundles/framework/images/portal/logo_ubv.png') }}" /> | 131 | <img src="{{ asset('bundles/framework/images/portal/logo_ubv.png') }}" /> |
| 132 | </div> | 132 | </div> |
| 133 | 133 | ||
| 134 | - <div class="col-md-8"> | ||
| 135 | - | ||
| 136 | - <form action="{{ path('login') }}" method="post" role="form" > | 134 | + <div class="col-md-8"> |
| 137 | 135 | ||
| 138 | <div class="form-group"> | 136 | <div class="form-group"> |
| 139 | <label for="username">Fecha de Solicitud:</label> | 137 | <label for="username">Fecha de Solicitud:</label> |
| @@ -166,12 +164,16 @@ | @@ -166,12 +164,16 @@ | ||
| 166 | </div> | 164 | </div> |
| 167 | 165 | ||
| 168 | 166 | ||
| 169 | - {% endif %} | ||
| 170 | - | ||
| 171 | - | 167 | + {% endif %} |
| 172 | 168 | ||
| 173 | - <a class="btn btn-success btn-sm" href="{{ path('cea_servicios_actualizar', { 'id': servicio.id, 'estatus' : 'true' }) }}" ><span class="fa fa-check"></span> Aprobar</a> | ||
| 174 | - <a class="btn btn-danger btn-sm" data-toggle="modal" data-target="#motivo_rechazo" ><span class="fa fa-close"></span> Rechazar</a> | 169 | + |
| 170 | + <form action="{{ path('cea_servicios_actualizar', { 'id': servicio.id, 'estatus' : 'true' }) }}" method="POST" name="aprobar"> | ||
| 171 | + {% if servicio.idEstatus.id == 3 %} | ||
| 172 | + <button class="btn btn-success btn-sm" type="submit" name="aprobado" id="aprobado" ><span class="fa fa-check" ></span> Aprobar</button> | ||
| 173 | + {% elseif servicio.idEstatus.id == 2 %} | ||
| 174 | + <button class="btn btn-success btn-sm" type="submit" name="aprobado" id="aprobado" ><span class="fa fa-check" ></span> Aprobar</button> | ||
| 175 | + <a id="modal_rechazo" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#motivo_rechazo" ><span class="fa fa-close"></span> Rechazar</a> | ||
| 176 | + {% endif %} | ||
| 175 | 177 | ||
| 176 | </form> | 178 | </form> |
| 177 | <!-- Modal --> | 179 | <!-- Modal --> |
| @@ -208,20 +210,27 @@ | @@ -208,20 +210,27 @@ | ||
| 208 | </div> | 210 | </div> |
| 209 | {% if servicio.idServicioCe.id == 1 %} | 211 | {% if servicio.idServicioCe.id == 1 %} |
| 210 | <div class="col-md-5"> | 212 | <div class="col-md-5"> |
| 211 | - <h3>Documentos Para confirmar</h3> | 213 | + <h3>Documentos Para confirmar</h3> |
| 212 | <div class="widget-content"> | 214 | <div class="widget-content"> |
| 213 | 215 | ||
| 214 | 216 | ||
| 215 | {% for documento in docente.documentosVerificados %} | 217 | {% for documento in docente.documentosVerificados %} |
| 216 | 218 | ||
| 217 | {% if documento.idTipoDocumentos.identificador == "trabajo" or documento.idTipoDocumentos.identificador == "oposicion" %} | 219 | {% if documento.idTipoDocumentos.identificador == "trabajo" or documento.idTipoDocumentos.identificador == "oposicion" %} |
| 218 | - <div class="col-xs-4"> | 220 | + {% set extension = documento.ubicacion | split('.') | last %} |
| 221 | + <div {% if extension != "pdf" %}class="col-xs-6"{% else %}class="col-xs-12"{% endif %}> | ||
| 219 | <div class="thumbnail"> | 222 | <div class="thumbnail"> |
| 220 | - <a href="{{asset('uploads/adscripcion/'~ documento.ubicacion)}}" data-lightbox="adscripcion"> | ||
| 221 | - <img src="{{ asset('uploads/adscripcion/thumb/'~ documento.ubicacion) }}" /> | ||
| 222 | - </a> | 223 | + |
| 224 | + {% if extension != "pdf" %} | ||
| 225 | + <a href="{{asset('uploads/adscripcion/'~ documento.ubicacion)}}" data-lightbox="trabajo"> | ||
| 226 | + <img src="{{ asset('uploads/adscripcion/thumb/'~ documento.ubicacion) }}" /> | ||
| 227 | + </a> | ||
| 228 | + {% else %} | ||
| 229 | + <object type="application/pdf" data="{{asset('uploads/adscripcion/'~ documento.ubicacion)}}" width="100%" height="300px"></object> | ||
| 230 | + {% endif %} | ||
| 223 | <div class="caption"> | 231 | <div class="caption"> |
| 224 | <p>{{ documento.idTipoDocumentos.nombre }}</p> | 232 | <p>{{ documento.idTipoDocumentos.nombre }}</p> |
| 233 | + {% if documento.idEstatus.id == 2 or documento.idEstatus.id == 3 %} | ||
| 225 | <div class="wrapper"> | 234 | <div class="wrapper"> |
| 226 | <label for="yes_radio{{ loop.index }}" class="yes-lbl"><i class="fa fa-check"></i> | 235 | <label for="yes_radio{{ loop.index }}" class="yes-lbl"><i class="fa fa-check"></i> |
| 227 | </label> | 236 | </label> |
| @@ -238,6 +247,7 @@ | @@ -238,6 +247,7 @@ | ||
| 238 | 247 | ||
| 239 | <div class="toggle"></div> | 248 | <div class="toggle"></div> |
| 240 | </div> | 249 | </div> |
| 250 | + {% endif %} | ||
| 241 | </div> | 251 | </div> |
| 242 | </div> | 252 | </div> |
| 243 | </div> | 253 | </div> |
| @@ -260,4 +270,20 @@ | @@ -260,4 +270,20 @@ | ||
| 260 | {% block javascripts %} | 270 | {% block javascripts %} |
| 261 | {{ parent() }} | 271 | {{ parent() }} |
| 262 | <script type="text/javascript" src="{{ asset('assets/vendor/lightbox2/dist/js/lightbox.min.js') }}"></script> | 272 | <script type="text/javascript" src="{{ asset('assets/vendor/lightbox2/dist/js/lightbox.min.js') }}"></script> |
| 273 | + <script> | ||
| 274 | + var buttonpressed; | ||
| 275 | + $('#aprobado').click(function() { | ||
| 276 | + //alert("click"); return false; | ||
| 277 | + buttonpressed = $(this).attr('name') | ||
| 278 | + }); | ||
| 279 | + | ||
| 280 | + $('#rechazar').click(function() { | ||
| 281 | + buttonpressed = $(this).attr('name') | ||
| 282 | + }); | ||
| 283 | + | ||
| 284 | + $('#motivo_rechazo').on('hidden.bs.modal', function (e) { | ||
| 285 | + $("#modal_rechazo").button('reset'); | ||
| 286 | + }) | ||
| 287 | + | ||
| 288 | + </script> | ||
| 263 | {% endblock %} | 289 | {% endblock %} |
| 264 | \ No newline at end of file | 290 | \ No newline at end of file |
app/Resources/views/cea/solicitudes_mostar.html.twig
| @@ -285,10 +285,10 @@ | @@ -285,10 +285,10 @@ | ||
| 285 | </div> | 285 | </div> |
| 286 | {% endif %} | 286 | {% endif %} |
| 287 | {% if servicio.idEstatus.id == 3 %} | 287 | {% if servicio.idEstatus.id == 3 %} |
| 288 | - <button type="submit" class="btn btn-success" id="aprobar" name="aprobar">Aprobar</button> | 288 | + <button type="submit" class="btn btn-success" data-loading-text = "<i class='fa fa-circle-o-notch fa-spin'></i> Procesando Solicitud..." id="aprobar" name="aprobar">Aprobar</button> |
| 289 | {% elseif servicio.idEstatus.id == 2 %} | 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> | 290 | + <button type="submit" class="btn btn-success" id="aprobar" name="aprobar" data-loading-text = "<i class='fa fa-circle-o-notch fa-spin'></i> Procesando Solicitud...">Aprobar</button> |
| 291 | + <a data-toggle="modal" data-target="#motivo_rechazo" class="btn btn-danger" data-loading-text = "<i class='fa fa-circle-o-notch fa-spin'></i> Procesando Solicitud...">Rechazar</a> | ||
| 292 | {% endif %} | 292 | {% endif %} |
| 293 | 293 | ||
| 294 | 294 |
src/AppBundle/Controller/AppController.php
| @@ -272,6 +272,7 @@ class AppController extends Controller { | @@ -272,6 +272,7 @@ class AppController extends Controller { | ||
| 272 | $ea = $this->getDoctrine()->getRepository('AppBundle:EstadoAcademico')->findOneByIdDocenteServicio($servicios); | 272 | $ea = $this->getDoctrine()->getRepository('AppBundle:EstadoAcademico')->findOneByIdDocenteServicio($servicios); |
| 273 | return $this->render('cea/servicios_mostar.html.twig', array( | 273 | return $this->render('cea/servicios_mostar.html.twig', array( |
| 274 | 'servicio' => $servicios, | 274 | 'servicio' => $servicios, |
| 275 | + 'docente' => $servicios->getIdRolInstitucion(), | ||
| 275 | 'oposicion' => $escala, | 276 | 'oposicion' => $escala, |
| 276 | 'adscripcion' => $adscripcion, | 277 | 'adscripcion' => $adscripcion, |
| 277 | 'estado_academico' => $ea | 278 | 'estado_academico' => $ea |