Commit 7d1b14d4d74d3de501c46b6c56a2586d164b1a57
1 parent
cbcadf877c
Exists in
master
creado el servidor y cambiado los nombres de los controladores y las vistas para…
… coincidir con sus nombres de acción
Showing
16 changed files
with
1005 additions
and
1005 deletions
Show diff stats
app/Resources/views/default/index.html.twig
@@ -1,297 +0,0 @@ | @@ -1,297 +0,0 @@ | ||
1 | - {% extends 'base.html.twig' %} | ||
2 | - | ||
3 | -{% block stylesheets %} | ||
4 | - {{ parent() }} | ||
5 | - <link href="{{ asset('assets/vendor/AppBundle/portal.css') }}" rel="stylesheet"> | ||
6 | - <link href="{{ asset('assets/vendor/lightbox2/dist/css/lightbox.css') }}" rel="stylesheet"> | ||
7 | - | ||
8 | -{% endblock %} | ||
9 | - | ||
10 | -{% block body %} | ||
11 | - | ||
12 | - {% block navegacion %} | ||
13 | - | ||
14 | - | ||
15 | - <!-- Nav Menu Section --> | ||
16 | - <div class="logo-menu"> | ||
17 | - <nav class="navbar navbar-default navbar-fixed-top" role="navigation" data-spy="affix" data-offset-top="50"> | ||
18 | - <div class="container"> | ||
19 | - <!-- Brand and toggle get grouped for better mobile display --> | ||
20 | - <div class="navbar-header col-md-3"> | ||
21 | - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> | ||
22 | - <span class="sr-only">Toggle navigation</span> | ||
23 | - <span class="icon-bar"></span> | ||
24 | - <span class="icon-bar"></span> | ||
25 | - <span class="icon-bar"></span> | ||
26 | - </button> | ||
27 | - <a class="navbar-brand" href="#home"><i class="fa fa-briefcase"></i> CEA@UBV</a> | ||
28 | - </div> | ||
29 | - | ||
30 | - <div class="collapse navbar-collapse" id="navbar"> | ||
31 | - <ul class="nav navbar-nav col-md-9 pull-right"> | ||
32 | - <li class="active"><a data-scroll href="#area-principal"><i class="fa fa-home"></i> Inicio</a></li> | ||
33 | - <li><a data-scroll href="#servicios"><i class="fa fa-cogs"></i> Servicios</a></li> | ||
34 | - <li><a data-scroll href="#actividades"><i class="fa fa-flask"></i> Foto</a></li> | ||
35 | - <li><a data-scroll href="#descarga"><i class="fa fa-puzzle-piece"></i> Descargas</a></li> | ||
36 | - <li><a data-scroll href="#about"><i class="fa fa-info"></i> El CEA</a></li> | ||
37 | - <li><a data-scroll href="#adscripcion"><i class="fa fa-envelope"></i> Adscripción</a></li> | ||
38 | - {% if app.user %} | ||
39 | - <li><a href="{{ path('logout') }}"><i class="fa fa-close"></i> logout</a></li> | ||
40 | - {% else %} | ||
41 | - <li><a href="{{ path('login') }}"><i class="fa fa-user"></i> Ingresar</a></li> | ||
42 | - {% endif %} | ||
43 | - </ul> | ||
44 | - </div> | ||
45 | - </div> | ||
46 | - </nav> | ||
47 | - </div> | ||
48 | - | ||
49 | - | ||
50 | - | ||
51 | - {% endblock %} <!-- End block navegación --> | ||
52 | - | ||
53 | - {% block principal %} | ||
54 | - <section id="area-principal"> | ||
55 | - <div class="container"> | ||
56 | - <div class="row"> | ||
57 | - <div class="col-md-12"> | ||
58 | - <h1 class="title">CEA - Centro de Estudios Ambientales</h1> | ||
59 | - <h2 class="subtitle">Universidad Bolivariana de Venezuela!</h2> | ||
60 | - | ||
61 | - <img class="col-md-6 col-sm-6 col-xs-12 animated fadeInLeft" src="{{ asset('bundles/framework/images/portal/logo_ubv.png') }}" alt=""> | ||
62 | - | ||
63 | - <div class="col-md-6 col-sm-6 col-xs-12 animated fadeInRight delay-0-5"> | ||
64 | - <p>El Centro de Estudios Ambientales (CEA), constituye un órgano <strong>académico</strong>, para actuar de manera conjunta con las comunidades, organismos del Estado y otros actores sociales en la ejecución de proyectos de desarrollo ecosocialista que garanticen la apropiación del territorio de manera armónica con la naturaleza.</p> | ||
65 | - <a href="#adscripcion" class="btn btn-common btn-lg">Solicitar Adscirpción!</a> | ||
66 | - <a href="#about" class="btn btn-primary btn-lg">Saber más</a> | ||
67 | - </div> | ||
68 | - | ||
69 | - </div> | ||
70 | - | ||
71 | - </div> | ||
72 | - </div> | ||
73 | - </section> | ||
74 | - | ||
75 | - <!-- Fin de área Principal--> | ||
76 | - | ||
77 | - <!-- Servicios del CEA --> | ||
78 | - | ||
79 | - <section id="servicios"> | ||
80 | - <div class="container text-center"> | ||
81 | - <div class="row"> | ||
82 | - <h1 class="title">Servicios que ofrecemos</h1> | ||
83 | - <h2 class="subtitle">Estos son nuestros servicios más importantes</h2> | ||
84 | - | ||
85 | - <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12"> | ||
86 | - <div class="service-item"> | ||
87 | - <img src="{{ asset('bundles/framework/images/portal/escalafon.png') }}" alt=""> | ||
88 | - <h3>Solicitud de Ascenso</h3> | ||
89 | - <p>A través del sistema podrás realizar la solicitud de ascenso y tener un control del estatus del proceso desde que inicia hasta que concluye.</p> | ||
90 | - </div> | ||
91 | - </div> | ||
92 | - | ||
93 | - | ||
94 | - <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12"> | ||
95 | - <div class="service-item"> | ||
96 | - <img src="{{ asset('bundles/framework/images/portal/planificacion.png') }}" alt=""> | ||
97 | - <h3>Planificador Académico</h3> | ||
98 | - <p>A través del sistema podrás crear la planificación de tus actividades y enmarcarlas dentro de los objetivos históricos del plan de patría y los objetivos de la UBV.</p> | ||
99 | - </div> | ||
100 | - </div> | ||
101 | - | ||
102 | - <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12"> | ||
103 | - <div class="service-item"> | ||
104 | - <img src="{{ asset('bundles/framework/images/portal/registro.png') }}" alt=""> | ||
105 | - <h3>Registro Académico</h3> | ||
106 | - <p>A través del sistema del Centro de Estudios Ambienales CEA@UBV podrás tener un control de las actividades académicas que lleves a cabo dentro del mismo (diplomados, cursos, maestrías, doctorados, etc.)</p> | ||
107 | - </div> | ||
108 | - </div> | ||
109 | - | ||
110 | - </div> | ||
111 | - </div> | ||
112 | - </section> | ||
113 | - <!-- Service Section End --> | ||
114 | - | ||
115 | - <!-- seccion de Fotos --> | ||
116 | - | ||
117 | - <section id="actividades"> | ||
118 | - <div class="container"> | ||
119 | - <div class="row"> | ||
120 | - <h1 class="title">Actividades Recientes del CEA</h1> | ||
121 | - <h2 class="subtitle">Fotos</h2> | ||
122 | - | ||
123 | - | ||
124 | - | ||
125 | - <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12"> | ||
126 | - <div class="portfolio-item wow fadeInLeft" data-wow-delay=".5s"> | ||
127 | - <a href="#"><img src="{{ asset('bundles/framework/images/portal/actividades/actividad1.jpg') }}" alt=""></a> | ||
128 | - <div class="overlay"> | ||
129 | - <div class="icons"> | ||
130 | - <a data-lightbox="image1" href="{{ asset('bundles/framework/images/portal/actividades/actividad1.jpg') }}" class="preview"><i class="fa fa-search-plus fa-4x"></i></a> | ||
131 | - </div> | ||
132 | - </div> | ||
133 | - </div> | ||
134 | - </div> | ||
135 | - | ||
136 | - | ||
137 | - <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12"> | ||
138 | - <div class="portfolio-item wow fadeInLeft" data-wow-delay=".7s"> | ||
139 | - <a href="#"><img src="{{ asset('bundles/framework/images/portal/actividades/actividad2.jpg') }}" alt=""></a> | ||
140 | - <div class="overlay"> | ||
141 | - <div class="icons"> | ||
142 | - <a data-lightbox="image1" href="{{ asset('bundles/framework/images/portal/actividades/actividad2.jpg') }}" class="preview"><i class="fa fa-search-plus fa-4x"></i></a> | ||
143 | - </div> | ||
144 | - </div> | ||
145 | - </div> | ||
146 | - </div> | ||
147 | - | ||
148 | - <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12"> | ||
149 | - <div class="portfolio-item wow fadeInLeft" data-wow-delay=".9s"> | ||
150 | - <a href="#"><img src="{{ asset('bundles/framework/images/portal/actividades/actividad3.jpg') }}" alt=""></a> | ||
151 | - <div class="overlay"> | ||
152 | - <div class="icons"> | ||
153 | - <a data-lightbox="image1" href="{{ asset('bundles/framework/images/portal/actividades/actividad3.jpg') }}" class="preview"><i class="fa fa-search-plus fa-4x"></i></a> | ||
154 | - </div> | ||
155 | - </div> | ||
156 | - </div> | ||
157 | - </div> | ||
158 | - | ||
159 | - <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 wow fadeInRight" data-wow-delay="1.1s"> | ||
160 | - <div class="portfolio-item"> | ||
161 | - <a href="#"><img src="{{ asset('bundles/framework/images/portal/actividades/actividad4.jpg') }}" alt=""></a> | ||
162 | - <div class="overlay"> | ||
163 | - <div class="icons"> | ||
164 | - <a data-lightbox="image1" href="{{ asset('bundles/framework/images/portal/actividades/actividad4.jpg') }}" class="preview"><i class="fa fa-search-plus fa-4x"></i></a> | ||
165 | - </div> | ||
166 | - </div> | ||
167 | - </div> | ||
168 | - </div> | ||
169 | - | ||
170 | - | ||
171 | - | ||
172 | - </div> | ||
173 | - </div> | ||
174 | - </section> | ||
175 | - <!-- Portfolio Section End --> | ||
176 | - | ||
177 | - <!-- descarga Section --> | ||
178 | - <section id="descarga"> | ||
179 | - <div class="container"> | ||
180 | - <div class="row"> | ||
181 | - | ||
182 | - <h1 class="title">Descarga de Archivos</h1> | ||
183 | - <h2 class="subtitle">Documentos relacionados con el CEA</h2> | ||
184 | - | ||
185 | - <div class="wow fadeInDown"> | ||
186 | - <img class="col-md-3 col-md-3 col-sm-3 col-xs-12" src="{{ asset('bundles/framework/images/portal/descargas/descarga1.png') }}" alt="documento-1"> | ||
187 | - | ||
188 | - <img class="col-md-3 col-md-3 col-sm-3 col-xs-12" src="{{ asset('bundles/framework/images/portal/descargas/descarga2.png') }}" alt="documento-2"> | ||
189 | - | ||
190 | - <img class="col-md-3 col-md-3 col-sm-3 col-xs-12" src="{{ asset('bundles/framework/images/portal/descargas/descarga3.png') }}" alt="documento-3"> | ||
191 | - | ||
192 | - <img class="col-md-3 col-md-3 col-sm-3 col-xs-12" src="{{ asset('bundles/framework/images/portal/descargas/descarga4.png') }}" alt="documento-4"> | ||
193 | - | ||
194 | - </div> | ||
195 | - </div> | ||
196 | - </div> | ||
197 | - </section> | ||
198 | - <!-- Client Section End --> | ||
199 | - | ||
200 | - | ||
201 | - <!-- Que es el CEA --> | ||
202 | - | ||
203 | - <section id="about"> | ||
204 | - <div class="container"> | ||
205 | - <div class="row"> | ||
206 | - <h1 class="title">Sobre Nosotros</h1> | ||
207 | - <h2 class="subtitle">¿Qué es el CEA?</h2> | ||
208 | - | ||
209 | - <div class="col-md-8 col-sm-12"> | ||
210 | - <p> | ||
211 | - El Centro de Estudios Ambientales (CEA), creado en el año 2008, constituye un órgano académico que realza el vínculo, ya existente, entre la comunidad ubevista emergente del pueblo venezolano desde áreas académicas Ordenamiento Territorial, Hábitat y Ecodesarrollo y Soberanía Alimentaria cuyo propósito es el desarrollo de actividades académicas vinculada con la investigación y el desarrollo comunitario que contribuyan a la formación de ciudadanos profesionales con carácter integral, para actuar de manera conjunta con las comunidades, organismos del Estado y otros actores sociales en la ejecución de proyectos de desarrollo ecosocialista que garanticen la apropiación del territorio de manera armónica con la naturaleza y la promoción de la seguridad alimentaria, que se ajusten a las necesidades imperantes de las comunidades, bajo el esquema de la solidaridad, amor, cooperación, la reciprocidad, el intercambio equitativo y la tolerancia desde un nuevo modelo ecosocialista. | ||
212 | - </p> | ||
213 | - </div> | ||
214 | - | ||
215 | - <img class="col-md-4 col-md-4 col-sm-12 col-xs-12" src="{{ asset('bundles/framework/images/portal/logo_ubv.png') }}" alt=""> | ||
216 | - | ||
217 | - </div> | ||
218 | - </div> | ||
219 | - </section> | ||
220 | - <!-- Que es el CEA End --> | ||
221 | - | ||
222 | - | ||
223 | - <!-- Adscripcion Section --> | ||
224 | - <section id="adscripcion"> | ||
225 | - <div class="container text-center"> | ||
226 | - <div class="row"> | ||
227 | - <h1 class="title">Solicitar Ingreso a <code>cea@ubv</code></h1> | ||
228 | - | ||
229 | - <h2 class="subtitle">Llenar este sencillo formulario es el primer paso a la adscripción</h2> | ||
230 | - | ||
231 | - | ||
232 | - <div class="col-md-6 wow fadeInLeft" data-wow-delay=".5s"> | ||
233 | - {% for message in app.session.flashBag.get('notice') %} | ||
234 | - <div class="alert alert-success">{{ message }}</div> | ||
235 | - {%endfor %} | ||
236 | - | ||
237 | - {% for message in app.session.flashBag.get('danger') %} | ||
238 | - <div class="alert alert-danger">{{ message }}</div> | ||
239 | - {%endfor %} | ||
240 | - | ||
241 | - {% form_theme form 'bootstrap_3_horizontal_layout.html.twig' %} | ||
242 | - {{ form_start(form, {'attr': {'novalidate': 'novalidate'}}) }} | ||
243 | - {{ form_widget(form) }} | ||
244 | - {{ form_end(form) }} | ||
245 | - </div> | ||
246 | - | ||
247 | - | ||
248 | - <div class="col-md-6 wow fadeInRight"> | ||
249 | - <div class="social-links"> | ||
250 | - <a class="social" href="#" target="_blank"><i class="fa fa-facebook fa-2x"></i></a> | ||
251 | - <a class="social" href="#" target="_blank"><i class="fa fa-twitter fa-2x"></i></a> | ||
252 | - <a class="social" href="#" target="_blank"><i class="fa fa-google-plus fa-2x"></i></a> | ||
253 | - <a class="social" href="#" target="_blank"><i class="fa fa-linkedin fa-2x"></i></a> | ||
254 | - </div> | ||
255 | - <div class="contact-info"> | ||
256 | - <p><i class="fa fa-map-marker"></i> Av. Leonardo Da Vinci, Los Chaguaramos, UBV</p> | ||
257 | - <p><i class="fa fa-envelope"></i> ubv@ubv.edu.ve</p> | ||
258 | - </div> | ||
259 | - | ||
260 | - <p> | ||
261 | - Universidad Bolivariana de Venezuela | la casa del diálogo de los saberes.<br> | ||
262 | - </p> | ||
263 | - | ||
264 | - </div> | ||
265 | - | ||
266 | - </div> | ||
267 | - </div> | ||
268 | - </section> | ||
269 | - | ||
270 | - <!-- Conatct Section End--> | ||
271 | - | ||
272 | - <div id="copyright"> | ||
273 | - <div class="container"> | ||
274 | - <div class="col-md-10"><p>© UBV 2016 Todas las izquierdas reservadas ;). </p></div> | ||
275 | - <div class="col-md-2"> | ||
276 | - <span class="to-top pull-right"><a href="#area-principal"><i class="fa fa-angle-up fa-2x"></i></a></span> | ||
277 | - </div> | ||
278 | - </div> | ||
279 | - </div> | ||
280 | - <!-- Copyright Section End--> | ||
281 | - | ||
282 | - | ||
283 | - {% endblock %} | ||
284 | - | ||
285 | - | ||
286 | -{% endblock %} | ||
287 | - | ||
288 | -{% block javascripts %} | ||
289 | - {{ parent() }} | ||
290 | - <script type="text/javascript" src="{{ asset('assets/vendor/lightbox2/dist/js/lightbox.min.js') }}"></script> | ||
291 | - <script type="text/javascript" src="{{ asset('assets/vendor/smooth-scroll/dist/js/smooth-scroll.js') }}" ></script> | ||
292 | - <script type="text/javascript"> | ||
293 | - smoothScroll.init(); | ||
294 | - </script> | ||
295 | -{% endblock %} | ||
296 | - | ||
297 | - |
app/Resources/views/login/login.html.twig
@@ -0,0 +1,112 @@ | @@ -0,0 +1,112 @@ | ||
1 | +{% extends 'base.html.twig' %} | ||
2 | + | ||
3 | + | ||
4 | +{% block stylesheets %} | ||
5 | + {{ parent() }} | ||
6 | + <link rel="stylesheet" href="{{ asset('assets/vendor/AppBundle/login.css') }}"> | ||
7 | +{% endblock %} | ||
8 | + | ||
9 | +{% block body %} | ||
10 | + {% block navegacion %} | ||
11 | + | ||
12 | + | ||
13 | + <nav class="navbar navbar-default"> | ||
14 | + <div class="container-fluid"> | ||
15 | + <div class="navbar-header"> | ||
16 | + <a class="navbar-brand" href="#"> | ||
17 | + Centro de Estudios Ambientales UBV | ||
18 | + </a> | ||
19 | + </div> | ||
20 | + | ||
21 | + <div class="collapse navbar-collapse"> | ||
22 | + <ul class="nav navbar-nav navbar-right"> | ||
23 | + <li><a href="{{ path('homepage') }}">Regresar al Portal</a></li> | ||
24 | + </ul> | ||
25 | + | ||
26 | + </div> | ||
27 | + | ||
28 | + </div> | ||
29 | + | ||
30 | + </nav> | ||
31 | + | ||
32 | + | ||
33 | + {% endblock %} | ||
34 | + | ||
35 | + <div class="content-wrapper"> | ||
36 | + <div class="container"> | ||
37 | + <div class="row"> | ||
38 | + <div class="col-md-12"> | ||
39 | + <h4 class="page-head-line">Acceso al sistema CEA@UBV</h4> | ||
40 | + | ||
41 | + </div> | ||
42 | + | ||
43 | + </div> | ||
44 | + <div class="row"> | ||
45 | + <div class="col-md-6"> | ||
46 | + | ||
47 | + <div class="col-md-4"> | ||
48 | + <img src="{{ asset('bundles/framework/images/portal/logo_ubv.png') }}" /> | ||
49 | + </div> | ||
50 | + | ||
51 | + <div class="col-md-8"> | ||
52 | + {% if error %} | ||
53 | + <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div> | ||
54 | + {% endif %} | ||
55 | + <form action="{{ path('login') }}" method="post" role="form"> | ||
56 | + <div class="form-group"> | ||
57 | + <label for="username">Nombre de Usuario:</label> | ||
58 | + <input type="text" class="form-control" id="username" name="_username" value="{{ last_username }}" /> | ||
59 | + </div> | ||
60 | + | ||
61 | + <div class="form-group"> | ||
62 | + <label for="password">Contraseña:</label> | ||
63 | + <input type="password" class="form-control" id="password" name="_password" /> | ||
64 | + </div> | ||
65 | + | ||
66 | + <input type="hidden" name="_csrf_token" | ||
67 | + value="{{ csrf_token('authenticate') }}" | ||
68 | + > | ||
69 | + | ||
70 | + | ||
71 | + <input type="hidden" name="_target_path" value="{{ path('user_roles') }}" /> | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | + <button class="btn btn-primary" type="submit"><span class="glyphicon glyphicon-user"></span> Ingresar</button> | ||
76 | + </form> | ||
77 | + <hr /> | ||
78 | + </div> | ||
79 | + </div> | ||
80 | + <div class="col-md-5"> | ||
81 | + | ||
82 | + <div class="alert alert-success"> | ||
83 | + <strong> ¿Ingresa por Primera Vez? Aquí unas breves instrucciones:</strong> | ||
84 | + <ul> | ||
85 | + <li> | ||
86 | + A su dirección de Correo deben haber llegado las credenciales de Acceso luego de haber solicitado Adscripción | ||
87 | + </li> | ||
88 | + <li> | ||
89 | + Una vez dentro, realizará el proceso de solicitud de adscripción al CEA | ||
90 | + </li> | ||
91 | + <li> | ||
92 | + Para este proceso debe tener en digital los siguientes documentos: | ||
93 | + <ol> | ||
94 | + <li>Digital de la Constancia de Trabajo (*)</li> | ||
95 | + <li>Digital del Título de Pregrado (*)</li> | ||
96 | + <li>Digital del Título de Postgrado mas reciente</li> | ||
97 | + <li>Digital de la Constancia de Aprobación de Concurso de Oposición</li> | ||
98 | + <li>Digital de la Constancia de Aprobación de Ascensos</li> | ||
99 | + | ||
100 | + </ol> | ||
101 | + </li> | ||
102 | + | ||
103 | + </ul> | ||
104 | + | ||
105 | + </div> | ||
106 | + </div> | ||
107 | + | ||
108 | + </div> | ||
109 | + </div> | ||
110 | + </div> | ||
111 | + | ||
112 | +{% endblock %} | ||
0 | \ No newline at end of file | 113 | \ No newline at end of file |
app/Resources/views/portal/index.html.twig
@@ -0,0 +1,297 @@ | @@ -0,0 +1,297 @@ | ||
1 | + {% extends 'base.html.twig' %} | ||
2 | + | ||
3 | +{% block stylesheets %} | ||
4 | + {{ parent() }} | ||
5 | + <link href="{{ asset('assets/vendor/AppBundle/portal.css') }}" rel="stylesheet"> | ||
6 | + <link href="{{ asset('assets/vendor/lightbox2/dist/css/lightbox.css') }}" rel="stylesheet"> | ||
7 | + | ||
8 | +{% endblock %} | ||
9 | + | ||
10 | +{% block body %} | ||
11 | + | ||
12 | + {% block navegacion %} | ||
13 | + | ||
14 | + | ||
15 | + <!-- Nav Menu Section --> | ||
16 | + <div class="logo-menu"> | ||
17 | + <nav class="navbar navbar-default navbar-fixed-top" role="navigation" data-spy="affix" data-offset-top="50"> | ||
18 | + <div class="container"> | ||
19 | + <!-- Brand and toggle get grouped for better mobile display --> | ||
20 | + <div class="navbar-header col-md-3"> | ||
21 | + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> | ||
22 | + <span class="sr-only">Toggle navigation</span> | ||
23 | + <span class="icon-bar"></span> | ||
24 | + <span class="icon-bar"></span> | ||
25 | + <span class="icon-bar"></span> | ||
26 | + </button> | ||
27 | + <a class="navbar-brand" href="#home"><i class="fa fa-briefcase"></i> CEA@UBV</a> | ||
28 | + </div> | ||
29 | + | ||
30 | + <div class="collapse navbar-collapse" id="navbar"> | ||
31 | + <ul class="nav navbar-nav col-md-9 pull-right"> | ||
32 | + <li class="active"><a data-scroll href="#area-principal"><i class="fa fa-home"></i> Inicio</a></li> | ||
33 | + <li><a data-scroll href="#servicios"><i class="fa fa-cogs"></i> Servicios</a></li> | ||
34 | + <li><a data-scroll href="#actividades"><i class="fa fa-flask"></i> Foto</a></li> | ||
35 | + <li><a data-scroll href="#descarga"><i class="fa fa-puzzle-piece"></i> Descargas</a></li> | ||
36 | + <li><a data-scroll href="#about"><i class="fa fa-info"></i> El CEA</a></li> | ||
37 | + <li><a data-scroll href="#adscripcion"><i class="fa fa-envelope"></i> Adscripción</a></li> | ||
38 | + {% if app.user %} | ||
39 | + <li><a href="{{ path('logout') }}"><i class="fa fa-close"></i> logout</a></li> | ||
40 | + {% else %} | ||
41 | + <li><a href="{{ path('login') }}"><i class="fa fa-user"></i> Ingresar</a></li> | ||
42 | + {% endif %} | ||
43 | + </ul> | ||
44 | + </div> | ||
45 | + </div> | ||
46 | + </nav> | ||
47 | + </div> | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + {% endblock %} <!-- End block navegación --> | ||
52 | + | ||
53 | + {% block principal %} | ||
54 | + <section id="area-principal"> | ||
55 | + <div class="container"> | ||
56 | + <div class="row"> | ||
57 | + <div class="col-md-12"> | ||
58 | + <h1 class="title">CEA - Centro de Estudios Ambientales</h1> | ||
59 | + <h2 class="subtitle">Universidad Bolivariana de Venezuela!</h2> | ||
60 | + | ||
61 | + <img class="col-md-6 col-sm-6 col-xs-12 animated fadeInLeft" src="{{ asset('bundles/framework/images/portal/logo_ubv.png') }}" alt=""> | ||
62 | + | ||
63 | + <div class="col-md-6 col-sm-6 col-xs-12 animated fadeInRight delay-0-5"> | ||
64 | + <p>El Centro de Estudios Ambientales (CEA), constituye un órgano <strong>académico</strong>, para actuar de manera conjunta con las comunidades, organismos del Estado y otros actores sociales en la ejecución de proyectos de desarrollo ecosocialista que garanticen la apropiación del territorio de manera armónica con la naturaleza.</p> | ||
65 | + <a href="#adscripcion" class="btn btn-common btn-lg">Solicitar Adscirpción!</a> | ||
66 | + <a href="#about" class="btn btn-primary btn-lg">Saber más</a> | ||
67 | + </div> | ||
68 | + | ||
69 | + </div> | ||
70 | + | ||
71 | + </div> | ||
72 | + </div> | ||
73 | + </section> | ||
74 | + | ||
75 | + <!-- Fin de área Principal--> | ||
76 | + | ||
77 | + <!-- Servicios del CEA --> | ||
78 | + | ||
79 | + <section id="servicios"> | ||
80 | + <div class="container text-center"> | ||
81 | + <div class="row"> | ||
82 | + <h1 class="title">Servicios que ofrecemos</h1> | ||
83 | + <h2 class="subtitle">Estos son nuestros servicios más importantes</h2> | ||
84 | + | ||
85 | + <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12"> | ||
86 | + <div class="service-item"> | ||
87 | + <img src="{{ asset('bundles/framework/images/portal/escalafon.png') }}" alt=""> | ||
88 | + <h3>Solicitud de Ascenso</h3> | ||
89 | + <p>A través del sistema podrás realizar la solicitud de ascenso y tener un control del estatus del proceso desde que inicia hasta que concluye.</p> | ||
90 | + </div> | ||
91 | + </div> | ||
92 | + | ||
93 | + | ||
94 | + <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12"> | ||
95 | + <div class="service-item"> | ||
96 | + <img src="{{ asset('bundles/framework/images/portal/planificacion.png') }}" alt=""> | ||
97 | + <h3>Planificador Académico</h3> | ||
98 | + <p>A través del sistema podrás crear la planificación de tus actividades y enmarcarlas dentro de los objetivos históricos del plan de patría y los objetivos de la UBV.</p> | ||
99 | + </div> | ||
100 | + </div> | ||
101 | + | ||
102 | + <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12"> | ||
103 | + <div class="service-item"> | ||
104 | + <img src="{{ asset('bundles/framework/images/portal/registro.png') }}" alt=""> | ||
105 | + <h3>Registro Académico</h3> | ||
106 | + <p>A través del sistema del Centro de Estudios Ambienales CEA@UBV podrás tener un control de las actividades académicas que lleves a cabo dentro del mismo (diplomados, cursos, maestrías, doctorados, etc.)</p> | ||
107 | + </div> | ||
108 | + </div> | ||
109 | + | ||
110 | + </div> | ||
111 | + </div> | ||
112 | + </section> | ||
113 | + <!-- Service Section End --> | ||
114 | + | ||
115 | + <!-- seccion de Fotos --> | ||
116 | + | ||
117 | + <section id="actividades"> | ||
118 | + <div class="container"> | ||
119 | + <div class="row"> | ||
120 | + <h1 class="title">Actividades Recientes del CEA</h1> | ||
121 | + <h2 class="subtitle">Fotos</h2> | ||
122 | + | ||
123 | + | ||
124 | + | ||
125 | + <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12"> | ||
126 | + <div class="portfolio-item wow fadeInLeft" data-wow-delay=".5s"> | ||
127 | + <a href="#"><img src="{{ asset('bundles/framework/images/portal/actividades/actividad1.jpg') }}" alt=""></a> | ||
128 | + <div class="overlay"> | ||
129 | + <div class="icons"> | ||
130 | + <a data-lightbox="image1" href="{{ asset('bundles/framework/images/portal/actividades/actividad1.jpg') }}" class="preview"><i class="fa fa-search-plus fa-4x"></i></a> | ||
131 | + </div> | ||
132 | + </div> | ||
133 | + </div> | ||
134 | + </div> | ||
135 | + | ||
136 | + | ||
137 | + <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12"> | ||
138 | + <div class="portfolio-item wow fadeInLeft" data-wow-delay=".7s"> | ||
139 | + <a href="#"><img src="{{ asset('bundles/framework/images/portal/actividades/actividad2.jpg') }}" alt=""></a> | ||
140 | + <div class="overlay"> | ||
141 | + <div class="icons"> | ||
142 | + <a data-lightbox="image1" href="{{ asset('bundles/framework/images/portal/actividades/actividad2.jpg') }}" class="preview"><i class="fa fa-search-plus fa-4x"></i></a> | ||
143 | + </div> | ||
144 | + </div> | ||
145 | + </div> | ||
146 | + </div> | ||
147 | + | ||
148 | + <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12"> | ||
149 | + <div class="portfolio-item wow fadeInLeft" data-wow-delay=".9s"> | ||
150 | + <a href="#"><img src="{{ asset('bundles/framework/images/portal/actividades/actividad3.jpg') }}" alt=""></a> | ||
151 | + <div class="overlay"> | ||
152 | + <div class="icons"> | ||
153 | + <a data-lightbox="image1" href="{{ asset('bundles/framework/images/portal/actividades/actividad3.jpg') }}" class="preview"><i class="fa fa-search-plus fa-4x"></i></a> | ||
154 | + </div> | ||
155 | + </div> | ||
156 | + </div> | ||
157 | + </div> | ||
158 | + | ||
159 | + <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 wow fadeInRight" data-wow-delay="1.1s"> | ||
160 | + <div class="portfolio-item"> | ||
161 | + <a href="#"><img src="{{ asset('bundles/framework/images/portal/actividades/actividad4.jpg') }}" alt=""></a> | ||
162 | + <div class="overlay"> | ||
163 | + <div class="icons"> | ||
164 | + <a data-lightbox="image1" href="{{ asset('bundles/framework/images/portal/actividades/actividad4.jpg') }}" class="preview"><i class="fa fa-search-plus fa-4x"></i></a> | ||
165 | + </div> | ||
166 | + </div> | ||
167 | + </div> | ||
168 | + </div> | ||
169 | + | ||
170 | + | ||
171 | + | ||
172 | + </div> | ||
173 | + </div> | ||
174 | + </section> | ||
175 | + <!-- Portfolio Section End --> | ||
176 | + | ||
177 | + <!-- descarga Section --> | ||
178 | + <section id="descarga"> | ||
179 | + <div class="container"> | ||
180 | + <div class="row"> | ||
181 | + | ||
182 | + <h1 class="title">Descarga de Archivos</h1> | ||
183 | + <h2 class="subtitle">Documentos relacionados con el CEA</h2> | ||
184 | + | ||
185 | + <div class="wow fadeInDown"> | ||
186 | + <img class="col-md-3 col-md-3 col-sm-3 col-xs-12" src="{{ asset('bundles/framework/images/portal/descargas/descarga1.png') }}" alt="documento-1"> | ||
187 | + | ||
188 | + <img class="col-md-3 col-md-3 col-sm-3 col-xs-12" src="{{ asset('bundles/framework/images/portal/descargas/descarga2.png') }}" alt="documento-2"> | ||
189 | + | ||
190 | + <img class="col-md-3 col-md-3 col-sm-3 col-xs-12" src="{{ asset('bundles/framework/images/portal/descargas/descarga3.png') }}" alt="documento-3"> | ||
191 | + | ||
192 | + <img class="col-md-3 col-md-3 col-sm-3 col-xs-12" src="{{ asset('bundles/framework/images/portal/descargas/descarga4.png') }}" alt="documento-4"> | ||
193 | + | ||
194 | + </div> | ||
195 | + </div> | ||
196 | + </div> | ||
197 | + </section> | ||
198 | + <!-- Client Section End --> | ||
199 | + | ||
200 | + | ||
201 | + <!-- Que es el CEA --> | ||
202 | + | ||
203 | + <section id="about"> | ||
204 | + <div class="container"> | ||
205 | + <div class="row"> | ||
206 | + <h1 class="title">Sobre Nosotros</h1> | ||
207 | + <h2 class="subtitle">¿Qué es el CEA?</h2> | ||
208 | + | ||
209 | + <div class="col-md-8 col-sm-12"> | ||
210 | + <p> | ||
211 | + El Centro de Estudios Ambientales (CEA), creado en el año 2008, constituye un órgano académico que realza el vínculo, ya existente, entre la comunidad ubevista emergente del pueblo venezolano desde áreas académicas Ordenamiento Territorial, Hábitat y Ecodesarrollo y Soberanía Alimentaria cuyo propósito es el desarrollo de actividades académicas vinculada con la investigación y el desarrollo comunitario que contribuyan a la formación de ciudadanos profesionales con carácter integral, para actuar de manera conjunta con las comunidades, organismos del Estado y otros actores sociales en la ejecución de proyectos de desarrollo ecosocialista que garanticen la apropiación del territorio de manera armónica con la naturaleza y la promoción de la seguridad alimentaria, que se ajusten a las necesidades imperantes de las comunidades, bajo el esquema de la solidaridad, amor, cooperación, la reciprocidad, el intercambio equitativo y la tolerancia desde un nuevo modelo ecosocialista. | ||
212 | + </p> | ||
213 | + </div> | ||
214 | + | ||
215 | + <img class="col-md-4 col-md-4 col-sm-12 col-xs-12" src="{{ asset('bundles/framework/images/portal/logo_ubv.png') }}" alt=""> | ||
216 | + | ||
217 | + </div> | ||
218 | + </div> | ||
219 | + </section> | ||
220 | + <!-- Que es el CEA End --> | ||
221 | + | ||
222 | + | ||
223 | + <!-- Adscripcion Section --> | ||
224 | + <section id="adscripcion"> | ||
225 | + <div class="container text-center"> | ||
226 | + <div class="row"> | ||
227 | + <h1 class="title">Solicitar Ingreso a <code>cea@ubv</code></h1> | ||
228 | + | ||
229 | + <h2 class="subtitle">Llenar este sencillo formulario es el primer paso a la adscripción</h2> | ||
230 | + | ||
231 | + | ||
232 | + <div class="col-md-6 wow fadeInLeft" data-wow-delay=".5s"> | ||
233 | + {% for message in app.session.flashBag.get('notice') %} | ||
234 | + <div class="alert alert-success">{{ message }}</div> | ||
235 | + {%endfor %} | ||
236 | + | ||
237 | + {% for message in app.session.flashBag.get('danger') %} | ||
238 | + <div class="alert alert-danger">{{ message }}</div> | ||
239 | + {%endfor %} | ||
240 | + | ||
241 | + {% form_theme form 'bootstrap_3_horizontal_layout.html.twig' %} | ||
242 | + {{ form_start(form, {'attr': {'novalidate': 'novalidate'}}) }} | ||
243 | + {{ form_widget(form) }} | ||
244 | + {{ form_end(form) }} | ||
245 | + </div> | ||
246 | + | ||
247 | + | ||
248 | + <div class="col-md-6 wow fadeInRight"> | ||
249 | + <div class="social-links"> | ||
250 | + <a class="social" href="#" target="_blank"><i class="fa fa-facebook fa-2x"></i></a> | ||
251 | + <a class="social" href="#" target="_blank"><i class="fa fa-twitter fa-2x"></i></a> | ||
252 | + <a class="social" href="#" target="_blank"><i class="fa fa-google-plus fa-2x"></i></a> | ||
253 | + <a class="social" href="#" target="_blank"><i class="fa fa-linkedin fa-2x"></i></a> | ||
254 | + </div> | ||
255 | + <div class="contact-info"> | ||
256 | + <p><i class="fa fa-map-marker"></i> Av. Leonardo Da Vinci, Los Chaguaramos, UBV</p> | ||
257 | + <p><i class="fa fa-envelope"></i> ubv@ubv.edu.ve</p> | ||
258 | + </div> | ||
259 | + | ||
260 | + <p> | ||
261 | + Universidad Bolivariana de Venezuela | la casa del diálogo de los saberes.<br> | ||
262 | + </p> | ||
263 | + | ||
264 | + </div> | ||
265 | + | ||
266 | + </div> | ||
267 | + </div> | ||
268 | + </section> | ||
269 | + | ||
270 | + <!-- Conatct Section End--> | ||
271 | + | ||
272 | + <div id="copyright"> | ||
273 | + <div class="container"> | ||
274 | + <div class="col-md-10"><p>© UBV 2016 Todas las izquierdas reservadas ;). </p></div> | ||
275 | + <div class="col-md-2"> | ||
276 | + <span class="to-top pull-right"><a href="#area-principal"><i class="fa fa-angle-up fa-2x"></i></a></span> | ||
277 | + </div> | ||
278 | + </div> | ||
279 | + </div> | ||
280 | + <!-- Copyright Section End--> | ||
281 | + | ||
282 | + | ||
283 | + {% endblock %} | ||
284 | + | ||
285 | + | ||
286 | +{% endblock %} | ||
287 | + | ||
288 | +{% block javascripts %} | ||
289 | + {{ parent() }} | ||
290 | + <script type="text/javascript" src="{{ asset('assets/vendor/lightbox2/dist/js/lightbox.min.js') }}"></script> | ||
291 | + <script type="text/javascript" src="{{ asset('assets/vendor/smooth-scroll/dist/js/smooth-scroll.js') }}" ></script> | ||
292 | + <script type="text/javascript"> | ||
293 | + smoothScroll.init(); | ||
294 | + </script> | ||
295 | +{% endblock %} | ||
296 | + | ||
297 | + |
app/Resources/views/registration/register.html.twig
@@ -1,84 +0,0 @@ | @@ -1,84 +0,0 @@ | ||
1 | -{% extends 'base_app.html.twig' %} | ||
2 | - | ||
3 | -{% block stylesheets %} | ||
4 | - {{ parent() }} | ||
5 | - | ||
6 | - <style> | ||
7 | - .esc_oposicion, .esc_asistente, .esc_agregado, .esc_asociado, .esc_titular{ | ||
8 | - display: none; | ||
9 | - } | ||
10 | - </style> | ||
11 | -{% endblock %} | ||
12 | - | ||
13 | - | ||
14 | - | ||
15 | -{% block body %} | ||
16 | - <div class="account-container register"> | ||
17 | - <div class="content clearfix"> | ||
18 | - <h1>Solicitud Adscripción</h1> | ||
19 | - {% form_theme form 'bootstrap_3_layout.html.twig' %} | ||
20 | - {{ form_start(form) }} | ||
21 | - {{ form_widget(form) }} | ||
22 | - </div> | ||
23 | - | ||
24 | - </div> | ||
25 | - | ||
26 | - | ||
27 | -{% endblock %} | ||
28 | - | ||
29 | - | ||
30 | - | ||
31 | - | ||
32 | -{% block javascripts %} | ||
33 | - {{ parent() }} | ||
34 | - <script type="text/javascript"> | ||
35 | - $('#user_oposicion').click(function() { | ||
36 | - $('.esc_oposicion')[this.checked ? "show" : "hide"](); | ||
37 | - $("#user_escala").prop('required', $(this).prop("checked")); | ||
38 | - $("#user_fecha_oposicion_day").prop('required', $(this).prop("checked")); | ||
39 | - $("#user_fecha_oposicion_month").prop('required', $(this).prop("checked")); | ||
40 | - $("#user_fecha_oposicion_year").prop('required', $(this).prop("checked")); | ||
41 | - $("#user_documento_oposicion").prop('required', $(this).prop("checked")); | ||
42 | - }); | ||
43 | - | ||
44 | - $('#user_ascenso').click(function() { | ||
45 | - alert($("#user_escala").val()); | ||
46 | - if($("#user_escala").val() == 1) | ||
47 | - $('.esc_asistente')[this.checked ? "show" : "hide"](); | ||
48 | - if($("#user_escala").val() == 2) | ||
49 | - $('.esc_asociado')[this.checked ? "show" : "hide"](); | ||
50 | - if($("#user_escala").val() == 3) | ||
51 | - $('.esc_agregado')[this.checked ? "show" : "hide"](); | ||
52 | - if($("#user_escala").val() == 4) | ||
53 | - $('.esc_titular')[this.checked ? "show" : "hide"](); | ||
54 | - | ||
55 | - | ||
56 | - }); | ||
57 | - | ||
58 | - | ||
59 | - $('#user_ascenso2').click(function() { | ||
60 | - alert($("#user_escala").val()); | ||
61 | - $('.esc_asociado')[this.checked ? "show" : "hide"](); | ||
62 | - | ||
63 | - }); | ||
64 | - | ||
65 | - $('#user_ascenso3').click(function() { | ||
66 | - | ||
67 | - $('.esc_agregado')[this.checked ? "show" : "hide"](); | ||
68 | - | ||
69 | - }); | ||
70 | - | ||
71 | - $('#user_ascenso4').click(function() { | ||
72 | - | ||
73 | - $('.esc_titular')[this.checked ? "show" : "hide"](); | ||
74 | - }); | ||
75 | - | ||
76 | - | ||
77 | - $('#user_escala').change(function(){ | ||
78 | - alert($('#user_escala').val()) | ||
79 | - if ($('#user_escala').val() >= 1) $('#user_oposicion').attr('disabled',true); | ||
80 | - else $('#user_oposicion').attr('disabled',false); | ||
81 | - }); | ||
82 | - | ||
83 | - </script> | ||
84 | -{% endblock %} |
app/Resources/views/registration/register.html.twig~
@@ -1,44 +0,0 @@ | @@ -1,44 +0,0 @@ | ||
1 | -{% extends 'base.html.twig' %} | ||
2 | - | ||
3 | -{% block body %} | ||
4 | - {% form_theme form 'bootstrap_3_horizontal_layout.html.twig' %} | ||
5 | - {{ form_start(form) }} | ||
6 | - {{ form_widget(form) }} | ||
7 | - | ||
8 | - | ||
9 | -{% endblock %} | ||
10 | - | ||
11 | -{% block stylesheets %} | ||
12 | - {{ parent() }} | ||
13 | - <style> | ||
14 | - .esc_oposicion, .esc_asistente, .esc_agregado{ | ||
15 | - display: none; | ||
16 | - } | ||
17 | - </style> | ||
18 | -{% endblock %} | ||
19 | - | ||
20 | - | ||
21 | -{% block javascripts %} | ||
22 | - {{ parent() }} | ||
23 | - <script type="text/javascript"> | ||
24 | - $('#user_oposicion').click(function() { | ||
25 | - $('.esc_oposicion')[this.checked ? "show" : "hide"](); | ||
26 | - }); | ||
27 | - | ||
28 | - $('#user_ascenso').click(function() { | ||
29 | - //alert($("#user_escalafones").val()); | ||
30 | - if($("#user_escalafones").val() == 1) | ||
31 | - $('.esc_asistente')[this.checked ? "show" : "hide"](); | ||
32 | - if($("#user_escalafones").val() == 2) | ||
33 | - $('.esc_agregado')[this.checked ? "show" : "hide"](); | ||
34 | - }); | ||
35 | - | ||
36 | - | ||
37 | - $('#user_ascenso2').click(function() { | ||
38 | - alert($('.esc_asistente').val()); | ||
39 | - if($("#user_escalafones").val() == 2) | ||
40 | - $('.esc_agregado')[this.checked ? "show" : "hide"](); | ||
41 | - }); | ||
42 | - | ||
43 | - </script> | ||
44 | -{% endblock %} |
app/Resources/views/security/login.html.twig
@@ -1,112 +0,0 @@ | @@ -1,112 +0,0 @@ | ||
1 | -{% extends 'base.html.twig' %} | ||
2 | - | ||
3 | - | ||
4 | -{% block stylesheets %} | ||
5 | - {{ parent() }} | ||
6 | - <link rel="stylesheet" href="{{ asset('assets/vendor/AppBundle/login.css') }}"> | ||
7 | -{% endblock %} | ||
8 | - | ||
9 | -{% block body %} | ||
10 | - {% block navegacion %} | ||
11 | - | ||
12 | - | ||
13 | - <nav class="navbar navbar-default"> | ||
14 | - <div class="container-fluid"> | ||
15 | - <div class="navbar-header"> | ||
16 | - <a class="navbar-brand" href="#"> | ||
17 | - Centro de Estudios Ambientales UBV | ||
18 | - </a> | ||
19 | - </div> | ||
20 | - | ||
21 | - <div class="collapse navbar-collapse"> | ||
22 | - <ul class="nav navbar-nav navbar-right"> | ||
23 | - <li><a href="{{ path('homepage') }}">Regresar al Portal</a></li> | ||
24 | - </ul> | ||
25 | - | ||
26 | - </div> | ||
27 | - | ||
28 | - </div> | ||
29 | - | ||
30 | - </nav> | ||
31 | - | ||
32 | - | ||
33 | - {% endblock %} | ||
34 | - | ||
35 | - <div class="content-wrapper"> | ||
36 | - <div class="container"> | ||
37 | - <div class="row"> | ||
38 | - <div class="col-md-12"> | ||
39 | - <h4 class="page-head-line">Acceso al sistema CEA@UBV</h4> | ||
40 | - | ||
41 | - </div> | ||
42 | - | ||
43 | - </div> | ||
44 | - <div class="row"> | ||
45 | - <div class="col-md-6"> | ||
46 | - | ||
47 | - <div class="col-md-4"> | ||
48 | - <img src="{{ asset('bundles/framework/images/portal/logo_ubv.png') }}" /> | ||
49 | - </div> | ||
50 | - | ||
51 | - <div class="col-md-8"> | ||
52 | - {% if error %} | ||
53 | - <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div> | ||
54 | - {% endif %} | ||
55 | - <form action="{{ path('login') }}" method="post" role="form"> | ||
56 | - <div class="form-group"> | ||
57 | - <label for="username">Nombre de Usuario:</label> | ||
58 | - <input type="text" class="form-control" id="username" name="_username" value="{{ last_username }}" /> | ||
59 | - </div> | ||
60 | - | ||
61 | - <div class="form-group"> | ||
62 | - <label for="password">Contraseña:</label> | ||
63 | - <input type="password" class="form-control" id="password" name="_password" /> | ||
64 | - </div> | ||
65 | - | ||
66 | - <input type="hidden" name="_csrf_token" | ||
67 | - value="{{ csrf_token('authenticate') }}" | ||
68 | - > | ||
69 | - | ||
70 | - | ||
71 | - <input type="hidden" name="_target_path" value="{{ path('user_roles') }}" /> | ||
72 | - | ||
73 | - | ||
74 | - | ||
75 | - <button class="btn btn-primary" type="submit"><span class="glyphicon glyphicon-user"></span> Ingresar</button> | ||
76 | - </form> | ||
77 | - <hr /> | ||
78 | - </div> | ||
79 | - </div> | ||
80 | - <div class="col-md-5"> | ||
81 | - | ||
82 | - <div class="alert alert-success"> | ||
83 | - <strong> ¿Ingresa por Primera Vez? Aquí unas breves instrucciones:</strong> | ||
84 | - <ul> | ||
85 | - <li> | ||
86 | - A su dirección de Correo deben haber llegado las credenciales de Acceso luego de haber solicitado Adscripción | ||
87 | - </li> | ||
88 | - <li> | ||
89 | - Una vez dentro, realizará el proceso de solicitud de adscripción al CEA | ||
90 | - </li> | ||
91 | - <li> | ||
92 | - Para este proceso debe tener en digital los siguientes documentos: | ||
93 | - <ol> | ||
94 | - <li>Digital de la Constancia de Trabajo (*)</li> | ||
95 | - <li>Digital del Título de Pregrado (*)</li> | ||
96 | - <li>Digital del Título de Postgrado mas reciente</li> | ||
97 | - <li>Digital de la Constancia de Aprobación de Concurso de Oposición</li> | ||
98 | - <li>Digital de la Constancia de Aprobación de Ascensos</li> | ||
99 | - | ||
100 | - </ol> | ||
101 | - </li> | ||
102 | - | ||
103 | - </ul> | ||
104 | - | ||
105 | - </div> | ||
106 | - </div> | ||
107 | - | ||
108 | - </div> | ||
109 | - </div> | ||
110 | - </div> | ||
111 | - | ||
112 | -{% endblock %} | ||
113 | \ No newline at end of file | 0 | \ No newline at end of file |
app/Resources/views/solicitudes/adscripcion.html.twig
@@ -0,0 +1,84 @@ | @@ -0,0 +1,84 @@ | ||
1 | +{% extends 'base_app.html.twig' %} | ||
2 | + | ||
3 | +{% block stylesheets %} | ||
4 | + {{ parent() }} | ||
5 | + | ||
6 | + <style> | ||
7 | + .esc_oposicion, .esc_asistente, .esc_agregado, .esc_asociado, .esc_titular{ | ||
8 | + display: none; | ||
9 | + } | ||
10 | + </style> | ||
11 | +{% endblock %} | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | +{% block body %} | ||
16 | + <div class="account-container register"> | ||
17 | + <div class="content clearfix"> | ||
18 | + <h1>Solicitud Adscripción</h1> | ||
19 | + {% form_theme form 'bootstrap_3_layout.html.twig' %} | ||
20 | + {{ form_start(form) }} | ||
21 | + {{ form_widget(form) }} | ||
22 | + </div> | ||
23 | + | ||
24 | + </div> | ||
25 | + | ||
26 | + | ||
27 | +{% endblock %} | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | +{% block javascripts %} | ||
33 | + {{ parent() }} | ||
34 | + <script type="text/javascript"> | ||
35 | + $('#user_oposicion').click(function() { | ||
36 | + $('.esc_oposicion')[this.checked ? "show" : "hide"](); | ||
37 | + $("#user_escala").prop('required', $(this).prop("checked")); | ||
38 | + $("#user_fecha_oposicion_day").prop('required', $(this).prop("checked")); | ||
39 | + $("#user_fecha_oposicion_month").prop('required', $(this).prop("checked")); | ||
40 | + $("#user_fecha_oposicion_year").prop('required', $(this).prop("checked")); | ||
41 | + $("#user_documento_oposicion").prop('required', $(this).prop("checked")); | ||
42 | + }); | ||
43 | + | ||
44 | + $('#user_ascenso').click(function() { | ||
45 | + alert($("#user_escala").val()); | ||
46 | + if($("#user_escala").val() == 1) | ||
47 | + $('.esc_asistente')[this.checked ? "show" : "hide"](); | ||
48 | + if($("#user_escala").val() == 2) | ||
49 | + $('.esc_asociado')[this.checked ? "show" : "hide"](); | ||
50 | + if($("#user_escala").val() == 3) | ||
51 | + $('.esc_agregado')[this.checked ? "show" : "hide"](); | ||
52 | + if($("#user_escala").val() == 4) | ||
53 | + $('.esc_titular')[this.checked ? "show" : "hide"](); | ||
54 | + | ||
55 | + | ||
56 | + }); | ||
57 | + | ||
58 | + | ||
59 | + $('#user_ascenso2').click(function() { | ||
60 | + alert($("#user_escala").val()); | ||
61 | + $('.esc_asociado')[this.checked ? "show" : "hide"](); | ||
62 | + | ||
63 | + }); | ||
64 | + | ||
65 | + $('#user_ascenso3').click(function() { | ||
66 | + | ||
67 | + $('.esc_agregado')[this.checked ? "show" : "hide"](); | ||
68 | + | ||
69 | + }); | ||
70 | + | ||
71 | + $('#user_ascenso4').click(function() { | ||
72 | + | ||
73 | + $('.esc_titular')[this.checked ? "show" : "hide"](); | ||
74 | + }); | ||
75 | + | ||
76 | + | ||
77 | + $('#user_escala').change(function(){ | ||
78 | + alert($('#user_escala').val()) | ||
79 | + if ($('#user_escala').val() >= 1) $('#user_oposicion').attr('disabled',true); | ||
80 | + else $('#user_oposicion').attr('disabled',false); | ||
81 | + }); | ||
82 | + | ||
83 | + </script> | ||
84 | +{% endblock %} |
app/Resources/views/solicitudes/register.html.twig~
@@ -0,0 +1,44 @@ | @@ -0,0 +1,44 @@ | ||
1 | +{% extends 'base.html.twig' %} | ||
2 | + | ||
3 | +{% block body %} | ||
4 | + {% form_theme form 'bootstrap_3_horizontal_layout.html.twig' %} | ||
5 | + {{ form_start(form) }} | ||
6 | + {{ form_widget(form) }} | ||
7 | + | ||
8 | + | ||
9 | +{% endblock %} | ||
10 | + | ||
11 | +{% block stylesheets %} | ||
12 | + {{ parent() }} | ||
13 | + <style> | ||
14 | + .esc_oposicion, .esc_asistente, .esc_agregado{ | ||
15 | + display: none; | ||
16 | + } | ||
17 | + </style> | ||
18 | +{% endblock %} | ||
19 | + | ||
20 | + | ||
21 | +{% block javascripts %} | ||
22 | + {{ parent() }} | ||
23 | + <script type="text/javascript"> | ||
24 | + $('#user_oposicion').click(function() { | ||
25 | + $('.esc_oposicion')[this.checked ? "show" : "hide"](); | ||
26 | + }); | ||
27 | + | ||
28 | + $('#user_ascenso').click(function() { | ||
29 | + //alert($("#user_escalafones").val()); | ||
30 | + if($("#user_escalafones").val() == 1) | ||
31 | + $('.esc_asistente')[this.checked ? "show" : "hide"](); | ||
32 | + if($("#user_escalafones").val() == 2) | ||
33 | + $('.esc_agregado')[this.checked ? "show" : "hide"](); | ||
34 | + }); | ||
35 | + | ||
36 | + | ||
37 | + $('#user_ascenso2').click(function() { | ||
38 | + alert($('.esc_asistente').val()); | ||
39 | + if($("#user_escalafones").val() == 2) | ||
40 | + $('.esc_agregado')[this.checked ? "show" : "hide"](); | ||
41 | + }); | ||
42 | + | ||
43 | + </script> | ||
44 | +{% endblock %} |
src/AppBundle/Controller/AdscripcionController.php
@@ -0,0 +1,202 @@ | @@ -0,0 +1,202 @@ | ||
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: ubv-cipee | ||
5 | + * Date: 29/06/16 | ||
6 | + * Time: 09:08 AM | ||
7 | + */ | ||
8 | + | ||
9 | +namespace AppBundle\Controller; | ||
10 | + | ||
11 | +use AppBundle\Form\UserType; | ||
12 | +use Symfony\Component\HttpFoundation\File\UploadedFile; | ||
13 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
14 | +use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
15 | +use Symfony\Component\HttpFoundation\Request; | ||
16 | +use AppBundle\Entity\Adscripcion; | ||
17 | +use AppBundle\Entity\DocenteEscala; | ||
18 | + | ||
19 | +class AdscripcionController extends Controller | ||
20 | +{ | ||
21 | + /** | ||
22 | + * @Route("/solicitud/adscripcion", name="solicitud_adscripcion") | ||
23 | + */ | ||
24 | + public function registerAction(Request $request) | ||
25 | + { | ||
26 | + //si ya se adscribió redirigirlo a la página principal del sistema | ||
27 | + if($this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findOneByIdRolInstitucion($this->getUser()->getIdRolInstitucion()->getId())){ | ||
28 | + return $this->redirect($this->generateUrl('cea_index')); | ||
29 | + } | ||
30 | + | ||
31 | + | ||
32 | + $adscripcion = new Adscripcion(); | ||
33 | + $escala = new DocenteEscala(); | ||
34 | + | ||
35 | + /** @var TYPE_NAME $form */ | ||
36 | + $form = $this->createForm('AppBundle\Form\UserType'); | ||
37 | + $form->handleRequest($request); | ||
38 | + | ||
39 | + $form->get('escala')->getData(); | ||
40 | + | ||
41 | + if ($form->isSubmitted() && $form->isValid()) { | ||
42 | + //var_dump($form->get('lineas_investigacion')->getData()); exit; | ||
43 | + | ||
44 | + // $file stores the uploaded PDF file | ||
45 | + /** @var UploadedFile $constanciaTrabajo */ | ||
46 | + $constanciaTrabajo = $form->get('trabajo')->getData(); | ||
47 | + /** @var UploadedFile $constanciaPregrado */ | ||
48 | + $constanciaPregrado = $form->get('pregrado')->getData(); | ||
49 | + | ||
50 | + | ||
51 | + | ||
52 | + // Generate a unique name for the file before saving it | ||
53 | + $nombreTrabajo = md5(uniqid()).'.'.$constanciaTrabajo->guessExtension(); | ||
54 | + $nombrePregrado = md5(uniqid()).'.'.$constanciaPregrado->guessExtension(); | ||
55 | + | ||
56 | + // Move the file to the directory where brochures are stored | ||
57 | + $constanciaTrabajo->move( | ||
58 | + $this->container->getParameter('adscripcion_directory'), | ||
59 | + $nombreTrabajo | ||
60 | + ); | ||
61 | + | ||
62 | + $constanciaPregrado->move( | ||
63 | + $this->container->getParameter('adscripcion_directory'), | ||
64 | + $nombrePregrado | ||
65 | + ); | ||
66 | + | ||
67 | + if($form->get('postgrado')->getData()) { | ||
68 | + /** @var UploadedFile $constanciaPostgrado */ | ||
69 | + $constanciaPostgrado = $form->get('postgrado')->getData(); | ||
70 | + $nombrePostgrado = md5(uniqid()).'.'.$constanciaPostgrado->guessExtension(); | ||
71 | + $constanciaPostgrado->move( | ||
72 | + $this->container->getParameter('adscripcion_directory'), | ||
73 | + $nombrePostgrado | ||
74 | + ); | ||
75 | + $adscripcion->setPostgrado($nombrePostgrado); | ||
76 | + } | ||
77 | + $em = $this->getDoctrine()->getManager(); | ||
78 | + | ||
79 | + $adscripcion->setTrabajo($nombreTrabajo); | ||
80 | + $adscripcion->setPregrado($nombrePregrado); | ||
81 | + $adscripcion->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
82 | + $adscripcion->setFechaIngreso($form->get('fecha_ingreso')->getData()); | ||
83 | + $adscripcion->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(2)); | ||
84 | + | ||
85 | + | ||
86 | + if ($form->get('escala')->getData()){ | ||
87 | + $escala->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
88 | + $escala->setFechaEscala($form->get('fecha_oposicion')->getData()); | ||
89 | + $escala->setIdEscala($form->get('escala')->getData()); | ||
90 | + $escala->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(1)); | ||
91 | + $em->persist($escala); | ||
92 | + | ||
93 | + if($form->get('documento_oposicion')->getData()) { | ||
94 | + $constanciaOposicion = $form->get('documento_oposicion')->getData(); | ||
95 | + $nombreOposicion = md5(uniqid()).'.'.$constanciaOposicion->guessExtension(); | ||
96 | + $constanciaOposicion->move( | ||
97 | + $this->container->getParameter('adscripcion_directory'), | ||
98 | + $nombreOposicion | ||
99 | + ); | ||
100 | + $adscripcion->setOposicion($nombreOposicion); | ||
101 | + $adscripcion->setIdLineaInvestigacion($form->get('lineas_investigacion')->getData()); | ||
102 | + $adscripcion->setTituloTrabajo($form->get('titulo_trabajo')->getData()); | ||
103 | + } | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + if ($form->get('documento_asistente')->getData()) { | ||
109 | + $escala2 = new DocenteEscala(); | ||
110 | + $asistente = $this->getDoctrine()->getRepository('AppBundle:Escalafones')->findOneById(2); | ||
111 | + $escala2->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
112 | + $escala2->setFechaEscala($form->get('fecha_ascenso_asistente')->getData()); | ||
113 | + $escala2->setIdEscala($asistente); | ||
114 | + $escala2->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); | ||
115 | + $em->persist($escala2); | ||
116 | + | ||
117 | + $constanciaAsistente = $form->get('documento_asistente')->getData(); | ||
118 | + $nombreAsistente = md5(uniqid()).'.'.$constanciaAsistente->guessExtension(); | ||
119 | + $constanciaAsistente->move( | ||
120 | + $this->container->getParameter('adscripcion_directory'), | ||
121 | + $nombreAsistente | ||
122 | + ); | ||
123 | + $adscripcion->setAsistente($nombreAsistente); | ||
124 | + | ||
125 | + | ||
126 | + } | ||
127 | + | ||
128 | + if ($form->get('documento_asociado')->getData()) { | ||
129 | + $escala3 = new DocenteEscala(); | ||
130 | + $asociado = $this->getDoctrine()->getRepository('AppBundle:Escalafones')->findOneById(3); | ||
131 | + $escala3->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
132 | + $escala3->setFechaEscala($form->get('fecha_ascenso_asociado')->getData()); | ||
133 | + $escala3->setIdEscala($asociado); | ||
134 | + $escala3->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); | ||
135 | + $em->persist($escala3); | ||
136 | + | ||
137 | + $constanciaAsociado = $form->get('documento_asociado')->getData(); | ||
138 | + $nombreAsociado = md5(uniqid()).'.'.$constanciaAsociado->guessExtension(); | ||
139 | + $constanciaAsociado->move( | ||
140 | + $this->container->getParameter('adscripcion_directory'), | ||
141 | + $nombreAsociado | ||
142 | + ); | ||
143 | + $adscripcion->setAsociado($nombreAsociado); | ||
144 | + } | ||
145 | + | ||
146 | + | ||
147 | + if ($form->get('documento_agregado')->getData()) { | ||
148 | + $escala4 = new DocenteEscala(); | ||
149 | + $agregado = $this->getDoctrine()->getRepository('AppBundle:Escalafones')->findOneById(4); | ||
150 | + $escala4->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
151 | + $escala4->setFechaEscala($form->get('fecha_ascenso_agregado')->getData()); | ||
152 | + $escala4->setIdEscala($agregado); | ||
153 | + $escala4->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); | ||
154 | + $em->persist($escala4); | ||
155 | + | ||
156 | + $constanciaAgregado = $form->get('documento_agregado')->getData(); | ||
157 | + $nombreAgregado = md5(uniqid()).'.'.$constanciaAgregado->guessExtension(); | ||
158 | + $constanciaAgregado->move( | ||
159 | + $this->container->getParameter('adscripcion_directory'), | ||
160 | + $nombreAgregado | ||
161 | + ); | ||
162 | + $adscripcion->setAgreado($nombreAgregado); | ||
163 | + } | ||
164 | + | ||
165 | + | ||
166 | + if ($form->get('documento_titular')->getData()) { | ||
167 | + $escala5 = new DocenteEscala(); | ||
168 | + $titular = $this->getDoctrine()->getRepository('AppBundle:Escalafones')->findOneById(5); | ||
169 | + $escala5->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
170 | + $escala5->setFechaEscala($form->get('fecha_ascenso_titular')->getData()); | ||
171 | + $escala5->setIdEscala($titular); | ||
172 | + $escala5->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); | ||
173 | + $em->persist($escala5); | ||
174 | + | ||
175 | + $constanciaTitular = $form->get('documento_titular')->getData(); | ||
176 | + $nombreTitular = md5(uniqid()).'.'.$constanciaTitular->guessExtension(); | ||
177 | + $constanciaTitular->move( | ||
178 | + $this->container->getParameter('adscripcion_directory'), | ||
179 | + $nombreTitular | ||
180 | + ); | ||
181 | + $adscripcion->setTitular($nombreTitular); | ||
182 | + } | ||
183 | + | ||
184 | + } | ||
185 | + | ||
186 | + $em->persist($adscripcion); | ||
187 | + | ||
188 | + | ||
189 | + $em->flush(); //guarda en la base de datos | ||
190 | + | ||
191 | + | ||
192 | + | ||
193 | + | ||
194 | + return $this->redirect($this->generateUrl('cea_index')); | ||
195 | + } | ||
196 | + | ||
197 | + return $this->render( | ||
198 | + 'solicitudes/adscripcion.html.twig', | ||
199 | + array('form' => $form->createView()) | ||
200 | + ); | ||
201 | + } | ||
202 | +} |
src/AppBundle/Controller/AppController.php
@@ -0,0 +1,87 @@ | @@ -0,0 +1,87 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | +/* | ||
4 | + * To change this license header, choose License Headers in Project Properties. | ||
5 | + * To change this template file, choose Tools | Templates | ||
6 | + * and open the template in the editor. | ||
7 | + */ | ||
8 | + | ||
9 | +namespace AppBundle\Controller; | ||
10 | +use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
11 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
12 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | ||
13 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
14 | + | ||
15 | +use AppBundle\Entity\Adscripcion; | ||
16 | + | ||
17 | + | ||
18 | +/** | ||
19 | + * Description of DocenteController | ||
20 | + * | ||
21 | + * @author ubv-cipee | ||
22 | + * | ||
23 | + * @Route("/ceapp") | ||
24 | + * | ||
25 | + */ | ||
26 | + | ||
27 | +class AppController extends Controller { | ||
28 | + | ||
29 | + /** | ||
30 | + * Pagina principal de inicio de la session Docente. | ||
31 | + * | ||
32 | + * @Route("/", name="cea_index") | ||
33 | + * @Method("GET") | ||
34 | + */ | ||
35 | + public function indexAction() | ||
36 | + { | ||
37 | + $adscripcion = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')-> | ||
38 | + findOneByIdRolInstitucion($this->getUser()->getIdRolInstitucion()->getId()); | ||
39 | + //si no ha solicitado adscripción regresa a la pagina de adscripcion | ||
40 | + if(!$adscripcion) return $this->redirect($this->generateUrl('solicitud_adscripcion')); | ||
41 | + //solicitud aprobada está en falso | ||
42 | + $adscrito = false; | ||
43 | + if($adscripcion->getIdEstatus()->getId() == 1) $adscrito = true; | ||
44 | + | ||
45 | + return $this->render('cea/index.html.twig', array ( | ||
46 | + 'adscrito' => $adscrito | ||
47 | + )); | ||
48 | + } | ||
49 | + | ||
50 | + /** | ||
51 | + * Pagina principal de inicio de la session Docente. | ||
52 | + * | ||
53 | + * @Route("/solicitudes", name="cea_solicitudes") | ||
54 | + * @Method("GET") | ||
55 | + * @Security("has_role('ROLE_COORDINADOR_NACIONAL')") | ||
56 | + */ | ||
57 | + public function verSolicitudesAction() | ||
58 | + { | ||
59 | + | ||
60 | + $adscripciones = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findBy(array('idEstatus' => 2)); | ||
61 | + | ||
62 | + return $this->render('cea/solicitudes.html.twig', array( | ||
63 | + 'adscripciones' => $adscripciones | ||
64 | + )); | ||
65 | + } | ||
66 | + | ||
67 | + /** | ||
68 | + * Encuentra y muestra una entidad de tipo Adscripción. | ||
69 | + * | ||
70 | + * @Route("/solicitudes/{id}", name="cea_solicitudes_show") | ||
71 | + * @Method("GET") | ||
72 | + */ | ||
73 | + public function solicitudesShowAction(Adscripcion $adscripcion) | ||
74 | + { | ||
75 | + //$deleteForm = $this->createDeleteForm($usuario); | ||
76 | + $escala = $this->getDoctrine()->getRepository('AppBundle:DocenteEscala')->findBy(array( | ||
77 | + 'idRolInstitucion' => $adscripcion->getIdRolInstitucion()->getId() | ||
78 | + )); | ||
79 | + | ||
80 | + return $this->render('cea/solicitudes_mostar.html.twig', array( | ||
81 | + 'adscripcion' => $adscripcion, | ||
82 | + 'escalas' => $escala | ||
83 | + )); | ||
84 | + } | ||
85 | + | ||
86 | +} | ||
87 | + | ||
0 | \ No newline at end of file | 88 | \ No newline at end of file |
src/AppBundle/Controller/DefaultController.php
@@ -1,124 +0,0 @@ | @@ -1,124 +0,0 @@ | ||
1 | -<?php | ||
2 | - | ||
3 | -namespace AppBundle\Controller; | ||
4 | - | ||
5 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | -use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
7 | -use Symfony\Component\HttpFoundation\Request; | ||
8 | - | ||
9 | -use AppBundle\Entity\Usuarios; | ||
10 | - | ||
11 | -class DefaultController extends Controller | ||
12 | -{ | ||
13 | - /** | ||
14 | - * @Route("/", name="homepage") | ||
15 | - */ | ||
16 | - public function indexAction(Request $request) | ||
17 | - { | ||
18 | - $form = $this->createForm('AppBundle\Form\SolicitarType'); | ||
19 | - $form->handleRequest($request); | ||
20 | - | ||
21 | - if ($form->isSubmitted() && $form->isValid()) { | ||
22 | - | ||
23 | - $persona = $this->getDoctrine()->getRepository('AppBundle:Persona') | ||
24 | - ->findOneByCedulaPasaporte($form->get('cedula')->getData()); | ||
25 | - | ||
26 | - if (!$persona) { | ||
27 | - $this->addFlash('danger', 'Docente no Registrado en la Base de Datos del Centro de Estudios. Por Favor'); | ||
28 | - return $this->redirect( | ||
29 | - sprintf('%s#%s', '/', 'adscripcion') | ||
30 | - ); | ||
31 | - } | ||
32 | - | ||
33 | - //1. obtener el rol-institucion-persona | ||
34 | - $rol = $this->getDoctrine()->getRepository( | ||
35 | - 'AppBundle:RolInstitucion')->findOneByIdRol( | ||
36 | - $this->getDoctrine()->getRepository( | ||
37 | - 'AppBundle:Rol')->findOneByIdPersona($persona)); | ||
38 | - | ||
39 | - //si no existe el rol del docente, enviar correo al encargado de la región para verificar. | ||
40 | - if (!$rol) { | ||
41 | - $this->addFlash('danger', 'Docente no Registrado en la Base de Datos del Centro de Estudios. Por Favor'); | ||
42 | - return $this->redirect( | ||
43 | - sprintf('%s#%s', '/', 'adscripcion') | ||
44 | - ); | ||
45 | - } | ||
46 | - | ||
47 | - //si el docente existe, crea el nombre de usuario. | ||
48 | - $usuario = mb_strtolower($rol->getIdRol()->getIdPersona()->getPrimerNombre()[0] .$rol->getIdRol()->getIdPersona()->getPrimerApellido()); | ||
49 | - //busca en la base de datos para ver si ese nombre de usuario ya existe | ||
50 | - $credenciales = $this->getDoctrine()->getRepository('AppBundle:Usuarios')->findOneByUsername($usuario); | ||
51 | - if(!$credenciales){ //si no existe, procede a crear usuario y contraseña. | ||
52 | - $login = new Usuarios(); | ||
53 | - $login->setUsername($usuario); | ||
54 | - $login->setPlainPassword($form->get('cedula')->getData()); | ||
55 | - $password = $this->get('security.password_encoder') | ||
56 | - ->encodePassword($login, $login->getPlainPassword()); //encripta la contraseña | ||
57 | - $login->setPassword($password); | ||
58 | - $login->setIdRolInstitucion($rol); | ||
59 | - $permiso = $this->getDoctrine()->getRepository('AppBundle:Role')->findOneByName("ROLE_DOCENTE"); | ||
60 | - $login->addRol($permiso); //le añade la permisología básica de docente | ||
61 | - | ||
62 | - $rep = $this->getDoctrine()->getRepository('AppBundle:Rol'); | ||
63 | - //Actualizar el PFG de la persona | ||
64 | - $actualizarRol = $rep->findOneByIdPersona($rol->getIdRol()->getIdPersona()); | ||
65 | - $actualizarRol->setIdAreaPersona($form->get('pfg')->getData() ); | ||
66 | - | ||
67 | - $em = $this->getDoctrine()->getManager(); | ||
68 | - $em->persist($login); | ||
69 | - $em->persist($actualizarRol); | ||
70 | - | ||
71 | - $em->flush(); //guarda en la base de datos | ||
72 | - | ||
73 | - $this->addFlash('notice', 'Datos enviados Satisfactoriamente. Hemos enviado un correo a la dirección suministrada con los datos para el ingreso'); | ||
74 | - | ||
75 | - | ||
76 | - $message = \Swift_Message::newInstance() | ||
77 | - ->setSubject('Bienvenido al sistema CEA@UBV') | ||
78 | - ->setFrom('wilmer.ramones@gmail.com') | ||
79 | - ->setTo($form->get('correo')->getData()) | ||
80 | - ->setBody( | ||
81 | - $this->renderView( | ||
82 | - 'correos/solicitud_adscripcion.html.twig', | ||
83 | - array( | ||
84 | - 'nombres' => $form->get('nombres')->getData(), | ||
85 | - 'apellidos' => $form->get('apellidos')->getData(), | ||
86 | - 'usuario' => $login->getUsername(), | ||
87 | - 'contra' => $login->getPlainPassword(), | ||
88 | - | ||
89 | - ) | ||
90 | - ), | ||
91 | - 'text/html' | ||
92 | - ) | ||
93 | - /* | ||
94 | - * If you also want to include a plaintext version of the message | ||
95 | - ->addPart( | ||
96 | - $this->renderView( | ||
97 | - 'Emails/registration.txt.twig', | ||
98 | - array('name' => $name) | ||
99 | - ), | ||
100 | - 'text/plain' | ||
101 | - )*/ | ||
102 | - | ||
103 | - ; | ||
104 | - $this->get('mailer')->send($message); | ||
105 | - | ||
106 | - | ||
107 | - }else{ | ||
108 | - $this->addFlash('notice', 'Ya ha solicitado datos de ingreso. Revise la dirección de correo suministrada o Contáctenos a través de: cea.ubv@gmail.com'); | ||
109 | - | ||
110 | - } | ||
111 | - | ||
112 | - return $this->redirect( | ||
113 | - sprintf('%s#%s', '/', 'adscripcion') | ||
114 | - ); | ||
115 | - //$request->getSession()->getFlashBag()->add('success', 'Your email has been sent! Thanks!'); | ||
116 | - } | ||
117 | - | ||
118 | - // replace this example code with whatever you need | ||
119 | - return $this->render('default/index.html.twig', array( | ||
120 | - 'base_dir' => realpath($this->container->getParameter('kernel.root_dir').'/..'), | ||
121 | - 'form' => $form->createView(), | ||
122 | - )); | ||
123 | - } | ||
124 | -} |
src/AppBundle/Controller/DocenteController.php
@@ -1,87 +0,0 @@ | @@ -1,87 +0,0 @@ | ||
1 | -<?php | ||
2 | - | ||
3 | -/* | ||
4 | - * To change this license header, choose License Headers in Project Properties. | ||
5 | - * To change this template file, choose Tools | Templates | ||
6 | - * and open the template in the editor. | ||
7 | - */ | ||
8 | - | ||
9 | -namespace AppBundle\Controller; | ||
10 | -use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
11 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
12 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | ||
13 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
14 | - | ||
15 | -use AppBundle\Entity\Adscripcion; | ||
16 | - | ||
17 | - | ||
18 | -/** | ||
19 | - * Description of DocenteController | ||
20 | - * | ||
21 | - * @author ubv-cipee | ||
22 | - * | ||
23 | - * @Route("/ceapp") | ||
24 | - * | ||
25 | - */ | ||
26 | - | ||
27 | -class DocenteController extends Controller { | ||
28 | - | ||
29 | - /** | ||
30 | - * Pagina principal de inicio de la session Docente. | ||
31 | - * | ||
32 | - * @Route("/", name="cea_index") | ||
33 | - * @Method("GET") | ||
34 | - */ | ||
35 | - public function indexAction() | ||
36 | - { | ||
37 | - $adscripcion = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')-> | ||
38 | - findOneByIdRolInstitucion($this->getUser()->getIdRolInstitucion()->getId()); | ||
39 | - //si no ha solicitado adscripción regresa a la pagina de adscripcion | ||
40 | - if(!$adscripcion) return $this->redirect($this->generateUrl('solicitud_adscripcion')); | ||
41 | - //solicitud aprobada está en falso | ||
42 | - $adscrito = false; | ||
43 | - if($adscripcion->getIdEstatus()->getId() == 1) $adscrito = true; | ||
44 | - | ||
45 | - return $this->render('cea/index.html.twig', array ( | ||
46 | - 'adscrito' => $adscrito | ||
47 | - )); | ||
48 | - } | ||
49 | - | ||
50 | - /** | ||
51 | - * Pagina principal de inicio de la session Docente. | ||
52 | - * | ||
53 | - * @Route("/solicitudes", name="cea_solicitudes") | ||
54 | - * @Method("GET") | ||
55 | - * @Security("has_role('ROLE_COORDINADOR_NACIONAL')") | ||
56 | - */ | ||
57 | - public function verSolicitudesAction() | ||
58 | - { | ||
59 | - | ||
60 | - $adscripciones = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findBy(array('idEstatus' => 2)); | ||
61 | - | ||
62 | - return $this->render('cea/solicitudes.html.twig', array( | ||
63 | - 'adscripciones' => $adscripciones | ||
64 | - )); | ||
65 | - } | ||
66 | - | ||
67 | - /** | ||
68 | - * Encuentra y muestra una entidad de tipo Adscripción. | ||
69 | - * | ||
70 | - * @Route("/solicitudes/{id}", name="cea_solicitudes_show") | ||
71 | - * @Method("GET") | ||
72 | - */ | ||
73 | - public function solicitudesShowAction(Adscripcion $adscripcion) | ||
74 | - { | ||
75 | - //$deleteForm = $this->createDeleteForm($usuario); | ||
76 | - $escala = $this->getDoctrine()->getRepository('AppBundle:DocenteEscala')->findBy(array( | ||
77 | - 'idRolInstitucion' => $adscripcion->getIdRolInstitucion()->getId() | ||
78 | - )); | ||
79 | - | ||
80 | - return $this->render('cea/solicitudes_mostar.html.twig', array( | ||
81 | - 'adscripcion' => $adscripcion, | ||
82 | - 'escalas' => $escala | ||
83 | - )); | ||
84 | - } | ||
85 | - | ||
86 | -} | ||
87 | - | ||
88 | \ No newline at end of file | 0 | \ No newline at end of file |
src/AppBundle/Controller/LoginController.php
@@ -0,0 +1,55 @@ | @@ -0,0 +1,55 @@ | ||
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: ubv-cipee | ||
5 | + * Date: 29/06/16 | ||
6 | + * Time: 10:02 AM | ||
7 | + */ | ||
8 | + | ||
9 | +// src/AppBundle/Controller/SecurityController.php | ||
10 | +namespace AppBundle\Controller; | ||
11 | + | ||
12 | +use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
13 | +use Symfony\Component\HttpFoundation\Request; | ||
14 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
15 | + | ||
16 | +class LoginController extends Controller | ||
17 | +{ | ||
18 | + /** | ||
19 | + * @Route("/ingresar", name="login") | ||
20 | + */ | ||
21 | + public function loginAction(Request $request) | ||
22 | + { | ||
23 | + $authenticationUtils = $this->get('security.authentication_utils'); | ||
24 | + | ||
25 | + // get the login error if there is one | ||
26 | + $error = $authenticationUtils->getLastAuthenticationError(); | ||
27 | + | ||
28 | + // last username entered by the user | ||
29 | + $lastUsername = $authenticationUtils->getLastUsername(); | ||
30 | + | ||
31 | + return $this->render( | ||
32 | + 'login/login.html.twig', | ||
33 | + array( | ||
34 | + // last username entered by the user | ||
35 | + 'last_username' => $lastUsername, | ||
36 | + 'error' => $error, | ||
37 | + ) | ||
38 | + ); | ||
39 | + } | ||
40 | + | ||
41 | + /** | ||
42 | + * @Route("/verificar", name="user_roles") | ||
43 | + */ | ||
44 | + public function verificarAction(Request $request) | ||
45 | + { | ||
46 | + if (!$this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) { | ||
47 | + return $this->redirect($this->generateUrl('login')); | ||
48 | + } | ||
49 | + | ||
50 | + | ||
51 | + if($this->isGranted('ROLE_DOCENTE')){ | ||
52 | + return $this->redirect($this->generateUrl('solicitud_adscripcion')); | ||
53 | + } | ||
54 | + } | ||
55 | +} | ||
0 | \ No newline at end of file | 56 | \ No newline at end of file |
src/AppBundle/Controller/PortalController.php
@@ -0,0 +1,124 @@ | @@ -0,0 +1,124 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | +namespace AppBundle\Controller; | ||
4 | + | ||
5 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | +use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
7 | +use Symfony\Component\HttpFoundation\Request; | ||
8 | + | ||
9 | +use AppBundle\Entity\Usuarios; | ||
10 | + | ||
11 | +class PortalController extends Controller | ||
12 | +{ | ||
13 | + /** | ||
14 | + * @Route("/", name="homepage") | ||
15 | + */ | ||
16 | + public function indexAction(Request $request) | ||
17 | + { | ||
18 | + $form = $this->createForm('AppBundle\Form\SolicitarType'); | ||
19 | + $form->handleRequest($request); | ||
20 | + | ||
21 | + if ($form->isSubmitted() && $form->isValid()) { | ||
22 | + | ||
23 | + $persona = $this->getDoctrine()->getRepository('AppBundle:Persona') | ||
24 | + ->findOneByCedulaPasaporte($form->get('cedula')->getData()); | ||
25 | + | ||
26 | + if (!$persona) { | ||
27 | + $this->addFlash('danger', 'Docente no Registrado en la Base de Datos del Centro de Estudios. Por Favor'); | ||
28 | + return $this->redirect( | ||
29 | + sprintf('%s#%s', '/', 'adscripcion') | ||
30 | + ); | ||
31 | + } | ||
32 | + | ||
33 | + //1. obtener el rol-institucion-persona | ||
34 | + $rol = $this->getDoctrine()->getRepository( | ||
35 | + 'AppBundle:RolInstitucion')->findOneByIdRol( | ||
36 | + $this->getDoctrine()->getRepository( | ||
37 | + 'AppBundle:Rol')->findOneByIdPersona($persona)); | ||
38 | + | ||
39 | + //si no existe el rol del docente, enviar correo al encargado de la región para verificar. | ||
40 | + if (!$rol) { | ||
41 | + $this->addFlash('danger', 'Docente no Registrado en la Base de Datos del Centro de Estudios. Por Favor'); | ||
42 | + return $this->redirect( | ||
43 | + sprintf('%s#%s', '/', 'adscripcion') | ||
44 | + ); | ||
45 | + } | ||
46 | + | ||
47 | + //si el docente existe, crea el nombre de usuario. | ||
48 | + $usuario = mb_strtolower($rol->getIdRol()->getIdPersona()->getPrimerNombre()[0] .$rol->getIdRol()->getIdPersona()->getPrimerApellido()); | ||
49 | + //busca en la base de datos para ver si ese nombre de usuario ya existe | ||
50 | + $credenciales = $this->getDoctrine()->getRepository('AppBundle:Usuarios')->findOneByUsername($usuario); | ||
51 | + if(!$credenciales){ //si no existe, procede a crear usuario y contraseña. | ||
52 | + $login = new Usuarios(); | ||
53 | + $login->setUsername($usuario); | ||
54 | + $login->setPlainPassword($form->get('cedula')->getData()); | ||
55 | + $password = $this->get('security.password_encoder') | ||
56 | + ->encodePassword($login, $login->getPlainPassword()); //encripta la contraseña | ||
57 | + $login->setPassword($password); | ||
58 | + $login->setIdRolInstitucion($rol); | ||
59 | + $permiso = $this->getDoctrine()->getRepository('AppBundle:Role')->findOneByName("ROLE_DOCENTE"); | ||
60 | + $login->addRol($permiso); //le añade la permisología básica de docente | ||
61 | + | ||
62 | + $rep = $this->getDoctrine()->getRepository('AppBundle:Rol'); | ||
63 | + //Actualizar el PFG de la persona | ||
64 | + $actualizarRol = $rep->findOneByIdPersona($rol->getIdRol()->getIdPersona()); | ||
65 | + $actualizarRol->setIdAreaPersona($form->get('pfg')->getData() ); | ||
66 | + | ||
67 | + $em = $this->getDoctrine()->getManager(); | ||
68 | + $em->persist($login); | ||
69 | + $em->persist($actualizarRol); | ||
70 | + | ||
71 | + $em->flush(); //guarda en la base de datos | ||
72 | + | ||
73 | + $this->addFlash('notice', 'Datos enviados Satisfactoriamente. Hemos enviado un correo a la dirección suministrada con los datos para el ingreso'); | ||
74 | + | ||
75 | + | ||
76 | + $message = \Swift_Message::newInstance() | ||
77 | + ->setSubject('Bienvenido al sistema CEA@UBV') | ||
78 | + ->setFrom('wilmer.ramones@gmail.com') | ||
79 | + ->setTo($form->get('correo')->getData()) | ||
80 | + ->setBody( | ||
81 | + $this->renderView( | ||
82 | + 'correos/solicitud_adscripcion.html.twig', | ||
83 | + array( | ||
84 | + 'nombres' => $form->get('nombres')->getData(), | ||
85 | + 'apellidos' => $form->get('apellidos')->getData(), | ||
86 | + 'usuario' => $login->getUsername(), | ||
87 | + 'contra' => $login->getPlainPassword(), | ||
88 | + | ||
89 | + ) | ||
90 | + ), | ||
91 | + 'text/html' | ||
92 | + ) | ||
93 | + /* | ||
94 | + * If you also want to include a plaintext version of the message | ||
95 | + ->addPart( | ||
96 | + $this->renderView( | ||
97 | + 'Emails/registration.txt.twig', | ||
98 | + array('name' => $name) | ||
99 | + ), | ||
100 | + 'text/plain' | ||
101 | + )*/ | ||
102 | + | ||
103 | + ; | ||
104 | + $this->get('mailer')->send($message); | ||
105 | + | ||
106 | + | ||
107 | + }else{ | ||
108 | + $this->addFlash('notice', 'Ya ha solicitado datos de ingreso. Revise la dirección de correo suministrada o Contáctenos a través de: cea.ubv@gmail.com'); | ||
109 | + | ||
110 | + } | ||
111 | + | ||
112 | + return $this->redirect( | ||
113 | + sprintf('%s#%s', '/', 'adscripcion') | ||
114 | + ); | ||
115 | + //$request->getSession()->getFlashBag()->add('success', 'Your email has been sent! Thanks!'); | ||
116 | + } | ||
117 | + | ||
118 | + // replace this example code with whatever you need | ||
119 | + return $this->render('portal/index.html.twig', array( | ||
120 | + 'base_dir' => realpath($this->container->getParameter('kernel.root_dir').'/..'), | ||
121 | + 'form' => $form->createView(), | ||
122 | + )); | ||
123 | + } | ||
124 | +} |
src/AppBundle/Controller/RegistrationController.php
@@ -1,202 +0,0 @@ | @@ -1,202 +0,0 @@ | ||
1 | -<?php | ||
2 | -/** | ||
3 | - * Created by PhpStorm. | ||
4 | - * User: ubv-cipee | ||
5 | - * Date: 29/06/16 | ||
6 | - * Time: 09:08 AM | ||
7 | - */ | ||
8 | - | ||
9 | -namespace AppBundle\Controller; | ||
10 | - | ||
11 | -use AppBundle\Form\UserType; | ||
12 | -use Symfony\Component\HttpFoundation\File\UploadedFile; | ||
13 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
14 | -use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
15 | -use Symfony\Component\HttpFoundation\Request; | ||
16 | -use AppBundle\Entity\Adscripcion; | ||
17 | -use AppBundle\Entity\DocenteEscala; | ||
18 | - | ||
19 | -class RegistrationController extends Controller | ||
20 | -{ | ||
21 | - /** | ||
22 | - * @Route("/register", name="solicitud_adscripcion") | ||
23 | - */ | ||
24 | - public function registerAction(Request $request) | ||
25 | - { | ||
26 | - //si ya se adscribió redirigirlo a la página principal del sistema | ||
27 | - if($this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findOneByIdRolInstitucion($this->getUser()->getIdRolInstitucion()->getId())){ | ||
28 | - return $this->redirect($this->generateUrl('cea_index')); | ||
29 | - } | ||
30 | - | ||
31 | - | ||
32 | - $adscripcion = new Adscripcion(); | ||
33 | - $escala = new DocenteEscala(); | ||
34 | - | ||
35 | - /** @var TYPE_NAME $form */ | ||
36 | - $form = $this->createForm('AppBundle\Form\UserType'); | ||
37 | - $form->handleRequest($request); | ||
38 | - | ||
39 | - $form->get('escala')->getData(); | ||
40 | - | ||
41 | - if ($form->isSubmitted() && $form->isValid()) { | ||
42 | - //var_dump($form->get('lineas_investigacion')->getData()); exit; | ||
43 | - | ||
44 | - // $file stores the uploaded PDF file | ||
45 | - /** @var UploadedFile $constanciaTrabajo */ | ||
46 | - $constanciaTrabajo = $form->get('trabajo')->getData(); | ||
47 | - /** @var UploadedFile $constanciaPregrado */ | ||
48 | - $constanciaPregrado = $form->get('pregrado')->getData(); | ||
49 | - | ||
50 | - | ||
51 | - | ||
52 | - // Generate a unique name for the file before saving it | ||
53 | - $nombreTrabajo = md5(uniqid()).'.'.$constanciaTrabajo->guessExtension(); | ||
54 | - $nombrePregrado = md5(uniqid()).'.'.$constanciaPregrado->guessExtension(); | ||
55 | - | ||
56 | - // Move the file to the directory where brochures are stored | ||
57 | - $constanciaTrabajo->move( | ||
58 | - $this->container->getParameter('adscripcion_directory'), | ||
59 | - $nombreTrabajo | ||
60 | - ); | ||
61 | - | ||
62 | - $constanciaPregrado->move( | ||
63 | - $this->container->getParameter('adscripcion_directory'), | ||
64 | - $nombrePregrado | ||
65 | - ); | ||
66 | - | ||
67 | - if($form->get('postgrado')->getData()) { | ||
68 | - /** @var UploadedFile $constanciaPostgrado */ | ||
69 | - $constanciaPostgrado = $form->get('postgrado')->getData(); | ||
70 | - $nombrePostgrado = md5(uniqid()).'.'.$constanciaPostgrado->guessExtension(); | ||
71 | - $constanciaPostgrado->move( | ||
72 | - $this->container->getParameter('adscripcion_directory'), | ||
73 | - $nombrePostgrado | ||
74 | - ); | ||
75 | - $adscripcion->setPostgrado($nombrePostgrado); | ||
76 | - } | ||
77 | - $em = $this->getDoctrine()->getManager(); | ||
78 | - | ||
79 | - $adscripcion->setTrabajo($nombreTrabajo); | ||
80 | - $adscripcion->setPregrado($nombrePregrado); | ||
81 | - $adscripcion->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
82 | - $adscripcion->setFechaIngreso($form->get('fecha_ingreso')->getData()); | ||
83 | - $adscripcion->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(2)); | ||
84 | - | ||
85 | - | ||
86 | - if ($form->get('escala')->getData()){ | ||
87 | - $escala->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
88 | - $escala->setFechaEscala($form->get('fecha_oposicion')->getData()); | ||
89 | - $escala->setIdEscala($form->get('escala')->getData()); | ||
90 | - $escala->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(1)); | ||
91 | - $em->persist($escala); | ||
92 | - | ||
93 | - if($form->get('documento_oposicion')->getData()) { | ||
94 | - $constanciaOposicion = $form->get('documento_oposicion')->getData(); | ||
95 | - $nombreOposicion = md5(uniqid()).'.'.$constanciaOposicion->guessExtension(); | ||
96 | - $constanciaOposicion->move( | ||
97 | - $this->container->getParameter('adscripcion_directory'), | ||
98 | - $nombreOposicion | ||
99 | - ); | ||
100 | - $adscripcion->setOposicion($nombreOposicion); | ||
101 | - $adscripcion->setIdLineaInvestigacion($form->get('lineas_investigacion')->getData()); | ||
102 | - $adscripcion->setTituloTrabajo($form->get('titulo_trabajo')->getData()); | ||
103 | - } | ||
104 | - | ||
105 | - | ||
106 | - | ||
107 | - | ||
108 | - if ($form->get('documento_asistente')->getData()) { | ||
109 | - $escala2 = new DocenteEscala(); | ||
110 | - $asistente = $this->getDoctrine()->getRepository('AppBundle:Escalafones')->findOneById(2); | ||
111 | - $escala2->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
112 | - $escala2->setFechaEscala($form->get('fecha_ascenso_asistente')->getData()); | ||
113 | - $escala2->setIdEscala($asistente); | ||
114 | - $escala2->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); | ||
115 | - $em->persist($escala2); | ||
116 | - | ||
117 | - $constanciaAsistente = $form->get('documento_asistente')->getData(); | ||
118 | - $nombreAsistente = md5(uniqid()).'.'.$constanciaAsistente->guessExtension(); | ||
119 | - $constanciaAsistente->move( | ||
120 | - $this->container->getParameter('adscripcion_directory'), | ||
121 | - $nombreAsistente | ||
122 | - ); | ||
123 | - $adscripcion->setAsistente($nombreAsistente); | ||
124 | - | ||
125 | - | ||
126 | - } | ||
127 | - | ||
128 | - if ($form->get('documento_asociado')->getData()) { | ||
129 | - $escala3 = new DocenteEscala(); | ||
130 | - $asociado = $this->getDoctrine()->getRepository('AppBundle:Escalafones')->findOneById(3); | ||
131 | - $escala3->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
132 | - $escala3->setFechaEscala($form->get('fecha_ascenso_asociado')->getData()); | ||
133 | - $escala3->setIdEscala($asociado); | ||
134 | - $escala3->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); | ||
135 | - $em->persist($escala3); | ||
136 | - | ||
137 | - $constanciaAsociado = $form->get('documento_asociado')->getData(); | ||
138 | - $nombreAsociado = md5(uniqid()).'.'.$constanciaAsociado->guessExtension(); | ||
139 | - $constanciaAsociado->move( | ||
140 | - $this->container->getParameter('adscripcion_directory'), | ||
141 | - $nombreAsociado | ||
142 | - ); | ||
143 | - $adscripcion->setAsociado($nombreAsociado); | ||
144 | - } | ||
145 | - | ||
146 | - | ||
147 | - if ($form->get('documento_agregado')->getData()) { | ||
148 | - $escala4 = new DocenteEscala(); | ||
149 | - $agregado = $this->getDoctrine()->getRepository('AppBundle:Escalafones')->findOneById(4); | ||
150 | - $escala4->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
151 | - $escala4->setFechaEscala($form->get('fecha_ascenso_agregado')->getData()); | ||
152 | - $escala4->setIdEscala($agregado); | ||
153 | - $escala4->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); | ||
154 | - $em->persist($escala4); | ||
155 | - | ||
156 | - $constanciaAgregado = $form->get('documento_agregado')->getData(); | ||
157 | - $nombreAgregado = md5(uniqid()).'.'.$constanciaAgregado->guessExtension(); | ||
158 | - $constanciaAgregado->move( | ||
159 | - $this->container->getParameter('adscripcion_directory'), | ||
160 | - $nombreAgregado | ||
161 | - ); | ||
162 | - $adscripcion->setAgreado($nombreAgregado); | ||
163 | - } | ||
164 | - | ||
165 | - | ||
166 | - if ($form->get('documento_titular')->getData()) { | ||
167 | - $escala5 = new DocenteEscala(); | ||
168 | - $titular = $this->getDoctrine()->getRepository('AppBundle:Escalafones')->findOneById(5); | ||
169 | - $escala5->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
170 | - $escala5->setFechaEscala($form->get('fecha_ascenso_titular')->getData()); | ||
171 | - $escala5->setIdEscala($titular); | ||
172 | - $escala5->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); | ||
173 | - $em->persist($escala5); | ||
174 | - | ||
175 | - $constanciaTitular = $form->get('documento_titular')->getData(); | ||
176 | - $nombreTitular = md5(uniqid()).'.'.$constanciaTitular->guessExtension(); | ||
177 | - $constanciaTitular->move( | ||
178 | - $this->container->getParameter('adscripcion_directory'), | ||
179 | - $nombreTitular | ||
180 | - ); | ||
181 | - $adscripcion->setTitular($nombreTitular); | ||
182 | - } | ||
183 | - | ||
184 | - } | ||
185 | - | ||
186 | - $em->persist($adscripcion); | ||
187 | - | ||
188 | - | ||
189 | - $em->flush(); //guarda en la base de datos | ||
190 | - | ||
191 | - | ||
192 | - | ||
193 | - | ||
194 | - return $this->redirect($this->generateUrl('cea_index')); | ||
195 | - } | ||
196 | - | ||
197 | - return $this->render( | ||
198 | - 'registration/register.html.twig', | ||
199 | - array('form' => $form->createView()) | ||
200 | - ); | ||
201 | - } | ||
202 | -} |
src/AppBundle/Controller/SecurityController.php
@@ -1,55 +0,0 @@ | @@ -1,55 +0,0 @@ | ||
1 | -<?php | ||
2 | -/** | ||
3 | - * Created by PhpStorm. | ||
4 | - * User: ubv-cipee | ||
5 | - * Date: 29/06/16 | ||
6 | - * Time: 10:02 AM | ||
7 | - */ | ||
8 | - | ||
9 | -// src/AppBundle/Controller/SecurityController.php | ||
10 | -namespace AppBundle\Controller; | ||
11 | - | ||
12 | -use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
13 | -use Symfony\Component\HttpFoundation\Request; | ||
14 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
15 | - | ||
16 | -class SecurityController extends Controller | ||
17 | -{ | ||
18 | - /** | ||
19 | - * @Route("/login", name="login") | ||
20 | - */ | ||
21 | - public function loginAction(Request $request) | ||
22 | - { | ||
23 | - $authenticationUtils = $this->get('security.authentication_utils'); | ||
24 | - | ||
25 | - // get the login error if there is one | ||
26 | - $error = $authenticationUtils->getLastAuthenticationError(); | ||
27 | - | ||
28 | - // last username entered by the user | ||
29 | - $lastUsername = $authenticationUtils->getLastUsername(); | ||
30 | - | ||
31 | - return $this->render( | ||
32 | - 'security/login.html.twig', | ||
33 | - array( | ||
34 | - // last username entered by the user | ||
35 | - 'last_username' => $lastUsername, | ||
36 | - 'error' => $error, | ||
37 | - ) | ||
38 | - ); | ||
39 | - } | ||
40 | - | ||
41 | - /** | ||
42 | - * @Route("/verificar", name="user_roles") | ||
43 | - */ | ||
44 | - public function verificarAction(Request $request) | ||
45 | - { | ||
46 | - if (!$this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) { | ||
47 | - return $this->redirect($this->generateUrl('login')); | ||
48 | - } | ||
49 | - | ||
50 | - | ||
51 | - if($this->isGranted('ROLE_DOCENTE')){ | ||
52 | - return $this->redirect($this->generateUrl('solicitud_adscripcion')); | ||
53 | - } | ||
54 | - } | ||
55 | -} | ||
56 | \ No newline at end of file | 0 | \ No newline at end of file |