Commit 5f66c42d38694ab5bebe7452699073a91e3f6ab1
1 parent
5c39d4d7ec
Exists in
master
crea la solicitud de envio de acta de defensa
Showing
8 changed files
with
746 additions
and
11 deletions
Show diff stats
app/Resources/views/base_app.html.twig
... | ... | @@ -7,12 +7,11 @@ |
7 | 7 | <link rel="stylesheet" href="{{ asset('assets/vendor/bootstrap/dist/css/bootstrap.min.css') }}"> |
8 | 8 | <link rel="stylesheet" href="{{ asset('assets/vendor/font-awesome/css/font-awesome.css') }}"> |
9 | 9 | <link rel="stylesheet" href="{{ asset('assets/vendor/AppBundle/main.css') }}"> |
10 | - <link rel="stylesheet" href="{{ asset('assets/vendor/simple-line-icons/css/simple-line-icons.css') }}"> | |
11 | 10 | <style> |
12 | - .fade.in { | |
13 | - opacity: 0.8; | |
14 | - background-color:#398439; | |
15 | - } | |
11 | + .fade.in { | |
12 | + opacity: 0.8; | |
13 | + background-color:#398439; | |
14 | + } | |
16 | 15 | </style> |
17 | 16 | {% endblock %} |
18 | 17 | <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" /> |
... | ... | @@ -267,6 +266,7 @@ |
267 | 266 | <li><a href="{{ path('cea_solicitudes_estado_academico' ) }}">Estado Académico </a></li> |
268 | 267 | <li><a href="{{ path('cea_solicitudes_recocimiento_antiguedad') }}">Antiguedad</a></li> |
269 | 268 | <li><a href="{{ path('cea_solicitud_recocimiento_escala') }}">Reconocer Ascenso</a></li> |
269 | + <li><a href="{{ path('cea_solicitud_acta_defensa') }}">Acta Defensa</a></li> | |
270 | 270 | </ul> |
271 | 271 | </li> |
272 | 272 | {% else %} | ... | ... |
app/Resources/views/cea/acta_defensa_mostar.html.twig
... | ... | @@ -0,0 +1,488 @@ |
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 | + <link rel="stylesheet" href="{{ asset('assets/vendor/chosen/chosen.min.css') }}"> | |
6 | + <style> | |
7 | + .full { | |
8 | + width: 100%; | |
9 | + } | |
10 | + .wrapper { | |
11 | + width: 6.9rem; | |
12 | + height: 2rem; | |
13 | + position: relative; | |
14 | + margin: 0rem auto; | |
15 | + border-radius: 2rem; | |
16 | + background: gray; | |
17 | + } | |
18 | + | |
19 | + .wrapper .toggle { | |
20 | + width: 1.8rem; | |
21 | + height: 1.8rem; | |
22 | + position: absolute; | |
23 | + left: 2.5rem; | |
24 | + top: 0.1rem; | |
25 | + border-radius: 50%; | |
26 | + box-sizing: border-box; | |
27 | + border: 0.1rem solid #ff6c00; | |
28 | + background: #ff8933; | |
29 | + box-shadow: 0 0 0.2rem 0.1rem #ff6c00 inset, 0 0 0.2rem 0.1rem #ff6c00; | |
30 | + transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); | |
31 | + } | |
32 | + | |
33 | + .wrapper label { | |
34 | + cursor: pointer; | |
35 | + width: 2rem; | |
36 | + height: 2rem; | |
37 | + position: absolute; | |
38 | + margin: 0; | |
39 | + padding: 0; | |
40 | + z-index: 1; | |
41 | + display: inline-block; | |
42 | + text-align: center; | |
43 | + line-height: 2rem; | |
44 | + text-transform: uppercase; | |
45 | + font-family: FontAwesome; | |
46 | + font-style: normal; | |
47 | + font-weight: normal; | |
48 | + color: white; | |
49 | + | |
50 | + } | |
51 | + | |
52 | + .wrapper input { | |
53 | + position: absolute; | |
54 | + left: 0; | |
55 | + margin: 0; | |
56 | + padding: 0; | |
57 | + opacity: 0; | |
58 | + } | |
59 | + | |
60 | + .yes_radio:checked ~ .toggle { | |
61 | + border: 0.1rem solid #008000; | |
62 | + background: #00b300; | |
63 | + box-shadow: 0 0 0.2rem 0.1rem #008000 inset, 0 0 0.2rem 0.1rem #008000; | |
64 | + left: 0.1rem; | |
65 | + } | |
66 | + | |
67 | + .no_radio:checked { | |
68 | + background: red; | |
69 | + } | |
70 | + | |
71 | + .no_radio:checked ~ .toggle { | |
72 | + border: 0.1rem solid #ff0000; | |
73 | + background: #ff3333; | |
74 | + box-shadow: 0 0 0.2rem 0.1rem #ff0000 inset, 0 0 0.2rem 0.1rem #ff0000; | |
75 | + left: 4.97rem; | |
76 | + } | |
77 | + | |
78 | + .maybe_radio, .maybe-lbl { | |
79 | + left: 33.33333%; | |
80 | + } | |
81 | + | |
82 | + .no_radio, .no-lbl { | |
83 | + left: 66.66667%; | |
84 | + } | |
85 | + | |
86 | + .maybe-lbl { | |
87 | + -webkit-animation-delay: 2s; | |
88 | + -o-animation-delay: 2s; | |
89 | + -moz-animation-delay: 2s; | |
90 | + animation-delay: 2s; | |
91 | + } | |
92 | + | |
93 | + .no-lbl { | |
94 | + -webkit-animation-delay: 4s; | |
95 | + -o-animation-delay: 4s; | |
96 | + -moz-animation-delay: 4s; | |
97 | + animation-delay: 4s; | |
98 | + } | |
99 | + | |
100 | + | |
101 | + </style> | |
102 | +{% endblock %} | |
103 | + | |
104 | +{%block body %} | |
105 | + {% set cantidadJurado = 6 %} | |
106 | + <div class="content-wrapper"> | |
107 | + <div class="container"> | |
108 | + {% for message in app.session.flashBag.get('notice') %} | |
109 | + <h4 class="alert alert-success">{{ message }}</h4> | |
110 | + {%endfor %} | |
111 | + <div class="row"> | |
112 | + <div class="col-md-9"> | |
113 | + <h4 class="page-head-line">Solicitud de Ascenso número <code>{{ascenso.id}}</code>: | |
114 | + {{ docente }} | |
115 | + </h4> | |
116 | + </div> | |
117 | + <div class="col-md-3"> | |
118 | + {% if servicio.idEstatus.id == 1 %} | |
119 | + <h4 class="alert alert-success">Estatus <strong>{{servicio.idEstatus}}</strong></h4> | |
120 | + {% elseif servicio.idEstatus.id == 3 %} | |
121 | + <h4 class="alert alert-danger">Estatus <strong>{{servicio.idEstatus}}</strong> </h4> | |
122 | + {% else %} | |
123 | + <h4 class="alert alert-warning">Estatus <strong>{{servicio.idEstatus}}</strong></h4> | |
124 | + {% endif %} | |
125 | + | |
126 | + </div> | |
127 | + </div> | |
128 | + <div class="row"> | |
129 | + | |
130 | + <div class="col-md-6"> | |
131 | + | |
132 | + <div class="col-md-4"> | |
133 | + <img src="{{ asset('bundles/framework/images/portal/logo_ubv.png') }}" /> | |
134 | + </div> | |
135 | + | |
136 | + <div class="col-md-8"> | |
137 | + | |
138 | + | |
139 | + | |
140 | + | |
141 | + {% if escalas is not null %} | |
142 | + <div class="form-group"> | |
143 | + <label for="Escalafones">{{ cantidadJurado }}Escalafones Obtenidos:</label> | |
144 | + <table class="table table-striped table-bordered"> | |
145 | + <th>Escalafón</th> | |
146 | + <th>Fecha</th> | |
147 | + <th>Tipo</th> | |
148 | + {% for escala in escalas %} | |
149 | + | |
150 | + <tr> | |
151 | + <td>{{escala.idEscala }}</td> | |
152 | + <td>{{escala.fechaEscala | date('d-m-Y') }}</td> | |
153 | + <td>{{escala.idTipoEscala }}</td> | |
154 | + </tr> | |
155 | + {%endfor %} | |
156 | + </table> | |
157 | + | |
158 | + <p><strong>Escalafón Solicita:</strong> {{ ascenso.idEscalafones.nombre }} </p> | |
159 | + {% set anadirJurado = false %} | |
160 | + {% if (ascenso.tesisUbv or ascenso.tipoTrabajoInvestigacion == 'investigacion') %} | |
161 | + <h4>Jurados propuestos por el Docente</h4> | |
162 | + {% set anadirJurado = true %} | |
163 | + {% set cantidadJurado = 6 %} | |
164 | + <div id="seccion_jurados" class="well"> | |
165 | + <ul> | |
166 | + {% for tutor in ascenso.tutoresAscenso %} | |
167 | + {% if loop.length == 6 %} | |
168 | + {% set anadirJurado = false %} | |
169 | + {% else %} | |
170 | + {% set cantidadJurado = cantidadJurado - 1 %} | |
171 | + {% endif %} | |
172 | + | |
173 | + <li id="well_{{tutor.id}}"> | |
174 | + | |
175 | + <strong>{{ tutor.nombres }} {{ tutor.apellidos }}:</strong> | |
176 | + {{ tutor.institucion }} -> {{ tutor.idEscala.nombre }} | |
177 | + <input type="button" class="btn btn-warning btn-xs" value="act" id="actualizar_tutor"> | |
178 | + <input type="button" class="btn btn-danger btn-xs eliminar_jurado" value="X" id="{{ tutor.id }}"> | |
179 | + </li> | |
180 | + | |
181 | + {% endfor %} | |
182 | + </ul> | |
183 | + </div> | |
184 | + {% endif %} | |
185 | + {% if anadirJurado and ascenso.idEstatus.id == 2 %} | |
186 | + <p id="falta" class="label label-danger" data-faltaid = '{{cantidadJurado}}'> | |
187 | + El docente no tiene o le faltó completar posibles jurados | |
188 | + </p> | |
189 | + {% form_theme form 'bootstrap_3_layout.html.twig' %} | |
190 | + {{ form_start(form) }} | |
191 | + {{ form_widget(form) }} | |
192 | + {{ form_end(form) }} | |
193 | + <button class="btn btn-primary btn-sm" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Añadiendo..." id="anadirJurados">Añadir Jurados</button> | |
194 | + {% else %} | |
195 | + <p id="falta" class="label label-success" data-faltaid = '0'> | |
196 | + El docente completó los 6 Jurados Propuestos | |
197 | + </p> | |
198 | + {% form_theme form 'bootstrap_3_layout.html.twig' %} | |
199 | + {{ form_start(form) }} | |
200 | + {{ form_widget(form) }} | |
201 | + {{ form_end(form) }} | |
202 | + <button class="btn btn-primary btn-sm" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Añadiendo..." id="anadirJurados">Añadir Jurados</button> | |
203 | + {% endif %} | |
204 | + | |
205 | + | |
206 | + </div> | |
207 | + {% endif %} | |
208 | + | |
209 | + {% if antiguedad is not null %} | |
210 | + {% if antiguedad.idEstatus.id != 4 %} | |
211 | + <button class="alert alert-info"> El docente tiene una solicitud de antiguedad en estatus {{ antiguedad.idEstatus.nombre }} que no ha formalizado Todavía</button> | |
212 | + {% else %} | |
213 | + El Docente ya ha formalizado su Antiguedad ante la UBV | |
214 | + {% endif %} | |
215 | + {% endif %} | |
216 | + | |
217 | + {% if ascenso.tituloTrabajo is not null %} | |
218 | + <div class="form-group"> | |
219 | + <label for="titulo">Título del Trabajo:</label> | |
220 | + <input type="text" class="form-control" value="{{ascenso.tituloTrabajo}}" /> | |
221 | + <p><strong>Tipo de Trabajo de Ascneso:</strong> {{ ascenso.tipoTrabajoInvestigacion }} </p> | |
222 | + {% if ascenso.tipoTrabajoInvestigacion == 'tesis' %} | |
223 | + {% if ascenso.tesisUbv %} | |
224 | + <p>Debe tener informe de pertinencia debido a que | |
225 | + es una tesis fuera de UBV</p> | |
226 | + {% else %} | |
227 | + <p>La Tesis fue hecha dentro de UBV</p> | |
228 | + | |
229 | + {% endif %} | |
230 | + {% endif %} | |
231 | + </div> | |
232 | + {% endif %} | |
233 | + | |
234 | + </div> | |
235 | + </div> | |
236 | + <form action="{{ path('cea_ascenso_actualizar', { 'id': ascenso.id }) }}" method="POST"> | |
237 | + <div class="col-md-5"> | |
238 | + <h3>Documentos Consignados</h3> | |
239 | + <div class="widget-content"> | |
240 | + | |
241 | + | |
242 | + {% for documento in docente.documentosVerificados %} | |
243 | + {% if documento.idServicio.id == servicio.id %} | |
244 | + {% set extension = documento.ubicacion | split('.') | last %} | |
245 | + <div {% if extension != "pdf" %}class="col-xs-6"{% else %}class="col-xs-12"{% endif %}> | |
246 | + <div class="thumbnail"> | |
247 | + | |
248 | + {% if extension != "pdf" %} | |
249 | + <a href="{{asset('uploads/ascenso/'~ documento.ubicacion)}}" data-lightbox="trabajo"> | |
250 | + <img src="{{ asset('uploads/ascenso/thumb/'~ documento.ubicacion) }}" /> | |
251 | + </a> | |
252 | + {% else %} | |
253 | + <object type="application/pdf" data="{{asset('uploads/ascenso/'~ documento.ubicacion)}}" width="100%" height="300px"></object> | |
254 | + {% endif %} | |
255 | + <div class="caption"> | |
256 | + <p>{{ documento.idTipoDocumentos.nombre }}</p> | |
257 | + {% if documento.idEstatus.id == 2 or documento.idEstatus.id == 3 %} | |
258 | + <div class="wrapper"> | |
259 | + <label for="yes_radio{{ loop.index }}" class="yes-lbl"><i class="fa fa-check"></i> | |
260 | + </label> | |
261 | + <input type="radio" value="1" name="{{ documento.idTipoDocumentos.identificador }}" class="yes_radio" id="yes_radio{{ loop.index }}" {% if documento.idEstatus.id == 1 %} checked="checked" {% endif %}> | |
262 | + <label for="maybe_radio{{ loop.index }}" class="maybe-lbl"> | |
263 | + <i class="fa fa-question"></i> | |
264 | + </label> | |
265 | + <input type="radio" value="" name="{{ documento.idTipoDocumentos.identificador }}" class="maybe_radio" id="maybe_radio{{ loop.index }}" {% if documento.idEstatus.id == 2 %} checked="checked" {% endif %} disabled> | |
266 | + <label for="no_radio{{ loop.index }}" class="no-lbl"><i | |
267 | + class="fa fa-close"></i></label><input type="radio" value="3" | |
268 | + name="{{ documento.idTipoDocumentos.identificador }}" | |
269 | + class="no_radio" | |
270 | + id="no_radio{{ loop.index }}" {% if documento.idEstatus.id == 3 %} checked="checked" {% endif %}> | |
271 | + | |
272 | + <div class="toggle"></div> | |
273 | + </div> | |
274 | + {% endif %} | |
275 | + </div> | |
276 | + </div> | |
277 | + </div> | |
278 | + {% endif %} | |
279 | + {% endfor %} | |
280 | + | |
281 | + </div> | |
282 | + </div> | |
283 | + <!-- MOSTRAR ACTIVIDAD PIDA DEL DOCENTE --> | |
284 | + {% if not docente.pida %} | |
285 | + <p class="alert alert-warning">El Docente no ha registrado todavía su actividad PIDA</p> | |
286 | + {% else %} | |
287 | + <div class="col-md-12"> | |
288 | + <div class="account-container full register"> | |
289 | + <div class="content clearfix"> | |
290 | + <h2>PIDA <span class="small" style="float: right;"> Estatus: {{ servicioPida.idEstatus }}</span></h2> | |
291 | + <table class="table table-bordered"> | |
292 | + <th>Objetivo Histórico</th> | |
293 | + <th>Actividad Docente</th> | |
294 | + <th>Tarea Específica</th> | |
295 | + <th>Plazo</th> | |
296 | + <th>Estatus</th> | |
297 | + {% for pid in docente.pida | sort %} | |
298 | + {#solo muestre la vigente #} | |
299 | + {% if pid.idDocenteServicio.id == servicioPida.id %} | |
300 | + <tr> | |
301 | + <td rowspan="{{ pid.pidaTareaEspecifico | length }}"> | |
302 | + {{ pid.idPlanHistoricoNacionalEstrategico.nombre }} | |
303 | + </td> | |
304 | + <td rowspan="{{ pid.pidaTareaEspecifico | length }}"> | |
305 | + {{ pid.idActividadDocente.nombre }} | |
306 | + </td> | |
307 | + | |
308 | + {% for tarea in pid.pidaTareaEspecifico | sort %} | |
309 | + <td>{{ tarea.pidaTareaEspecifico }} | |
310 | + </td> | |
311 | + <td>{{ tarea.idPidaPlazo }}</td> | |
312 | + <td> | |
313 | + {{ tarea.idPidaEstatus }} | |
314 | + </td> | |
315 | + | |
316 | + </tr> | |
317 | + {% endfor %} | |
318 | + | |
319 | + </tr> | |
320 | + {% endif %} | |
321 | + {% endfor %} | |
322 | + </table> | |
323 | + </div> | |
324 | + </div> | |
325 | + </div> | |
326 | + {% endif %} | |
327 | + | |
328 | + | |
329 | + | |
330 | + <!-- Modal --> | |
331 | + | |
332 | + </div> | |
333 | + | |
334 | + <div class="modal fade" id="motivo_rechazo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
335 | + <div class="modal-dialog" role="document"> | |
336 | + <div class="modal-content"> | |
337 | + <div class="modal-header"> | |
338 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
339 | + <h4 class="modal-title" id="myModalLabel">Rechazo de Solicitud</h4> | |
340 | + </div> | |
341 | + | |
342 | + <div class="modal-body"> | |
343 | + | |
344 | + | |
345 | + <div class="form-group"> | |
346 | + <label for="message-text" class="control-label">Mensaje:</label> | |
347 | + <textarea class="form-control" id="message-text" name="message-text"></textarea> | |
348 | + </div> | |
349 | + | |
350 | + </div> | |
351 | + <div class="modal-footer"> | |
352 | + <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |
353 | + <button type="submit" name="rechazar" id="rechazar" class="btn btn-primary">Enviar Rechazo</button> | |
354 | + </div> | |
355 | + </div> | |
356 | + | |
357 | + </div> | |
358 | + </div> | |
359 | + {% if servicio.idEstatus.id == 3 %} | |
360 | + <button class="btn btn-success btn-sm" type="submit" name="aprobado" id="aprobado" ><span class="fa fa-check" ></span> Aprobar</button> | |
361 | + {% elseif servicio.idEstatus.id == 2 %} | |
362 | + <button class="btn btn-success btn-sm" type="submit" name="aprobado" id="aprobado" ><span class="fa fa-check" ></span> Aprobar</button> | |
363 | + <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> | |
364 | + {% endif %} | |
365 | + </form> | |
366 | + </div> | |
367 | + | |
368 | + | |
369 | + </div> | |
370 | +{% endblock %} | |
371 | + | |
372 | + | |
373 | +{% block javascripts %} | |
374 | + {{ parent() }} | |
375 | + <script type="text/javascript" src="{{ asset('assets/vendor/chosen/chosen.jquery.min.js') }}"></script> | |
376 | + <script type="text/javascript" src="{{ asset('assets/vendor/lightbox2/dist/js/lightbox.min.js') }}"></script> | |
377 | + | |
378 | + <script> | |
379 | + var cantidad = $("#falta").data('faltaid'); | |
380 | + $("#seccion_jurados").on("click", ".eliminar_jurado", function(){ | |
381 | + var eliminado = $(this).attr('id'); | |
382 | + $.ajax({ | |
383 | + method: "POST", | |
384 | + url: "{{ url('ajax_eliminar_tutor') }}", | |
385 | + async: true, | |
386 | + cache: false, | |
387 | + data: ({ eliminar: eliminado, ascensoId: {{ ascenso.id }} }), | |
388 | + success: function (data) { | |
389 | + alert(cantidad); | |
390 | + console.log("esto es id: " + eliminado); | |
391 | + $("#well_" + eliminado).remove(); | |
392 | + cantidad = cantidad + 1; | |
393 | + $("#add_tutor_tutores_ascenso").chosen('destroy').chosen({ max_selected_options: cantidad }); | |
394 | + | |
395 | + }, | |
396 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | |
397 | + console.log(errorThrown); | |
398 | + | |
399 | + } | |
400 | + | |
401 | + }); | |
402 | + }); | |
403 | + | |
404 | + $("#aadd_tutor_tutores_ascenso").on("chosen:ready", function() { | |
405 | + $("#add_tutor_tutores_ascenso").chosen('destroy').chosen({ max_selected_options: 2 }); | |
406 | + }); | |
407 | + | |
408 | + | |
409 | + $("#add_tutor_tutores_ascenso").chosen({ | |
410 | + no_results_text: "<a data-toggle='modal' data-target='#buscarTutores' href='#'>Tutor no registrado, click aquí para registrar!</a>", | |
411 | + max_selected_options: cantidad | |
412 | + | |
413 | + }); | |
414 | + | |
415 | + | |
416 | + | |
417 | + $( "#anadirJurados" ).click(function() { | |
418 | + $.ajax({ | |
419 | + method: "POST", | |
420 | + url: "{{ url('ajax_adicionar_tutor') }}", | |
421 | + async: true, | |
422 | + cache: false, | |
423 | + data: ({ jurados: $("#add_tutor_tutores_ascenso").val(), ascensoId: {{ ascenso.id }} }), | |
424 | + success: function (data) { | |
425 | + console.log(data); | |
426 | + for (var i = 0; i < data.adicionar_nombres.length; i ++){ | |
427 | + $("#seccion_jurados").append( "<li id='well_" + data.jurados[i] + "'><strong>" + data.adicionar_nombres[i] + ":</strong>" + data.adicionar_institucion[i] + "<input type='button' class='btn btn-danger btn-xs' value='X' id='" + data.adicionar_id[i] + "'/></li>" ); | |
428 | + $("#" + data.jurados[i] ).addClass("eliminar_jurado"); | |
429 | + cantidad = cantidad - 1; | |
430 | + } | |
431 | + $("#add_tutor_tutores_ascenso").val(""); | |
432 | + $( "#anadirJurados" ).button('reset'); | |
433 | + | |
434 | + }, | |
435 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | |
436 | + console.log(errorThrown); | |
437 | + | |
438 | + } | |
439 | + | |
440 | + }); | |
441 | + }); | |
442 | + | |
443 | + var buttonpressed; | |
444 | + $('#aprobado').click(function() { | |
445 | + //alert("click"); return false; | |
446 | + buttonpressed = $(this).attr('name') | |
447 | + }); | |
448 | + | |
449 | + $('#rechazar').click(function() { | |
450 | + buttonpressed = $(this).attr('name') | |
451 | + }); | |
452 | + | |
453 | + | |
454 | + $('form').submit(function() { | |
455 | + console.log($(':radio:checked', this).length); | |
456 | + for (var i = 0; i < $(':radio:checked', this).length; i ++){ | |
457 | + console.log($(':radio:checked', this)[i]); | |
458 | + if ( ($(':radio:checked', this)[i].value == "")) { | |
459 | + alert('Debes revisar todos los documentos para poder enviar la solicitud!'); | |
460 | + $("#aprobado").button('reset'); | |
461 | + return false; | |
462 | + } | |
463 | + | |
464 | + } | |
465 | + | |
466 | + if (buttonpressed == "aprobado") { | |
467 | + for (var i = 0; i < $(':radio:checked', this).length; i++) { | |
468 | + console.log($(':radio:checked', this)[i]); | |
469 | + if (($(':radio:checked', this)[i].value == "3")) { | |
470 | + alert('No puedes aprobar una solicitud con documentos en estatus de rechazado'); | |
471 | + $("#aprobado").button('reset'); | |
472 | + return false; | |
473 | + } | |
474 | + | |
475 | + } | |
476 | + } | |
477 | + | |
478 | + | |
479 | + }); | |
480 | + | |
481 | + $('#motivo_rechazo').on('hidden.bs.modal', function (e) { | |
482 | + $("#modal_rechazo").button('reset'); | |
483 | + }) | |
484 | + | |
485 | + | |
486 | + </script> | |
487 | + | |
488 | + {% endblock %} | |
0 | 489 | \ No newline at end of file | ... | ... |
app/Resources/views/cea/ascenso_mostar.html.twig
app/Resources/views/cea/servicios.html.twig
... | ... | @@ -49,6 +49,8 @@ |
49 | 49 | <a href="{{ path('cea_ascenso_show', { 'id': servicio.id }) }}" class="btn btn-xs btn-info"><i class="fa fa-eye"> </i></a> |
50 | 50 | {% elseif servicio.idServicioCe.id == 6 %} |
51 | 51 | <a href="{{ path('cea_reconocimientoEscala_show', { 'id': servicio.id }) }}" class="btn btn-xs btn-info"><i class="fa fa-eye"> </i></a> |
52 | + {% elseif servicio.idServicioCe.id == 7 %} | |
53 | + <a href="{{ path('cea_acta_defensa_show', { 'id': servicio.id }) }}" class="btn btn-xs btn-info"><i class="fa fa-eye"> </i></a> | |
52 | 54 | {% endif %} |
53 | 55 | </td> |
54 | 56 | </tr> |
... | ... | @@ -82,6 +84,8 @@ |
82 | 84 | <a target="_blank" href="{{ path('ascenso_resumen', { 'id': servicio.id }) }}" class="btn btn-xs btn-warning"><i class="fa fa-print"> </i></a> |
83 | 85 | {% elseif servicio.idServicioCe.id == 6 %} |
84 | 86 | <a href="{{ path('cea_reconocimientoEscala_show', { 'id': servicio.id }) }}" class="btn btn-xs btn-info"><i class="fa fa-eye"> </i></a> |
87 | + {% elseif servicio.idServicioCe.id == 7 %} | |
88 | + <a href="{{ path('cea_acta_defensa_show', { 'id': servicio.id }) }}" class="btn btn-xs btn-info"><i class="fa fa-eye"> </i></a> | |
85 | 89 | {% endif %} |
86 | 90 | </td> |
87 | 91 | </tr> | ... | ... |
app/Resources/views/correos/actualizar_ascenso.html.twig
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | {% if estatus == "Rechazada" %} |
8 | 8 | <h3><strong>Motivo del Rechazo:</strong></h3> |
9 | 9 | <h4>{{ mensaje }}</h4> |
10 | - {% else if estatus == "Aprobado" %} | |
10 | + {% else %} | |
11 | 11 | <p> |
12 | 12 | Ahora que su solicitud ha sido aprobada, debe estar al tanto que al recibir la aprobación |
13 | 13 | por parte de concejo universitario aprobando los jurados y la fecha de defensa, debe subir | ... | ... |
app/Resources/views/solicitudes/acta_defensa.html.twig
... | ... | @@ -0,0 +1,27 @@ |
1 | +{% extends 'base_app.html.twig' %} | |
2 | + | |
3 | + | |
4 | +{% block body %} | |
5 | + <div class="container"> | |
6 | + <h4 class="alert alert-info"><i class="fa fa-info-circle"></i> | |
7 | + Estimado (a) Docente | |
8 | + <strong>{{app.user.idRolInstitucion.idRol.idPersona.primerNombre}} | |
9 | + {{app.user.idRolInstitucion.idRol.idPersona.primerApellido}}</strong>, | |
10 | + Aqui podra enviar el Digital de la resolución de Consejo Universitario. | |
11 | + | |
12 | + </h4> | |
13 | + | |
14 | + <div class="panel panel-white"> | |
15 | + <div class="panel-body clearfix"> | |
16 | + <h1>Enviar Resolución</h1> | |
17 | + <p>Por favor adjunte digital de la aprobación de Defensa a {{ tipo }} por parte de Consejo Universitario</p> | |
18 | + {% form_theme form 'bootstrap_3_layout.html.twig' %} | |
19 | + {{ form_start(form, {'attr': {'novalidate': 'novalidate'}}) }} | |
20 | + {{ form_widget(form) }} | |
21 | + {{ form_end(form) }} | |
22 | + </div> | |
23 | + | |
24 | + </div> | |
25 | + </div> | |
26 | + | |
27 | +{% endblock %} | ... | ... |
src/AppBundle/Controller/AscensoController.php
... | ... | @@ -354,12 +354,15 @@ class AscensoController extends Controller |
354 | 354 | |
355 | 355 | |
356 | 356 | //si ya tiene una solicitud en espera, enviarlo a la pagina de los servicios |
357 | - $solicitud = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy( | |
357 | + $solicitud = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy( | |
358 | 358 | array('idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), 'idServicioCe' => 5, 'idEstatus' => 1) |
359 | 359 | ); |
360 | 360 | |
361 | 361 | |
362 | - | |
362 | + if (!$solicitud){ | |
363 | + $this->addFlash('danger', 'Debe tener una solicitud de Ascenso Activa para poder utilizar este servicio'); | |
364 | + return $this->redirect($this->generateUrl('cea_index')); | |
365 | + } | |
363 | 366 | |
364 | 367 | $concurso = $this->getDoctrine()->getRepository('AppBundle:DocumentosVerificados')->findOneBy(array( |
365 | 368 | 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), |
... | ... | @@ -471,6 +474,98 @@ class AscensoController extends Controller |
471 | 474 | |
472 | 475 | |
473 | 476 | } |
477 | + | |
478 | + | |
479 | + | |
480 | + | |
481 | + | |
482 | + | |
483 | + | |
484 | + /** | |
485 | + * @Route("/solicitud/reconocimiento/acta_defensa", name="cea_solicitud_acta_defensa") | |
486 | + */ | |
487 | + public function actaDefensaAction(Request $request) | |
488 | + { | |
489 | + | |
490 | + | |
491 | + //si ya tiene una solicitud en espera, enviarlo a la pagina de los servicios | |
492 | + $solicitud = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy( | |
493 | + array('idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), 'idServicioCe' => 5, 'idEstatus' => 1) | |
494 | + ); | |
495 | + | |
496 | + | |
497 | + if (!$solicitud){ | |
498 | + $this->addFlash('danger', 'Debe tener una solicitud de Ascenso Activa para poder utilizar este servicio'); | |
499 | + return $this->redirect($this->generateUrl('cea_index')); | |
500 | + } | |
501 | + | |
502 | + | |
503 | + $solicitudAscenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy( | |
504 | + array( | |
505 | + 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), | |
506 | + 'idEstatus' => 1 | |
507 | + ) | |
508 | + ); | |
509 | + | |
510 | + | |
511 | + if(!$solicitudAscenso){ | |
512 | + $this->addFlash('danger', 'Estimado Docente, No posee ninguna solicitud de Ascenso Activa.'); | |
513 | + return $this->redirect($this->generateUrl('cea_index')); | |
514 | + } | |
515 | + | |
516 | + | |
517 | + $form = $this->createForm('AppBundle\Form\ActaDefensaType'); | |
518 | + | |
519 | + $form->handleRequest($request); | |
520 | + $em = $this->getDoctrine()->getManager(); | |
521 | + if ($form->isSubmitted() && $form->isValid()) { | |
522 | + //Crear la solicitud de Servicio | |
523 | + $servicios = new DocenteServicio(); | |
524 | + | |
525 | + $servicios->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | |
526 | + $servicios->setIdServicioCe($this->getDoctrine()->getRepository('AppBundle:ServiciosCe')->findOneById(7)); | |
527 | + $servicios->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:estatus')->findOneById(2)); | |
528 | + $em->persist($servicios); | |
529 | + $em->flush(); | |
530 | + | |
531 | + | |
532 | + $adscripcion = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findOneByIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | |
533 | + $constanciaActa = $form->get('acta')->getData(); | |
534 | + | |
535 | + $nombreActa = md5(uniqid()).'.'.$constanciaActa->guessExtension(); | |
536 | + | |
537 | + // Guardar el archivo y crear la miniatura de cada uno | |
538 | + | |
539 | + $constanciaActa->move( | |
540 | + $this->container->getParameter('ascenso_directory'), | |
541 | + $nombreActa | |
542 | + ); | |
543 | + thumbnail2($nombreActa, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory')); | |
544 | + verificar_documentos2($adscripcion->getIdRolInstitucion(),17,2,$em,$nombreActa, $servicios); | |
545 | + | |
546 | + $em->persist($adscripcion); | |
547 | + | |
548 | + $em->flush(); | |
549 | + $this->addFlash('success', 'Solicitud de verificar Acta de Defensa Registrada Satisfactoriamente'); | |
550 | + return $this->redirect($this->generateUrl('cea_index')); | |
551 | + } | |
552 | + | |
553 | + return $this->render( | |
554 | + 'solicitudes/acta_defensa.html.twig', | |
555 | + array( | |
556 | + 'form' => $form->createView(), | |
557 | + 'tipo' => 'Ascenso ' . $solicitudAscenso->getIdEscalafones()->getNombre() | |
558 | + ) | |
559 | + ); | |
560 | + | |
561 | + | |
562 | + | |
563 | + | |
564 | + | |
565 | + | |
566 | + } | |
567 | + | |
568 | + | |
474 | 569 | |
475 | 570 | |
476 | 571 | |
... | ... | @@ -647,6 +742,62 @@ class AscensoController extends Controller |
647 | 742 | |
648 | 743 | )); |
649 | 744 | } |
745 | + | |
746 | + | |
747 | + | |
748 | + | |
749 | + | |
750 | + /** | |
751 | + * Encuentra y muestra una entidad de tipo Adscripción. | |
752 | + * | |
753 | + * @Route("/acta_defensa/{id}", name="cea_acta_defensa_show") | |
754 | + * @Method({"GET", "POST"}) | |
755 | + * @Security("has_role('ROLE_COORDINADOR_REGIONAL')") | |
756 | + */ | |
757 | + public function actaDefensaShowAction(DocenteServicio $servicio, Request $request) | |
758 | + { | |
759 | + $docente = $this->getDoctrine()->getRepository("AppBundle:RolInstitucion")->findOneById($servicio->getIdRolInstitucion()->getId()); | |
760 | + $escala = $this->getDoctrine()->getRepository('AppBundle:DocenteEscala')->findBy(array( | |
761 | + 'idRolInstitucion' => $servicio->getIdRolInstitucion()->getId() | |
762 | + )); | |
763 | + | |
764 | + $ascenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy(array( | |
765 | + 'idRolInstitucion' => $servicio->getIdRolInstitucion(), | |
766 | + 'idEstatus' => 2 | |
767 | + )); | |
768 | + | |
769 | + if(!$ascenso){ | |
770 | + $ascenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy(array( | |
771 | + 'idRolInstitucion' => $servicio->getIdRolInstitucion()), | |
772 | + array('id' => 'DESC') | |
773 | + ); | |
774 | + } | |
775 | + | |
776 | + $servicioPida = $this->getDoctrine()->getRepository("AppBundle:DocenteServicio")->findOneBy(array( | |
777 | + 'idRolInstitucion' => $docente, | |
778 | + 'idServicioCe' => 4), | |
779 | + array('id' => 'DESC') | |
780 | + ); | |
781 | + //$pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($servicio->getIdRolInstitucion()); | |
782 | + $antiguedad = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy(array( | |
783 | + 'idRolInstitucion' => $servicio->getIdRolInstitucion(), | |
784 | + 'idServicioCe' => 1 | |
785 | + )); | |
786 | + | |
787 | + $form = $this->createForm('AppBundle\Form\AddTutorType'); | |
788 | + | |
789 | + return $this->render('cea/acta_defensa_mostar.html.twig', array( | |
790 | + 'ascenso' => $ascenso, | |
791 | + 'servicio' => $servicio, | |
792 | + 'escalas' => $escala, | |
793 | + 'servicioPida' => $servicioPida, | |
794 | + 'antiguedad' => $antiguedad, | |
795 | + 'form' => $form->createView(), | |
796 | + 'docente' => $docente | |
797 | + )); | |
798 | + | |
799 | + | |
800 | + } | |
650 | 801 | |
651 | 802 | |
652 | 803 | /** |
... | ... | @@ -731,7 +882,7 @@ class AscensoController extends Controller |
731 | 882 | $this->addFlash('notice', 'Solicitud Actualizada Correctamente, hemos enviado un correo al docente notificandole los cambios.'); |
732 | 883 | |
733 | 884 | |
734 | - return $this->redirect($this->generateUrl('cea_ascenso_show', array('id' => $ascenso->getId()))); | |
885 | + return $this->redirect($this->generateUrl('cea_ascenso_show', array('id' => $serviciosAscenso->getId()))); | |
735 | 886 | |
736 | 887 | } |
737 | 888 | ... | ... |
src/AppBundle/Form/ActaDefensaType.php
... | ... | @@ -0,0 +1,65 @@ |
1 | +<?php | |
2 | +/** | |
3 | + * Created by Netbeans. | |
4 | + * User: Wilmer Ramones | |
5 | + * Date: 29/06/16 | |
6 | + * Time: 09:07 AM | |
7 | + * Modificado: 07/07/2016 | |
8 | + */ | |
9 | + | |
10 | +namespace AppBundle\Form; | |
11 | + | |
12 | +use Symfony\Component\Form\AbstractType; | |
13 | +use Symfony\Component\Form\FormBuilderInterface; | |
14 | +use Symfony\Component\OptionsResolver\OptionsResolver; | |
15 | +use Symfony\Component\Form\Extension\Core\Type\SubmitType; | |
16 | + | |
17 | +use Symfony\Component\Validator\Constraints\File; | |
18 | +use Symfony\Component\Validator\Constraints\NotBlank; | |
19 | +use Symfony\Component\Form\Extension\Core\Type\FileType; | |
20 | + | |
21 | +use Symfony\Bridge\Doctrine\Form\Type\EntityType; | |
22 | + | |
23 | +class ActaDefensaType extends AbstractType | |
24 | +{ | |
25 | + public function buildForm(FormBuilderInterface $builder, array $options) | |
26 | + { | |
27 | + $builder | |
28 | + | |
29 | + ->add('acta', FileType::class, array( | |
30 | + 'label' => 'Digital Resolución', | |
31 | + 'constraints' => array( | |
32 | + new NotBlank(), | |
33 | + new File(array( | |
34 | + 'maxSize' => '1024K', | |
35 | + 'mimeTypes' => [ | |
36 | + 'application/pdf', | |
37 | + 'application/x-pdf', | |
38 | + 'image/png', | |
39 | + 'image/jpg', | |
40 | + 'image/jpeg' | |
41 | + ], | |
42 | + 'mimeTypesMessage' => 'Sólo se permiten extensiones png, jpeg y pdf' | |
43 | + )) | |
44 | + ) | |
45 | + )) | |
46 | + ->add('send', SubmitType::class, array( | |
47 | + 'label' => 'Enviar Resolución', | |
48 | + 'attr' => array( | |
49 | + 'class' => 'btn btn-success btn-block', | |
50 | + 'data-loading-text' => "<i class='fa fa-circle-o-notch fa-spin'></i> Procesando Solicitud..." | |
51 | + ) | |
52 | + )) | |
53 | + | |
54 | + ; | |
55 | + | |
56 | + | |
57 | + } | |
58 | + | |
59 | + | |
60 | + | |
61 | + | |
62 | + | |
63 | + | |
64 | + | |
65 | +} | ... | ... |