From 3df3b8be33e1f310b837015482bbb6f9dab7eb30 Mon Sep 17 00:00:00 2001 From: Wilmer Ramones Date: Thu, 7 Jul 2016 16:21:51 -0400 Subject: [PATCH] =?UTF-8?q?a=C3=B1adiendo=20seguridad=20al=20controlador?= =?UTF-8?q?=20de=20solicitudes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Resources/views/cea/solicitudes.html.twig | 34 ++++++++++++++++++++++++++ src/AppBundle/Controller/DocenteController.php | 10 ++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/app/Resources/views/cea/solicitudes.html.twig b/app/Resources/views/cea/solicitudes.html.twig index 01c3f8f..af9edb0 100644 --- a/app/Resources/views/cea/solicitudes.html.twig +++ b/app/Resources/views/cea/solicitudes.html.twig @@ -1 +1,35 @@ {% extends 'base_app.html.twig' %} + +{%block body %} + +
+
+

Listado de solicitudes de Adscripción Al CEA

+
+ +
+ + + + + + + + + + {% for adscripcion in adscripciones %} + + + + + + {% endfor %} + + +
Datos del Docente Cantidad de Documentos Acciones Rápidas
Fresh Web Development Resources http://www.egrappler.com/
+
+ +
+ + +{% endblock %} diff --git a/src/AppBundle/Controller/DocenteController.php b/src/AppBundle/Controller/DocenteController.php index 174e4a9..66a4e6d 100644 --- a/src/AppBundle/Controller/DocenteController.php +++ b/src/AppBundle/Controller/DocenteController.php @@ -10,6 +10,8 @@ namespace AppBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; + /** * Description of DocenteController @@ -48,12 +50,16 @@ class DocenteController extends Controller { * * @Route("/solicitudes", name="cea_solicitudes") * @Method("GET") + * @Security("has_role('ROLE_COORDINADOR_NACIONAL')") */ public function SolicitudesAction() { - - return $this->render('cea/solicitudes.html.twig'); + $adscripciones = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findBy(array('idEstatus' => 2)); + + return $this->render('cea/solicitudes.html.twig', array( + 'adscripciones' => $adscripciones + )); } } -- 2.0.0