Commit 9918c53855320943055b469e89eecb1b753d5d98
1 parent
1638974150
Exists in
develop
creacion bundle proyectos para trabajo pasantias
Showing
11 changed files
with
201 additions
and
4 deletions
Show diff stats
.gitignore
... | ... | @@ -10,3 +10,92 @@ |
10 | 10 | /vendor/ |
11 | 11 | /bin/ |
12 | 12 | /composer.phar |
13 | + | |
14 | +# -- Symfony2 ----------------------------------------- | |
15 | + app/bootstrap.php.cache | |
16 | + app/bootstrap_cache.php.cache | |
17 | + app/config/parameters.ini | |
18 | + app/config/parameters.yml | |
19 | + app/cache/* | |
20 | + app/logs/* | |
21 | + vendor/* | |
22 | + web/bundles/* | |
23 | + web/css/* | |
24 | + web/js/* | |
25 | + web/uploads/* | |
26 | + | |
27 | + # -- Composer ----------------------------------------- | |
28 | + composer.phar | |
29 | + | |
30 | + # -- PHPUnit ------------------------------------------ | |
31 | + app/phpunit.xml | |
32 | + | |
33 | + # -- Editores ----------------------------------------- | |
34 | + # vim | |
35 | + .*.sw[a-z] | |
36 | + *.un~ | |
37 | + Session.vim | |
38 | + .netrwhist | |
39 | + | |
40 | + # eclipse | |
41 | + *.pydevproject | |
42 | + .project | |
43 | + .metadata | |
44 | + bin/** | |
45 | + tmp/** | |
46 | + tmp/**/* | |
47 | + *.tmp | |
48 | + *.bak | |
49 | + *.swp | |
50 | + *~.nib | |
51 | + local.properties | |
52 | + .classpath | |
53 | + .settings/ | |
54 | + .loadpath | |
55 | + .externalToolBuilders/ | |
56 | + *.launch | |
57 | + .buildpath | |
58 | + | |
59 | + # phpstorm | |
60 | + .idea/ | |
61 | + | |
62 | + # textmate | |
63 | + *.tmproj | |
64 | + *.tmproject | |
65 | + tmtags | |
66 | + | |
67 | + # sublimetext | |
68 | + /*.sublime-project | |
69 | + *.sublime-workspace | |
70 | + | |
71 | + # netbeans | |
72 | + nbproject/private/ | |
73 | + nbproject/ | |
74 | + build/ | |
75 | + nbbuild/ | |
76 | + dist/ | |
77 | + nbdist/ | |
78 | + nbactions.xml | |
79 | + nb-configuration.xml | |
80 | + | |
81 | + # -- Sistemas Operativos ------------------------------ | |
82 | + # Windows | |
83 | + Thumbs.db | |
84 | + ehthumbs.db | |
85 | + Desktop.ini | |
86 | + $RECYCLE.BIN/ | |
87 | + | |
88 | + # Linux | |
89 | + .* | |
90 | + .gitignore | |
91 | + !.htaccess | |
92 | + *~ | |
93 | + | |
94 | + # Mac OS X | |
95 | + .DS_Store | |
96 | + .AppleDouble | |
97 | + .LSOverride | |
98 | + Icon | |
99 | + ._* | |
100 | + .Spotlight-V100 | |
101 | + .Trashes | ... | ... |
app/AppKernel.php
... | ... | @@ -21,6 +21,7 @@ class AppKernel extends Kernel |
21 | 21 | new UBV\SurUbvBundle\UBVSurUbvBundle(), |
22 | 22 | new FOS\UserBundle\FOSUserBundle(), |
23 | 23 | new NoiseLabs\Bundle\NuSOAPBundle\NoiseLabsNuSOAPBundle(), |
24 | + new UBV\ProyectosBundle\UBVProyectosBundle(), | |
24 | 25 | ); |
25 | 26 | |
26 | 27 | if (in_array($this->getEnvironment(), array('dev', 'test'), true)) { | ... | ... |
app/Resources/views/candidato/new.html.twig
... | ... | @@ -139,8 +139,6 @@ |
139 | 139 | <label class="col-md-3 control-label">Fecha de Nac</label> |
140 | 140 | <div class="col-md-3"> |
141 | 141 | <input data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd" class="datepicker-default form-control" type="fecha_nacimiento"> |
142 | -{{ form_label(form.estadoCivil) }} | |
143 | - {{ form_widget(form.estadoCivil) }} | |
144 | 142 | {% if form.fecha_nacimiento.vars.errors[0].message is defined %} |
145 | 143 | <span class="help-block"> |
146 | 144 | {{ form.fecha_nacimiento.vars.errors[0].message }} |
... | ... | @@ -152,8 +150,7 @@ |
152 | 150 | </div> |
153 | 151 | </div> |
154 | 152 | </div> |
155 | - </div> | |
156 | - </div> | |
153 | + | |
157 | 154 | |
158 | 155 | <div class="row"> |
159 | 156 | <div class="col-md-12"> | ... | ... |
app/config/routing.yml
src/UBV/ProyectosBundle/Controller/DefaultController.php
... | ... | @@ -0,0 +1,17 @@ |
1 | +<?php | |
2 | + | |
3 | +namespace UBV\ProyectosBundle\Controller; | |
4 | + | |
5 | +use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
6 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
7 | + | |
8 | +class DefaultController extends Controller | |
9 | +{ | |
10 | + /** | |
11 | + * @Route("/") | |
12 | + */ | |
13 | + public function indexAction() | |
14 | + { | |
15 | + return $this->render('UBVProyectosBundle:Default:index.html.twig'); | |
16 | + } | |
17 | +} | ... | ... |
src/UBV/ProyectosBundle/DependencyInjection/Configuration.php
... | ... | @@ -0,0 +1,29 @@ |
1 | +<?php | |
2 | + | |
3 | +namespace UBV\ProyectosBundle\DependencyInjection; | |
4 | + | |
5 | +use Symfony\Component\Config\Definition\Builder\TreeBuilder; | |
6 | +use Symfony\Component\Config\Definition\ConfigurationInterface; | |
7 | + | |
8 | +/** | |
9 | + * This is the class that validates and merges configuration from your app/config files. | |
10 | + * | |
11 | + * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html} | |
12 | + */ | |
13 | +class Configuration implements ConfigurationInterface | |
14 | +{ | |
15 | + /** | |
16 | + * {@inheritdoc} | |
17 | + */ | |
18 | + public function getConfigTreeBuilder() | |
19 | + { | |
20 | + $treeBuilder = new TreeBuilder(); | |
21 | + $rootNode = $treeBuilder->root('ubv_proyectos'); | |
22 | + | |
23 | + // Here you should define the parameters that are allowed to | |
24 | + // configure your bundle. See the documentation linked above for | |
25 | + // more information on that topic. | |
26 | + | |
27 | + return $treeBuilder; | |
28 | + } | |
29 | +} | ... | ... |
src/UBV/ProyectosBundle/DependencyInjection/UBVProyectosExtension.php
... | ... | @@ -0,0 +1,28 @@ |
1 | +<?php | |
2 | + | |
3 | +namespace UBV\ProyectosBundle\DependencyInjection; | |
4 | + | |
5 | +use Symfony\Component\DependencyInjection\ContainerBuilder; | |
6 | +use Symfony\Component\Config\FileLocator; | |
7 | +use Symfony\Component\HttpKernel\DependencyInjection\Extension; | |
8 | +use Symfony\Component\DependencyInjection\Loader; | |
9 | + | |
10 | +/** | |
11 | + * This is the class that loads and manages your bundle configuration. | |
12 | + * | |
13 | + * @link http://symfony.com/doc/current/cookbook/bundles/extension.html | |
14 | + */ | |
15 | +class UBVProyectosExtension extends Extension | |
16 | +{ | |
17 | + /** | |
18 | + * {@inheritdoc} | |
19 | + */ | |
20 | + public function load(array $configs, ContainerBuilder $container) | |
21 | + { | |
22 | + $configuration = new Configuration(); | |
23 | + $config = $this->processConfiguration($configuration, $configs); | |
24 | + | |
25 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | |
26 | + $loader->load('services.yml'); | |
27 | + } | |
28 | +} | ... | ... |
src/UBV/ProyectosBundle/Resources/config/services.yml
src/UBV/ProyectosBundle/Resources/views/Default/index.html.twig
... | ... | @@ -0,0 +1 @@ |
1 | +Hello World! | ... | ... |
src/UBV/ProyectosBundle/Tests/Controller/DefaultControllerTest.php
... | ... | @@ -0,0 +1,17 @@ |
1 | +<?php | |
2 | + | |
3 | +namespace UBV\ProyectosBundle\Tests\Controller; | |
4 | + | |
5 | +use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
6 | + | |
7 | +class DefaultControllerTest extends WebTestCase | |
8 | +{ | |
9 | + public function testIndex() | |
10 | + { | |
11 | + $client = static::createClient(); | |
12 | + | |
13 | + $crawler = $client->request('GET', '/'); | |
14 | + | |
15 | + $this->assertContains('Hello World', $client->getResponse()->getContent()); | |
16 | + } | |
17 | +} | ... | ... |