Commit 9a9b1d9fbaf4ffd6b5f189f057d70e2ee9429138
1 parent
3f8d5aa1c4
Exists in
master
modificada la solicitud de ascenso de acuerdo con la lista de cotejo
Showing
6 changed files
with
371 additions
and
16 deletions
Show diff stats
app/Resources/views/cea/ascenso_mostar.html.twig
| ... | ... | @@ -201,6 +201,20 @@ |
| 201 | 201 | </div> |
| 202 | 202 | </div> |
| 203 | 203 | {% endif %} |
| 204 | + | |
| 205 | + | |
| 206 | + {% if ascenso.aprobacion is not null %} | |
| 207 | + <div class="col-xs-4"> | |
| 208 | + <div class="thumbnail"> | |
| 209 | + <a href="{{asset('uploads/ascenso/'~ ascenso.aprobacion)}}" data-lightbox="adscripcion"> | |
| 210 | + <img src="{{ asset('uploads/ascenso/thumb/'~ ascenso.aprobacion) }}" /> | |
| 211 | + </a> | |
| 212 | + <div class="caption"> | |
| 213 | + <p>Acta de aprobación de la tesis</p> | |
| 214 | + </div> | |
| 215 | + </div> | |
| 216 | + </div> | |
| 217 | + {% endif %} | |
| 204 | 218 | |
| 205 | 219 | |
| 206 | 220 | ... | ... |
app/Resources/views/solicitudes/ascenso.html.twig
| 1 | 1 | {% extends 'base_app.html.twig' %} |
| 2 | +{% use 'form_div_layout.html.twig' with form_widget_simple as base_form_widget_simple %} | |
| 2 | 3 | |
| 3 | 4 | {% block stylesheets %} |
| 4 | 5 | {{ parent() }} |
| 5 | 6 | <link rel="stylesheet" href="{{ asset('assets/vendor/chosen/chosen.min.css') }}"> |
| 6 | 7 | |
| 7 | 8 | <style> |
| 8 | - .esc_oposicion, .esc_asistente, .esc_agregado, .esc_asociado, .esc_titular{ | |
| 9 | + .esc_investigacion, .esc_pertinencia, .esc_tesis .esc_asistente, .esc_agregado, .esc_asociado, .esc_titular{ | |
| 9 | 10 | display: none; |
| 10 | 11 | } |
| 11 | 12 | |
| ... | ... | @@ -137,19 +138,39 @@ |
| 137 | 138 | {{ parent() }} |
| 138 | 139 | <script type="text/javascript" src="{{ asset('assets/vendor/chosen/chosen.jquery.min.js') }}"></script> |
| 139 | 140 | <script type="text/javascript"> |
| 141 | + | |
| 140 | 142 | |
| 141 | 143 | $('#ascenso_tipoTrabajoInvestigacion').click(function() { |
| 144 | + alert("click"); | |
| 142 | 145 | |
| 143 | 146 | $('.esc_oposicion')[this.checked ? "show" : "hide"](); |
| 144 | 147 | |
| 145 | - if($('#ascenso_tipoTrabajoInvestigacion').prop('checked') == true){ | |
| 148 | + if($('#ascenso_tipoTrabajoInvestigacion').val() == false){ | |
| 149 | + $('.esc_investigacion').show(); | |
| 150 | + $('.esc_tesis').hide(); | |
| 151 | + $("#ascenso_tutores_ascenso_chosen").show(); | |
| 152 | + }else{ | |
| 153 | + $('.esc_investigacion').hide(); | |
| 154 | + $('.esc_tesis').show(); | |
| 155 | + $("#ascenso_tutores_ascenso_chosen").hide(); | |
| 156 | + } | |
| 146 | 157 | |
| 147 | - $("#ascenso_tutores_ascenso_chosen").show(); | |
| 158 | + }); | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + $('#ascenso_tesisUbv').click(function() { | |
| 163 | + $('.esc_pertinencia')[this.checked ? "show" : "hide"](); | |
| 164 | + if(this.checked){ | |
| 165 | + $('.esc_investigacion').show(); | |
| 166 | + $("#ascenso_tutores_ascenso_chosen").show(); | |
| 148 | 167 | }else{ |
| 149 | - $("#ascenso_tutores_ascenso_chosen").hide(); | |
| 168 | + $('.esc_investigacion').hide(); | |
| 169 | + $('.esc_tesis').show(); | |
| 170 | + $("#ascenso_tutores_ascenso_chosen").hide(); | |
| 150 | 171 | } |
| 151 | 172 | |
| 152 | - }); | |
| 173 | + }); | |
| 153 | 174 | |
| 154 | 175 | |
| 155 | 176 | $(".tutorForm").submit(function(e){ | ... | ... |
src/AppBundle/Controller/AscensoController.php
| ... | ... | @@ -199,6 +199,7 @@ class AscensoController extends Controller |
| 199 | 199 | $ascenso->setNai($nombreNai); |
| 200 | 200 | $ascenso->setInvestigacion($nombreInvestigacion); |
| 201 | 201 | $ascenso->setTituloTrabajo($form->get('titulo_trabajo')->getData()); |
| 202 | + $ascenso->setNombreNucelo($form->get('nombreNucleo')->getData()); | |
| 202 | 203 | $ascenso->setIdEscalafones($nueva_escala); |
| 203 | 204 | $ascenso->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(2)); |
| 204 | 205 | |
| ... | ... | @@ -222,6 +223,36 @@ class AscensoController extends Controller |
| 222 | 223 | //$ascenso->setIdLineaInvestigacion($form->get('lineas_investigacion')->getData()); |
| 223 | 224 | |
| 224 | 225 | } |
| 226 | + | |
| 227 | + | |
| 228 | + if ($form->get('aprobacion')->getData()){ | |
| 229 | + | |
| 230 | + $constanciaAprobacion = $form->get('aprobacion')->getData(); | |
| 231 | + $nombreAprobacion = md5(uniqid()).'.'.$constanciaAprobacion->guessExtension(); | |
| 232 | + $constanciaAprobacion->move( | |
| 233 | + $this->container->getParameter('ascenso_directory'), | |
| 234 | + $nombreAprobacion | |
| 235 | + ); | |
| 236 | + thumbnail2($nombreAprobacion, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory')); | |
| 237 | + $ascenso->setAprobacion($nombreAprobacion); | |
| 238 | + //$ascenso->setIdLineaInvestigacion($form->get('lineas_investigacion')->getData()); | |
| 239 | + | |
| 240 | + } | |
| 241 | + | |
| 242 | + | |
| 243 | + if ($form->get('curriculo')->getData()){ | |
| 244 | + | |
| 245 | + $constanciaCurriculo = $form->get('curriculo')->getData(); | |
| 246 | + $nombreCurriculo = md5(uniqid()).'.'.$constanciaCurriculo->guessExtension(); | |
| 247 | + $constanciaCurriculo->move( | |
| 248 | + $this->container->getParameter('ascenso_directory'), | |
| 249 | + $nombreCurriculo | |
| 250 | + ); | |
| 251 | + thumbnail2($nombreCurriculo, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory')); | |
| 252 | + $ascenso->setCurriculo($nombreCurriculo); | |
| 253 | + //$ascenso->setIdLineaInvestigacion($form->get('lineas_investigacion')->getData()); | |
| 254 | + | |
| 255 | + } | |
| 225 | 256 | |
| 226 | 257 | |
| 227 | 258 | ... | ... |
src/AppBundle/Entity/Ascenso.php
| ... | ... | @@ -100,6 +100,32 @@ class Ascenso |
| 100 | 100 | * @Assert\File(mimeTypes={ "application/pdf" }) |
| 101 | 101 | */ |
| 102 | 102 | private $pertinencia; |
| 103 | + | |
| 104 | + | |
| 105 | + /** | |
| 106 | + * @ORM\Column(type="string", nullable=true, options={"comment" = "ubicación del digital del informe de pertinencia en caso de ser tesis fuera de ubv"}) | |
| 107 | + * | |
| 108 | + * | |
| 109 | + * @Assert\File(mimeTypes={ "application/pdf" }) | |
| 110 | + */ | |
| 111 | + private $aprobacion; | |
| 112 | + | |
| 113 | + | |
| 114 | + /** | |
| 115 | + * @ORM\Column(type="string", nullable=true, options={"comment" = "ubicación del digital del curriculo de los posibles jurados"}) | |
| 116 | + * | |
| 117 | + * | |
| 118 | + * @Assert\File(mimeTypes={ "application/pdf" }) | |
| 119 | + */ | |
| 120 | + private $curriculo; | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + /** | |
| 125 | + * @ORM\Column(name="nombre_nucleo", type="string", nullable=true, options={"comment" = "Nombre del núcleo de investigación"}) | |
| 126 | + * @Assert\NotBlank(message="El nombre del núcleo de investigación es obligatorio.") | |
| 127 | + */ | |
| 128 | + private $nombreNucelo; | |
| 103 | 129 | |
| 104 | 130 | |
| 105 | 131 | /** |
| ... | ... | @@ -510,4 +536,73 @@ class Ascenso |
| 510 | 536 | { |
| 511 | 537 | return $this->getIdRolInstitucion()->getIdRol()->getIdPersona()->getPrimerNombre(); |
| 512 | 538 | } |
| 539 | + | |
| 540 | + /** | |
| 541 | + * Set aprobacion | |
| 542 | + * | |
| 543 | + * @param string $aprobacion | |
| 544 | + * @return Ascenso | |
| 545 | + */ | |
| 546 | + public function setAprobacion($aprobacion) | |
| 547 | + { | |
| 548 | + $this->aprobacion = $aprobacion; | |
| 549 | + | |
| 550 | + return $this; | |
| 551 | + } | |
| 552 | + | |
| 553 | + /** | |
| 554 | + * Get aprobacion | |
| 555 | + * | |
| 556 | + * @return string | |
| 557 | + */ | |
| 558 | + public function getAprobacion() | |
| 559 | + { | |
| 560 | + return $this->aprobacion; | |
| 561 | + } | |
| 562 | + | |
| 563 | + /** | |
| 564 | + * Set nombreNucelo | |
| 565 | + * | |
| 566 | + * @param string $nombreNucelo | |
| 567 | + * @return Ascenso | |
| 568 | + */ | |
| 569 | + public function setNombreNucelo($nombreNucelo) | |
| 570 | + { | |
| 571 | + $this->nombreNucelo = $nombreNucelo; | |
| 572 | + | |
| 573 | + return $this; | |
| 574 | + } | |
| 575 | + | |
| 576 | + /** | |
| 577 | + * Get nombreNucelo | |
| 578 | + * | |
| 579 | + * @return string | |
| 580 | + */ | |
| 581 | + public function getNombreNucelo() | |
| 582 | + { | |
| 583 | + return $this->nombreNucelo; | |
| 584 | + } | |
| 585 | + | |
| 586 | + /** | |
| 587 | + * Set curriculo | |
| 588 | + * | |
| 589 | + * @param string $curriculo | |
| 590 | + * @return Ascenso | |
| 591 | + */ | |
| 592 | + public function setCurriculo($curriculo) | |
| 593 | + { | |
| 594 | + $this->curriculo = $curriculo; | |
| 595 | + | |
| 596 | + return $this; | |
| 597 | + } | |
| 598 | + | |
| 599 | + /** | |
| 600 | + * Get curriculo | |
| 601 | + * | |
| 602 | + * @return string | |
| 603 | + */ | |
| 604 | + public function getCurriculo() | |
| 605 | + { | |
| 606 | + return $this->curriculo; | |
| 607 | + } | |
| 513 | 608 | } | ... | ... |
src/AppBundle/Entity/Ascenso.php~
| ... | ... | @@ -100,6 +100,32 @@ class Ascenso |
| 100 | 100 | * @Assert\File(mimeTypes={ "application/pdf" }) |
| 101 | 101 | */ |
| 102 | 102 | private $pertinencia; |
| 103 | + | |
| 104 | + | |
| 105 | + /** | |
| 106 | + * @ORM\Column(type="string", nullable=true, options={"comment" = "ubicación del digital del informe de pertinencia en caso de ser tesis fuera de ubv"}) | |
| 107 | + * | |
| 108 | + * | |
| 109 | + * @Assert\File(mimeTypes={ "application/pdf" }) | |
| 110 | + */ | |
| 111 | + private $aprobacion; | |
| 112 | + | |
| 113 | + | |
| 114 | + /** | |
| 115 | + * @ORM\Column(type="string", nullable=true, options={"comment" = "ubicación del digital del curriculo de los posibles jurados"}) | |
| 116 | + * | |
| 117 | + * | |
| 118 | + * @Assert\File(mimeTypes={ "application/pdf" }) | |
| 119 | + */ | |
| 120 | + private $curriculo; | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + /** | |
| 125 | + * @ORM\Column(name="nombre_nucleo", type="string", nullable=true, options={"comment" = "Nombre del núcleo de investigación"}) | |
| 126 | + * @Assert\NotBlank(message="El nombre del núcleo de investigación es obligatorio.") | |
| 127 | + */ | |
| 128 | + private $nombreNucelo; | |
| 103 | 129 | |
| 104 | 130 | |
| 105 | 131 | /** |
| ... | ... | @@ -460,4 +486,100 @@ class Ascenso |
| 460 | 486 | |
| 461 | 487 | |
| 462 | 488 | |
| 489 | + /** | |
| 490 | + * Constructor | |
| 491 | + */ | |
| 492 | + public function __construct() | |
| 493 | + { | |
| 494 | + $this->tutoresAscenso = new \Doctrine\Common\Collections\ArrayCollection(); | |
| 495 | + } | |
| 496 | + | |
| 497 | + /** | |
| 498 | + * Add tutoresAscenso | |
| 499 | + * | |
| 500 | + * @param \AppBundle\Entity\TutoresAscenso $tutoresAscenso | |
| 501 | + * @return Ascenso | |
| 502 | + */ | |
| 503 | + public function addTutoresAscenso(\AppBundle\Entity\TutoresAscenso $tutoresAscenso) | |
| 504 | + { | |
| 505 | + $this->tutoresAscenso[] = $tutoresAscenso; | |
| 506 | + | |
| 507 | + return $this; | |
| 508 | + } | |
| 509 | + | |
| 510 | + /** | |
| 511 | + * Remove tutoresAscenso | |
| 512 | + * | |
| 513 | + * @param \AppBundle\Entity\TutoresAscenso $tutoresAscenso | |
| 514 | + */ | |
| 515 | + public function removeTutoresAscenso(\AppBundle\Entity\TutoresAscenso $tutoresAscenso) | |
| 516 | + { | |
| 517 | + $this->tutoresAscenso->removeElement($tutoresAscenso); | |
| 518 | + } | |
| 519 | + | |
| 520 | + /** | |
| 521 | + * Get tutoresAscenso | |
| 522 | + * | |
| 523 | + * @return \Doctrine\Common\Collections\Collection | |
| 524 | + */ | |
| 525 | + public function getTutoresAscenso() | |
| 526 | + { | |
| 527 | + return $this->tutoresAscenso; | |
| 528 | + } | |
| 529 | + | |
| 530 | + /** | |
| 531 | + * | |
| 532 | + * @return string | |
| 533 | + */ | |
| 534 | + | |
| 535 | + public function __toString() | |
| 536 | + { | |
| 537 | + return $this->getIdRolInstitucion()->getIdRol()->getIdPersona()->getPrimerNombre(); | |
| 538 | + } | |
| 539 | + | |
| 540 | + /** | |
| 541 | + * Set aprobacion | |
| 542 | + * | |
| 543 | + * @param string $aprobacion | |
| 544 | + * @return Ascenso | |
| 545 | + */ | |
| 546 | + public function setAprobacion($aprobacion) | |
| 547 | + { | |
| 548 | + $this->aprobacion = $aprobacion; | |
| 549 | + | |
| 550 | + return $this; | |
| 551 | + } | |
| 552 | + | |
| 553 | + /** | |
| 554 | + * Get aprobacion | |
| 555 | + * | |
| 556 | + * @return string | |
| 557 | + */ | |
| 558 | + public function getAprobacion() | |
| 559 | + { | |
| 560 | + return $this->aprobacion; | |
| 561 | + } | |
| 562 | + | |
| 563 | + /** | |
| 564 | + * Set nombreNucelo | |
| 565 | + * | |
| 566 | + * @param string $nombreNucelo | |
| 567 | + * @return Ascenso | |
| 568 | + */ | |
| 569 | + public function setNombreNucelo($nombreNucelo) | |
| 570 | + { | |
| 571 | + $this->nombreNucelo = $nombreNucelo; | |
| 572 | + | |
| 573 | + return $this; | |
| 574 | + } | |
| 575 | + | |
| 576 | + /** | |
| 577 | + * Get nombreNucelo | |
| 578 | + * | |
| 579 | + * @return string | |
| 580 | + */ | |
| 581 | + public function getNombreNucelo() | |
| 582 | + { | |
| 583 | + return $this->nombreNucelo; | |
| 584 | + } | |
| 463 | 585 | } | ... | ... |
src/AppBundle/Form/AscensoType.php
| ... | ... | @@ -101,11 +101,56 @@ class AscensoType extends AbstractType |
| 101 | 101 | ) |
| 102 | 102 | )) |
| 103 | 103 | |
| 104 | + ->add('tipoTrabajoInvestigacion', ChoiceType::class, array( | |
| 105 | + 'placeholder' => 'Seleccione el Tipo de Trabajo de Investigación', | |
| 106 | + 'choices' => array( | |
| 107 | + 'Tesis (Trabajo de 4to nivel)' => true, | |
| 108 | + 'Trabajo de Investigacion' => false, | |
| 109 | + ), | |
| 110 | + // *this line is important* | |
| 111 | + 'choices_as_values' => true, | |
| 112 | + )) | |
| 113 | + | |
| 114 | + | |
| 115 | + ->add('tesisUbv', CheckboxType::class, array( | |
| 116 | + 'label' => '¿La tesis fue realizada FUERA de la UBV?', | |
| 117 | + 'label_attr' => array( 'class' => 'esc_tesis', 'style' => 'display:none;'), | |
| 118 | + 'required' => false, | |
| 119 | + 'attr' => array( | |
| 120 | + 'style' => 'display:none;', | |
| 121 | + 'class' => 'esc_tesis' | |
| 122 | + ) | |
| 123 | + )) | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 104 | 127 | ->add('titulo_trabajo', TextType::class, array( |
| 105 | - 'label' => 'Título del Trabajo de Ascenso', | |
| 106 | - | |
| 107 | - 'required' => true, | |
| 108 | - | |
| 128 | + 'label' => 'Título del Trabajo de Ascenso', | |
| 129 | + 'required' => true, | |
| 130 | + )) | |
| 131 | + | |
| 132 | + | |
| 133 | + ->add('aprobacion', FileType::class, array( | |
| 134 | + 'label' => 'Acta de Aprobación de la Tesis', | |
| 135 | + 'label_attr' => array( 'class' => 'esc_tesis', 'style' => 'display:none;'), | |
| 136 | + 'required' => false, | |
| 137 | + 'attr' => array( | |
| 138 | + 'style' => 'display:none;', | |
| 139 | + 'class' => 'esc_tesis' | |
| 140 | + ), | |
| 141 | + 'constraints' => array( | |
| 142 | + new File(array( | |
| 143 | + 'maxSize' => '1024K', | |
| 144 | + 'mimeTypes' => [ | |
| 145 | + 'application/pdf', | |
| 146 | + 'application/x-pdf', | |
| 147 | + 'image/png', | |
| 148 | + 'image/jpg', | |
| 149 | + 'image/jpeg' | |
| 150 | + ], | |
| 151 | + 'mimeTypesMessage' => 'Sólo se permiten extensiones png, jpeg y pdf' | |
| 152 | + )) | |
| 153 | + ) | |
| 109 | 154 | )) |
| 110 | 155 | |
| 111 | 156 | |
| ... | ... | @@ -128,17 +173,14 @@ class AscensoType extends AbstractType |
| 128 | 173 | )) |
| 129 | 174 | |
| 130 | 175 | |
| 131 | - ->add('tipoTrabajoInvestigacion', CheckboxType::class, array( | |
| 132 | - 'label' => 'Si su trabajo de investigación es TESIS, responda ¿Fue realizado fuera de la UBV?', | |
| 133 | - 'required' => false, | |
| 134 | - )) | |
| 176 | + | |
| 135 | 177 | |
| 136 | 178 | ->add('tutores_ascenso', EntityType::class, array( |
| 137 | 179 | 'placeholder' => 'Añadir Posibles Jurados...', |
| 138 | 180 | 'class' => 'AppBundle:TutoresAscenso', |
| 139 | 181 | 'required' => false, |
| 140 | 182 | 'label' => 'Asigne Posibles Jurados', |
| 141 | - 'label_attr' => array( 'class' => 'esc_oposicion'), | |
| 183 | + 'label_attr' => array( 'class' => 'esc_investigacion'), | |
| 142 | 184 | 'multiple' => true, |
| 143 | 185 | 'group_by' => 'institucion', |
| 144 | 186 | |
| ... | ... | @@ -146,14 +188,36 @@ class AscensoType extends AbstractType |
| 146 | 188 | 'disabled' => 'true', |
| 147 | 189 | )*/ |
| 148 | 190 | )) |
| 191 | + | |
| 192 | + | |
| 193 | + ->add('curriculo', FileType::class, array( | |
| 194 | + 'label' => 'Digital de la síntesis curricular de los jurados', | |
| 195 | + 'label_attr' => array( 'class' => 'esc_investigacion', 'style' => 'display:none;'), | |
| 196 | + 'required' => false, | |
| 197 | + 'attr' => array( | |
| 198 | + 'style' => 'display:none;', | |
| 199 | + 'class' => 'esc_investigacion' | |
| 200 | + ), | |
| 201 | + 'constraints' => array( | |
| 202 | + new File(array( | |
| 203 | + 'maxSize' => '1024K', | |
| 204 | + 'mimeTypes' => [ | |
| 205 | + 'application/pdf', | |
| 206 | + 'application/x-pdf', | |
| 207 | + ], | |
| 208 | + 'mimeTypesMessage' => 'Sólo se permiten extensiones pdf' | |
| 209 | + )) | |
| 210 | + ) | |
| 211 | + )) | |
| 212 | + | |
| 149 | 213 | |
| 150 | 214 | ->add('pertinencia', FileType::class, array( |
| 151 | 215 | 'label' => 'Informe de Pertinencia', |
| 152 | - 'label_attr' => array( 'class' => 'esc_oposicion'), | |
| 216 | + 'label_attr' => array( 'class' => 'esc_pertinencia'), | |
| 153 | 217 | 'required' => false, |
| 154 | 218 | 'attr' => array( |
| 155 | 219 | 'style' => 'display:none;', |
| 156 | - 'class' => 'esc_oposicion' | |
| 220 | + 'class' => 'esc_pertinencia' | |
| 157 | 221 | ), |
| 158 | 222 | 'constraints' => array( |
| 159 | 223 | new File(array( |
| ... | ... | @@ -169,6 +233,14 @@ class AscensoType extends AbstractType |
| 169 | 233 | )) |
| 170 | 234 | ) |
| 171 | 235 | )) |
| 236 | + | |
| 237 | + | |
| 238 | + ->add('nombreNucleo', TextType::class, array( | |
| 239 | + 'label' => 'Nombre del Núcleo al cual pertenece', | |
| 240 | + | |
| 241 | + 'required' => true, | |
| 242 | + | |
| 243 | + )) | |
| 172 | 244 | |
| 173 | 245 | |
| 174 | 246 | ... | ... |