From 920d3e4181cdd176b7c5af9936cdbd743317b440 Mon Sep 17 00:00:00 2001 From: wilmer Date: Tue, 7 Feb 2017 09:23:17 -0400 Subject: [PATCH] =?UTF-8?q?aparece=20el=20texto=20para=20poder=20a=C3=B1ad?= =?UTF-8?q?ir=20tutores=20faltantes=20de=20los=206=20que=20necesita?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Resources/views/cea/ascenso_mostar.html.twig | 49 ++++++++++++++++++++---- src/AppBundle/Controller/AscensoController.php | 7 +++- src/AppBundle/Form/AddTutorType.php | 49 ++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 9 deletions(-) create mode 100644 src/AppBundle/Form/AddTutorType.php diff --git a/app/Resources/views/cea/ascenso_mostar.html.twig b/app/Resources/views/cea/ascenso_mostar.html.twig index 1773c6a..dfb3a22 100644 --- a/app/Resources/views/cea/ascenso_mostar.html.twig +++ b/app/Resources/views/cea/ascenso_mostar.html.twig @@ -2,10 +2,11 @@ {% block stylesheets %} {{ parent() }} + {% endblock %} {%block body %} - + {% set cantidadJurado = 6 %}
{% for message in app.session.flashBag.get('notice') %} @@ -25,10 +26,9 @@

Estatus {{servicio.idEstatus}} {% else %}

Estatus {{servicio.idEstatus}} - {% endif %} -

+ {% endif %} +
-
@@ -45,7 +45,7 @@ {% if escalas is not null %}
- + @@ -60,17 +60,36 @@ {%endfor %}
Escalafón Fecha
-

Escalafón Solicita: {{ ascenso.idEscalafones.nombre }}

+

Escalafón Solicita: {{ ascenso.idEscalafones.nombre }}

Jurados propuestos por el Docente

+ {% set añadirJurado = true %} + {% set cantidadJurado = 6 %} {% for tutor in ascenso.tutoresAscenso %} + {% if loop.length >= 5 %} + {% set añadirJurado = false %} + {% else %} + {% set cantidadJurado = cantidadJurado - loop.index %} + {% endif %}

+ {{ tutor.nombres }} {{ tutor.apellidos }}: {{ tutor.institucion }} -> {{ tutor.idEscala.nombre }} - +

{% endfor %} + {% if añadirJurado %} + {{ dump(cantidadJurado) }} +

+ El docente no tiene o le faltó completar posibles jurados +

+ {% form_theme form 'bootstrap_3_layout.html.twig' %} + {{ form_start(form) }} + {{ form_widget(form) }} + {{ form_end(form) }} + + {% endif %}
@@ -247,12 +266,28 @@ {% block javascripts %} {{ parent() }} + diff --git a/src/AppBundle/Controller/AscensoController.php b/src/AppBundle/Controller/AscensoController.php index fa3c3dc..c1c2322 100644 --- a/src/AppBundle/Controller/AscensoController.php +++ b/src/AppBundle/Controller/AscensoController.php @@ -398,7 +398,7 @@ class AscensoController extends Controller /** - * Encuentra y muestra una entidad de tipo Adscripción. + * Encuentra y muestra una entidad de tipo Ascenso. * * @Route("/ascenso/{id}", name="cea_ascenso_show") * @Method("GET") @@ -421,13 +421,16 @@ class AscensoController extends Controller 'idRolInstitucion' => $servicio->getIdRolInstitucion(), 'idServicioCe' => 1 )); + + $form = $this->createForm('AppBundle\Form\AddTutorType'); return $this->render('cea/ascenso_mostar.html.twig', array( 'ascenso' => $ascenso, 'servicio' => $servicio, 'escalas' => $escala, 'pida' => $pida, - 'antiguedad' => $antiguedad + 'antiguedad' => $antiguedad, + 'form' => $form->createView(), )); } diff --git a/src/AppBundle/Form/AddTutorType.php b/src/AppBundle/Form/AddTutorType.php new file mode 100644 index 0000000..276580d --- /dev/null +++ b/src/AppBundle/Form/AddTutorType.php @@ -0,0 +1,49 @@ +add('tutores_ascenso', EntityType::class, array( + 'placeholder' => 'Añadir Posibles Jurados...', + 'class' => 'AppBundle:TutoresAscenso', + 'required' => false, + 'label' => 'Asignar Jurados', + 'multiple' => true, + 'group_by' => 'institucion', + )) + + + + + ; + + + } + + + + +} -- 2.0.0