diff --git a/.ansible/.gitignore b/.ansible/.gitignore index 6d194966634e642fe9cdf3adeaa61a3afe9d27bb..5c7ddcf4b835619982ada55d0c027d8783492ab0 100644 --- a/.ansible/.gitignore +++ b/.ansible/.gitignore @@ -1 +1,2 @@ -roles \ No newline at end of file +roles/* +!roles/ansible-role-common \ No newline at end of file diff --git a/.ansible/group_vars/env-prod.yml b/.ansible/group_vars/env-prod.yml index 5fd835bc1685ca7ba824a55457df64dafbc71a1d..9b6a2f9fdee194906a3a6db659ae1cd466628455 100644 --- a/.ansible/group_vars/env-prod.yml +++ b/.ansible/group_vars/env-prod.yml @@ -1,5 +1,5 @@ apache_vhosts: - - servername: "backend.betskills.com 213.186.33.40:8080" + - servername: "backend.betskills.com" documentroot: "/var/www/betskills/backend/web" extra_parameters: | SetEnv APPLICATION_ENV "production" diff --git a/.ansible/project.yml b/.ansible/project.yml index 945e6c17e273173c5258df788d426b36df4de5e4..559b3165d51d90b1e087b5e743c8e4bf4d8857c8 100644 --- a/.ansible/project.yml +++ b/.ansible/project.yml @@ -2,15 +2,14 @@ hosts: app-web become: yes roles: - - ansible-common + - ansible-role-common - ansible-role-php7 - ansible-role-apache - ansible-role-composer - - ansible-role-nodejs - name: Install and configure MySQL hosts: app-db become: yes roles: - - ansible-common + - ansible-role-common - ansible-role-mysql \ No newline at end of file diff --git a/.ansible/roles.yml b/.ansible/roles.yml index e58446bb300a2ec7731c353d3cf3731a5286b5a5..21396193165597e4b047db9c5bbb68ad42cb45c2 100644 --- a/.ansible/roles.yml +++ b/.ansible/roles.yml @@ -1,24 +1,19 @@ - src: https://github.com/geerlingguy/ansible-role-mysql.git scm: git - version: "2.3.2" + version: "2.5.0" path: roles/ - src: https://github.com/itcraftsmanpl/ansible-role-php7.git scm: git - version: "1.0.5" + version: "1.0.6" path: roles/ - src: https://github.com/geerlingguy/ansible-role-apache.git scm: git - version: "1.7.3" + version: "2.0.0" path: roles/ - src: https://github.com/geerlingguy/ansible-role-composer.git scm: git - version: "1.4.2" + version: "1.5.0" path: roles/ - -- src: https://github.com/martinmicunda/ansible-role-nodejs.git - scm: git - path: roles/ - diff --git a/.ansible/roles/ansible-role-common/tasks/main.yml b/.ansible/roles/ansible-role-common/tasks/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..3fe2999fe8e21a8b8e4e2bb602d39cdec810fe9e --- /dev/null +++ b/.ansible/roles/ansible-role-common/tasks/main.yml @@ -0,0 +1,24 @@ +- name: Install default packages + apt: name={{ item }} state=installed update_cache=yes cache_valid_time=3600 + become: yes + with_items: + - git + - subversion + - unzip + - vim + - wget + - ca-certificates + - python-apt + - curl + - htop + - python-mysqldb + - locales + - ntp + - exim4 + - fail2ban + - software-properties-common + - python-software-properties + - make + tags: + - apt + - exim \ No newline at end of file diff --git a/.gitignore b/.gitignore index a90b2763e8c57001a0067d556c11818d1e3c1817..03c266064e2fc9df598fcd6c3ca8485ea656d959 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,7 @@ !var/SymfonyRequirements.php /vendor/ /web/bundles/ -.idea/ \ No newline at end of file +.idea/ +.vagrant/ +web/img/application/league +web/img/application/team \ No newline at end of file diff --git a/.vagrant/machines/betskills/virtualbox/action_provision b/.vagrant/machines/betskills/virtualbox/action_provision index 1da95ea62454ff29b9ca9999e6da68cab91a9bbc..e40c2d0c715c171ac4d85688cc0dc391dced5226 100644 --- a/.vagrant/machines/betskills/virtualbox/action_provision +++ b/.vagrant/machines/betskills/virtualbox/action_provision @@ -1 +1 @@ -1.5:701c13df-1f25-4052-baf7-7bb4e057512b \ No newline at end of file +1.5:9dc27a47-bfb9-4342-b483-25d290197d4b \ No newline at end of file diff --git a/.vagrant/machines/betskills/virtualbox/action_set_name b/.vagrant/machines/betskills/virtualbox/action_set_name index 09174c4b2167cd57bc93738fbcf0927fe593df09..ba9bc1d5669d89d5f23d7c17f2aa7b9c16d1c3d9 100644 --- a/.vagrant/machines/betskills/virtualbox/action_set_name +++ b/.vagrant/machines/betskills/virtualbox/action_set_name @@ -1 +1 @@ -1474111971 \ No newline at end of file +1482234046 \ No newline at end of file diff --git a/.vagrant/machines/betskills/virtualbox/id b/.vagrant/machines/betskills/virtualbox/id index 6e43e30d6d6a62a046bb0993e9deea29e92edf12..fb330905f62b945e0dc5ff835390b5a1aae63c53 100644 --- a/.vagrant/machines/betskills/virtualbox/id +++ b/.vagrant/machines/betskills/virtualbox/id @@ -1 +1 @@ -701c13df-1f25-4052-baf7-7bb4e057512b \ No newline at end of file +9dc27a47-bfb9-4342-b483-25d290197d4b \ No newline at end of file diff --git a/.vagrant/machines/betskills/virtualbox/index_uuid b/.vagrant/machines/betskills/virtualbox/index_uuid index 065d546f3f8088f0a12bf2a80477f1d469ea5615..32083de06881b4ed2a2eca888d17524829c645c3 100644 --- a/.vagrant/machines/betskills/virtualbox/index_uuid +++ b/.vagrant/machines/betskills/virtualbox/index_uuid @@ -1 +1 @@ -4e306c850cc34d16b6b27347c283ca3d \ No newline at end of file +939ebcd44abe4eb89f2e36977dfc1d0d \ No newline at end of file diff --git a/.vagrant/machines/betskills/virtualbox/private_key b/.vagrant/machines/betskills/virtualbox/private_key index ccae28f0e1733366ae8bd3e31724f1807ee80e3e..a79d771605086430652c689a0372d44e29636e5a 100644 --- a/.vagrant/machines/betskills/virtualbox/private_key +++ b/.vagrant/machines/betskills/virtualbox/private_key @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAwtJ/wV4buBc7kMcHvW4rwRR0yspw2+W6lweJNbZeWXjdzCw0 -IGT+WFImX/mbpwhYvReWHhiMn0zVhc/1pFNrDSU1mBxZ9auYRBXUfsMqp49yCXnS -PodqAviBnAcIqGfrbdLXhJvOKUS1cz5ob0+uGOGOV9cS1qBuiZ1oCAiYGSfVXgtd -aI+GcqHc9kfgeNVIisH+9AykKQ7gP0GxNcxup/yJ4hEfJJm/MiJX9jdbLfkP6/+G -MijKONc7Qr4AnsUEpXhqWjPMtZQTTKT0af55JZIB1fdZNkH8a889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Yy6f2x +rbHlwZPx+duZpcNJeyVjGZbaRhnVyF7bFH0wkLn3y7VTdX87r76lczsCgYEAz6WJ +OvrqJmGLwW9aDO8ggKtoko+XaBpRi1m6pRiNk4p767G7iaAQx/fVaOXQFMvLK4Mc +lkRIEj72lyPenaki6MnnkIigZt6s87Zj2khmzI0duP5T/qeHAMmMaGXI5n65XjWi +749Y16TVM0cLdYl6W2WD5RBhcAi8eW1YAHVbewsCgYEAu8w8LxRwEBg9QopMKrfG +ZvKpGoW7A1Me5OCUOXbuWLkaVCbxtAkudKr9vKbtr1rgddFNEp7cHjqrJh3hXhIK +OmTI/ustjTSJ0Ba8uQprhpCqxrfIew3mNiT8H4Pwe+cI5JgEOjk1YJ/1EN+0WSV8 +1YPzSyFKove6/KIPgHRczokCgYEAx7QXFYh4Zc1vEey8GLBq/BTekAZVwaN+RZ1Y +qqvAjeOkZvwat7QgL5Ilx6suwrF1hzWj6slk31d65cVztwISNvzoHtOoIQeMIyCJ +TEhRxez6Zw8DTWllp9YvmcA6xaOfOAIx4GBnO46mFZkAZlyANyKdBVMJwyxDyCzn +dBlqkB0CgYAkFEOavxrKgSF4OlJcJe/ZYvMtg30jcEp3Y807oT9thY/XbReq7cFu +uGCcPzD6F8dg7boEb4M/zY0fmhAQfE4wHIT3XYSuQscodF8NNB2gxCzzNYnNWLl2 +1IaNwn3D3zRSulvZlsarrhXVcMZsto19iFqP1gMtnZZmVf5s2syA3w== -----END RSA PRIVATE KEY----- diff --git a/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory b/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory index c1b398d402faa50a2efcb0e8ecff1410c861dbcd..566ded85324c3a9b7197911e11a51e4df76a0c3c 100644 --- a/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory +++ b/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory @@ -1,6 +1,6 @@ # Generated by Vagrant -betskills ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='/private/var/www/betskills/backend/.vagrant/machines/betskills/virtualbox/private_key' +betskills ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='/Users/jeremyguiselin/Projects/betskills/backend/.vagrant/machines/betskills/virtualbox/private_key' [app-web] betskills diff --git a/src/BackendBundle/Controller/EntityBrowserController.php b/src/BackendBundle/Controller/EntityBrowserController.php index 17ae9af628fc8462c63fde7788d0725e541d93f5..f9914cff082f0e7f3ee9489ce3d808f2a35320cf 100644 --- a/src/BackendBundle/Controller/EntityBrowserController.php +++ b/src/BackendBundle/Controller/EntityBrowserController.php @@ -48,14 +48,15 @@ class EntityBrowserController extends Controller ->setFirstResult($firstResult) ; + $viewParameters = [ + 'elements' => $pagination, + 'countPages' => $pagesCount, + 'page' => $page, + 'name' => $name, + ]; + return $this->render( - '@Backend/'. $name .'/list.html.twig', - [ - 'elements' => $pagination, - 'countPages' => $pagesCount, - 'page' => $page, - 'name' => $name, - ] + '@Backend/'. $name .'/list.html.twig', $viewParameters ); } @@ -79,6 +80,7 @@ class EntityBrowserController extends Controller if ($addForm->isValid()) { $alreadyExists = $repository->alreadyExists($newElement); if (!$alreadyExists) { + $this->setPicture($name, $newElement); $em->persist($newElement); $em->flush(); $this->get('session')->getFlashBag()->add('success', "L'élément a bien été ajouté"); @@ -216,10 +218,10 @@ class EntityBrowserController extends Controller /** @var File $file */ $file = $element->getPicture(); - $fileName = md5(uniqid() . '.' . $file->guessExtension()); + $fileName = md5(uniqid()) . '.' . $file->guessExtension(); $file->move( - $this->get($name. '_directory'), + $this->getParameter($name. '_directory'), $fileName ); diff --git a/src/BackendBundle/Entity/League.php b/src/BackendBundle/Entity/League.php index f78e47db3b8d9a081d75c33bf09cec789c3f105b..a304bad8a019d1a78e31880ae006d88308ff3149 100644 --- a/src/BackendBundle/Entity/League.php +++ b/src/BackendBundle/Entity/League.php @@ -3,6 +3,7 @@ namespace BackendBundle\Entity; use Doctrine\ORM\Mapping as ORM; +use Symfony\Component\Validator\Constraints as Assert; /** * League @@ -35,6 +36,13 @@ class League */ private $sport; + /** + * @ORM\Column(name="picture", type="string", length=255) + * + * @Assert\NotBlank(message="Veuillez uploader une image de l'équipe") + * @Assert\File(mimeTypes={"image/jpeg", "image/png"}) + */ + private $picture; /** * Get id @@ -93,4 +101,20 @@ class League { return $this->sport; } + + /** + * @return string + */ + public function getPicture() + { + return $this->picture; + } + + /** + * @param string $picture + */ + public function setPicture($picture) + { + $this->picture = $picture; + } } diff --git a/src/BackendBundle/Form/LeagueType.php b/src/BackendBundle/Form/LeagueType.php index 5bd3938f65e6c560ae62eefdad65f366bbc15668..591cc3ee057177493ae5d057a31db8529c6bf149 100644 --- a/src/BackendBundle/Form/LeagueType.php +++ b/src/BackendBundle/Form/LeagueType.php @@ -4,6 +4,7 @@ namespace BackendBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; +use Symfony\Component\Form\Extension\Core\Type\FileType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -13,27 +14,22 @@ class LeagueType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add( - 'name', - TextType::class, - [ - 'label' => 'Nom' - ] - ) - ->add( - 'sport', - ChoiceType::class, - [ - 'label' => 'Sport', - 'choices' => [ - 'Tennis' => 'tennis', - 'Football' => 'football' - ], - 'expanded' => false, - 'multiple' => false, - ] - ) - ; + ->add('name', TextType::class, [ + 'label' => 'Nom' + ]) + ->add('sport', ChoiceType::class, [ + 'label' => 'Sport', + 'choices' => [ + 'Tennis' => 'tennis', + 'Football' => 'football' + ], + 'expanded' => false, + 'multiple' => false, + ]) + ->add('picture', FileType::class, [ + 'label' => 'Image', + 'data_class' => null + ]); } public function configureOptions(OptionsResolver $resolver) diff --git a/src/BackendBundle/Form/TeamType.php b/src/BackendBundle/Form/TeamType.php index 40343368e8e66de2ea3744b66bbe23e2174aec09..02d39a7f9cffc93e77e4bc2cb52e1d2c5551f662 100644 --- a/src/BackendBundle/Form/TeamType.php +++ b/src/BackendBundle/Form/TeamType.php @@ -18,6 +18,7 @@ class TeamType extends AbstractType ]) ->add('picture', FileType::class, [ 'label' => 'Image', + 'data_class' => null ]); } diff --git a/src/BackendBundle/Resources/views/league/form.html.twig b/src/BackendBundle/Resources/views/league/form.html.twig index 046646436482770987d2bc122f85ddb192023e0f..2e4bf6690ac165f173e40fd379d08d521c4b974f 100644 --- a/src/BackendBundle/Resources/views/league/form.html.twig +++ b/src/BackendBundle/Resources/views/league/form.html.twig @@ -7,15 +7,30 @@ <div class="col-sm-8 col-sm-offset-2"> <h3 class="text-center text-primary">Ajouter une nouvelle ou éditer une {{ name | trans }}</h3> {{ form_start(form, {'attr': {'class': 'form-horizontal'}}) }} - {% for child in form.children %} - <div class="form-group is-empty has-primary"> - {{ form_label(child, null, {'label_attr': {'class': "col-sm-2 control-label"}}) }} - <div class="col-sm-10"> - {{ form_widget(child, {'attr' : {'class': "form-control"}}) }} - </div> - {{ form_errors(child) }} + <div class="form-group is-empty has-primary"> + {{ form_label(form.name, null, {'label_attr': {'class': "col-sm-2 control-label"}}) }} + <div class="col-sm-10"> + {{ form_widget(form.name, {'attr' : {'class': "form-control"}}) }} </div> - {% endfor %} + {{ form_errors(form.name) }} + </div> + <div class="form-group is-empty has-primary"> + {{ form_label(form.sport, null, {'label_attr': {'class': "col-sm-2 control-label"}}) }} + <div class="col-sm-10"> + {{ form_widget(form.sport, {'attr' : {'class': "form-control"}}) }} + </div> + {{ form_errors(form.sport) }} + </div> + <div class="form-group"> + {{ form_label(form.picture, null, {'label_attr': {'class': "col-sm-2 control-label"}}) }} + + <div class="col-md-10"> + <input type="text" readonly="" class="form-control" placeholder="Parcourir ..."> + {{ form_widget(form.picture) }} + </div> + + {{ form_errors(form.picture) }} + </div> <button type="submit" class="modal-action modal-close waves-effect waves-green waves-light btn">Ajouter</button> {{ form_end(form, {'render_rest': false}) }} </div> diff --git a/src/BackendBundle/Resources/views/league/list.html.twig b/src/BackendBundle/Resources/views/league/list.html.twig index 810cc9e7a56e8f25851f186229ac0b2a8728b197..5f60bbd2b1f93ff1ca7a6d956eb72bd6ad73dfb6 100644 --- a/src/BackendBundle/Resources/views/league/list.html.twig +++ b/src/BackendBundle/Resources/views/league/list.html.twig @@ -12,6 +12,7 @@ <th>#</th> <th>Nom</th> <th>Sport</th> + <th>Image</th> <th>Modifier</th> <th>Selectionner</th> </tr> @@ -22,6 +23,7 @@ <td>{{ element.id }}</td> <td>{{ element.name }}</td> <td>{{ element.sport }}</td> + <td><img class="thumb" src="{{ asset('/img/application/league/' ~ element.picture) }}" alt="" /></td> <td><a href="{{ path('backend_entitybrowser_edit', {'name': name, 'id': element.id}) }}" class="btn btn-info">Modifier<div class="ripple-container"></div></a></td> <td> <div class="checkbox"> diff --git a/src/BackendBundle/Resources/views/notification/list.html.twig b/src/BackendBundle/Resources/views/notification/list.html.twig index 8f7520c221f631a793ac909ced181b72b54a5754..e017ed794264652b1661e8414cfaa135e62acef7 100644 --- a/src/BackendBundle/Resources/views/notification/list.html.twig +++ b/src/BackendBundle/Resources/views/notification/list.html.twig @@ -15,8 +15,10 @@ <thead> <tr> <th>#</th> - <th>Titre</th> - <th>Contenu</th> + <th>Titre (FR)</th> + <th>Contenu (FR)</th> + <th>Titre (EN)</th> + <th>Contenu (EN)</th> <th>Date</th> </tr> </thead> @@ -24,8 +26,10 @@ {% for element in elements %} <tr id="{{ element.id }}"> <td>{{ element.id }}</td> - <td>{{ element.title }}</td> - <td>{{ element.content }}</td> + <td>{{ element.frenchTitle }}</td> + <td>{{ element.frenchContent }}</td> + <td>{{ element.englishTitle }}</td> + <td>{{ element.englishContent }}</td> <td>{{ element.date | date('d-m-Y H:i') }}</td> </tr> {% endfor %} diff --git a/src/BackendBundle/Resources/views/team/list.html.twig b/src/BackendBundle/Resources/views/team/list.html.twig index 986afdfefb3e680eaf71cead5d5bf8ed910a7e39..8ecda1968fb046502d0eda5870c6907c0cd07cc0 100644 --- a/src/BackendBundle/Resources/views/team/list.html.twig +++ b/src/BackendBundle/Resources/views/team/list.html.twig @@ -11,6 +11,7 @@ <tr> <th>#</th> <th>Nom</th> + <th>Image</th> <th>Selectionnerr</th> </tr> </thead> @@ -19,6 +20,7 @@ <tr> <td>{{ element.id }}</td> <td>{{ element.name }}</td> + <td><img class="thumb" src="{{ asset('/img/application/team/' ~ element.picture) }}" alt="" /></td> <td><a href="{{ path('backend_entitybrowser_edit', {'name': name, 'id': element.id}) }}" class="btn btn-info">Modifier<div class="ripple-container"></div></a></td> <td> <div class="checkbox"> diff --git a/web/css/boostrap-material-datetimepicker.css b/web/css/boostrap-material-datetimepicker.css index 66f3ab32569fa2a077010ed4d3a85041586a57d3..1abea7b355892cc6aa10a4f688b5c2928751b042 100644 --- a/web/css/boostrap-material-datetimepicker.css +++ b/web/css/boostrap-material-datetimepicker.css @@ -25,7 +25,7 @@ .dtp table.dtp-picker-days tr > td > a.selected{ background: #3f51b5; color: #fff; } .dtp table.dtp-picker-days tr > th { color: #757575; text-align: center; font-weight: 700; padding: 0.4em 0.3em; } -.dtp .p10 > a { color: #3f51b5; text-decoration: none; } +.dtp .p10 > a { color: white; text-decoration: none; } .dtp .p10 { width: 10%; display: inline-block; } .dtp .p20 { width: 20%; display: inline-block; } .dtp .p60 { width: 60%; display: inline-block; } diff --git a/web/css/style.css b/web/css/style.css index be100a00067bfca208d5a90292bfc531ce11a11d..e596755d69505977667073c8898de6f596ecf02c 100644 --- a/web/css/style.css +++ b/web/css/style.css @@ -110,4 +110,8 @@ body { .select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: #D2D2D2 transparent transparent transparent !important; +} + +img.thumb { + max-height: 80px; } \ No newline at end of file diff --git a/web/img/application/pack/wimbledon.png b/web/img/application/pack/wimbledon.png deleted file mode 100644 index 16caf3c4bbe9b451ac0ab31cff7fb7f37b13fa80..0000000000000000000000000000000000000000 Binary files a/web/img/application/pack/wimbledon.png and /dev/null differ diff --git a/web/img/application/team/nadal.png b/web/img/application/team/nadal.png deleted file mode 100644 index 166fd2fd43bd7b61e099337e15b6bbd4716e0d3c..0000000000000000000000000000000000000000 Binary files a/web/img/application/team/nadal.png and /dev/null differ