Commit 2c46fb7ec594bb30a68bbc12d88bf386ca656763
1 parent
6388100ca6
Exists in
master
no bloquea al docente de los demas permisos por no posser el escalafón de asiste…
…nte, solo bloquea el permiso de año sabatico
Showing
2 changed files
with
13 additions
and
8 deletions
Show diff stats
app/Resources/views/solicitudes/permisos_index.html.twig
... | ... | @@ -112,11 +112,15 @@ |
112 | 112 | cuando lo hayas contemplado dentro de tus actividades del PIDA y |
113 | 113 | nos incluyas una exposición de motivos |
114 | 114 | <br><br> |
115 | - | |
116 | - {% form_theme formSabatico 'bootstrap_3_layout.html.twig' %} | |
117 | - {{ form_start(formSabatico, {'attr': {'novalidate': 'novalidate'}}) }} | |
118 | - {{ form_widget(formSabatico) }} | |
119 | - {{ form_end(formSabatico) }} | |
115 | + {% if asistente %} | |
116 | + {% form_theme formSabatico 'bootstrap_3_layout.html.twig' %} | |
117 | + {{ form_start(formSabatico, {'attr': {'novalidate': 'novalidate'}}) }} | |
118 | + {{ form_widget(formSabatico) }} | |
119 | + {{ form_end(formSabatico) }} | |
120 | + {% else %} | |
121 | + <p>Estimado docente, para gozar de este permiso, debe haber alcanzado | |
122 | + como mínimo el escalafón o categoría de <strong>asistente</strong>.</p> | |
123 | + {% endif %} | |
120 | 124 | </div> |
121 | 125 | </div> |
122 | 126 | </div> | ... | ... |
src/AppBundle/Controller/PermisosController.php
... | ... | @@ -44,10 +44,10 @@ class PermisosController extends Controller |
44 | 44 | 'idEscala' => $em->getRepository("AppBundle:Escalafones")->findOneById(2) |
45 | 45 | )); |
46 | 46 | |
47 | - if(!$escalafones){ | |
47 | + /*if(!$escalafones){ | |
48 | 48 | $this->addFlash('danger', 'Estimado Docente, debe estar como mínino en la categoría Asistente para poder realizar esta solicitud'); |
49 | 49 | return $this->redirect($this->generateUrl('cea_index')); |
50 | - } | |
50 | + }*/ | |
51 | 51 | |
52 | 52 | |
53 | 53 | /* Permiso sabatico */ |
... | ... | @@ -296,7 +296,8 @@ class PermisosController extends Controller |
296 | 296 | return $this->render('solicitudes/permisos_index.html.twig', array( |
297 | 297 | 'formSabatico' => $formSabatico->createView(), |
298 | 298 | 'formEstudio' => $formEstudio->createView(), |
299 | - 'formExtranjero' => $formExtranjero->createView() | |
299 | + 'formExtranjero' => $formExtranjero->createView(), | |
300 | + 'asistente' => $escalafones | |
300 | 301 | )); |
301 | 302 | } |
302 | 303 | ... | ... |