Commit 3df3b8be33e1f310b837015482bbb6f9dab7eb30
1 parent
a17b1534fe
Exists in
master
añadiendo seguridad al controlador de solicitudes
Showing
2 changed files
with
42 additions
and
2 deletions
Show diff stats
app/Resources/views/cea/solicitudes.html.twig
1 | 1 | {% extends 'base_app.html.twig' %} |
2 | + | |
3 | +{%block body %} | |
4 | + | |
5 | + <div class="widget widget-table action-table"> | |
6 | + <div class="widget-header"> <i class="icon-th-list"></i> | |
7 | + <h3>Listado de solicitudes de Adscripción Al CEA</h3> | |
8 | + </div> | |
9 | + <!-- /widget-header --> | |
10 | + <div class="widget-content"> | |
11 | + <table class="table table-striped table-bordered"> | |
12 | + <thead> | |
13 | + <tr> | |
14 | + <th> Datos del Docente </th> | |
15 | + <th> Cantidad de Documentos</th> | |
16 | + <th class="td-actions"> Acciones Rápidas </th> | |
17 | + </tr> | |
18 | + </thead> | |
19 | + <tbody> | |
20 | + {% for adscripcion in adscripciones %} | |
21 | + <tr> | |
22 | + <td> Fresh Web Development Resources </td> | |
23 | + <td> http://www.egrappler.com/ </td> | |
24 | + <td class="td-actions"><a href="javascript:;" class="btn btn-small btn-success"><i class="btn-icon-only icon-ok"> </i></a><a href="javascript:;" class="btn btn-danger btn-small"><i class="btn-icon-only icon-remove"> </i></a></td> | |
25 | + </tr> | |
26 | + {% endfor %} | |
27 | + | |
28 | + </tbody> | |
29 | + </table> | |
30 | + </div> | |
31 | + <!-- /widget-content --> | |
32 | + </div> | |
33 | + <!-- /widget --> | |
34 | + | |
35 | +{% endblock %} | ... | ... |
src/AppBundle/Controller/DocenteController.php
... | ... | @@ -10,6 +10,8 @@ namespace AppBundle\Controller; |
10 | 10 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
11 | 11 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
12 | 12 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
13 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | |
14 | + | |
13 | 15 | |
14 | 16 | /** |
15 | 17 | * Description of DocenteController |
... | ... | @@ -48,12 +50,16 @@ class DocenteController extends Controller { |
48 | 50 | * |
49 | 51 | * @Route("/solicitudes", name="cea_solicitudes") |
50 | 52 | * @Method("GET") |
53 | + * @Security("has_role('ROLE_COORDINADOR_NACIONAL')") | |
51 | 54 | */ |
52 | 55 | public function SolicitudesAction() |
53 | 56 | { |
54 | - | |
55 | 57 | |
56 | - return $this->render('cea/solicitudes.html.twig'); | |
58 | + $adscripciones = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findBy(array('idEstatus' => 2)); | |
59 | + | |
60 | + return $this->render('cea/solicitudes.html.twig', array( | |
61 | + 'adscripciones' => $adscripciones | |
62 | + )); | |
57 | 63 | } |
58 | 64 | |
59 | 65 | } | ... | ... |