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 | 113 | </div> |
| 114 | 114 | <div class="col-md-3"> |
| 115 | 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 | 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 | 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 | 121 | {% endif %} |
| 122 | - </h4> | |
| 122 | + | |
| 123 | 123 | </div> |
| 124 | 124 | |
| 125 | 125 | </div> |
| ... | ... | @@ -131,9 +131,7 @@ |
| 131 | 131 | <img src="{{ asset('bundles/framework/images/portal/logo_ubv.png') }}" /> |
| 132 | 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 | 136 | <div class="form-group"> |
| 139 | 137 | <label for="username">Fecha de Solicitud:</label> |
| ... | ... | @@ -166,12 +164,16 @@ |
| 166 | 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 | 178 | </form> |
| 177 | 179 | <!-- Modal --> |
| ... | ... | @@ -208,20 +210,27 @@ |
| 208 | 210 | </div> |
| 209 | 211 | {% if servicio.idServicioCe.id == 1 %} |
| 210 | 212 | <div class="col-md-5"> |
| 211 | - <h3>Documentos Para confirmar</h3> | |
| 213 | + <h3>Documentos Para confirmar</h3> | |
| 212 | 214 | <div class="widget-content"> |
| 213 | 215 | |
| 214 | 216 | |
| 215 | 217 | {% for documento in docente.documentosVerificados %} |
| 216 | 218 | |
| 217 | 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 | 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 | 231 | <div class="caption"> |
| 224 | 232 | <p>{{ documento.idTipoDocumentos.nombre }}</p> |
| 233 | + {% if documento.idEstatus.id == 2 or documento.idEstatus.id == 3 %} | |
| 225 | 234 | <div class="wrapper"> |
| 226 | 235 | <label for="yes_radio{{ loop.index }}" class="yes-lbl"><i class="fa fa-check"></i> |
| 227 | 236 | </label> |
| ... | ... | @@ -238,6 +247,7 @@ |
| 238 | 247 | |
| 239 | 248 | <div class="toggle"></div> |
| 240 | 249 | </div> |
| 250 | + {% endif %} | |
| 241 | 251 | </div> |
| 242 | 252 | </div> |
| 243 | 253 | </div> |
| ... | ... | @@ -260,4 +270,20 @@ |
| 260 | 270 | {% block javascripts %} |
| 261 | 271 | {{ parent() }} |
| 262 | 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 | 289 | {% endblock %} |
| 264 | 290 | \ No newline at end of file | ... | ... |
app/Resources/views/cea/solicitudes_mostar.html.twig
| ... | ... | @@ -285,10 +285,10 @@ |
| 285 | 285 | </div> |
| 286 | 286 | {% endif %} |
| 287 | 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 | 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 | 292 | {% endif %} |
| 293 | 293 | |
| 294 | 294 | ... | ... |
src/AppBundle/Controller/AppController.php
| ... | ... | @@ -272,6 +272,7 @@ class AppController extends Controller { |
| 272 | 272 | $ea = $this->getDoctrine()->getRepository('AppBundle:EstadoAcademico')->findOneByIdDocenteServicio($servicios); |
| 273 | 273 | return $this->render('cea/servicios_mostar.html.twig', array( |
| 274 | 274 | 'servicio' => $servicios, |
| 275 | + 'docente' => $servicios->getIdRolInstitucion(), | |
| 275 | 276 | 'oposicion' => $escala, |
| 276 | 277 | 'adscripcion' => $adscripcion, |
| 277 | 278 | 'estado_academico' => $ea | ... | ... |