@@ -14,9 +14,13 @@ app_homepage: | |||
path: / | |||
controller: App\Controller\Frontend\HomeController:home | |||
app_politique: | |||
path: /politique-confidentialite | |||
controller: App\Controller\Frontend\PageController::politique | |||
app_legal_mention: | |||
path: /mentions-legales | |||
controller: App\Controller\Frontend\MentionController::mention | |||
controller: App\Controller\Frontend\PageController::mention | |||
app_carto_interactive: | |||
path: /cartographie-interactive |
@@ -4,14 +4,9 @@ namespace App\Controller\Admin; | |||
use App\Entity\Site\Page; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\FormField; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextEditorField; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | |||
use Lc\SovBundle\Controller\AbstractAdminController as AbstractCrudController; | |||
use Lc\SovBundle\Field\CKEditorField; | |||
use Lc\SovBundle\Field\FileManagerField; | |||
use Lc\SovBundle\Field\GalleryManagerField; | |||
use Lc\SovBundle\Field\ImageManagerField; | |||
use Lc\SovBundle\Field\StatusField; | |||
class PageCrudController extends AbstractCrudController | |||
@@ -23,18 +18,12 @@ class PageCrudController extends AbstractCrudController | |||
public function configureFields(string $pageName): iterable | |||
{ | |||
$panel = parent::configureFields($pageName); | |||
return array_merge( | |||
return | |||
[ | |||
FormField::addPanel('general'), | |||
TextField::new('title'), | |||
TextEditorField::new('description'), | |||
StatusField::new('status'), | |||
], | |||
$panel | |||
); | |||
]; | |||
} | |||
} |
@@ -6,7 +6,7 @@ namespace App\Controller\Frontend; | |||
use App\Entity\Site\Page; | |||
use Symfony\Component\HttpFoundation\Response; | |||
class MentionController extends DefaultController | |||
class PageController extends DefaultController | |||
{ | |||
public function mention(): Response | |||
{ | |||
@@ -20,4 +20,17 @@ class MentionController extends DefaultController | |||
] | |||
); | |||
} | |||
public function politique(): Response | |||
{ | |||
$pageRepository = $this->em->getRepository(Page::class); | |||
return $this->render( | |||
'page/page.html.twig', | |||
[ | |||
'controller_name' => 'IndexController', | |||
'page' => $pageRepository->findOneByDevAlias('politique') | |||
] | |||
); | |||
} | |||
} |
@@ -80,7 +80,7 @@ | |||
</div> | |||
<div class="bar-footer"> | |||
© 2021 par la Coopérative des Citoyens | <a href="{{ path('app_legal_mention') }}" title="Mentions légales">Mentions | |||
légales</a> | <a href="" title="Utilisation des cookies">Utilisation des cookies</a> | Création <a | |||
légales</a> | <a href="{{ path('app_politique') }}" title="Politique de Confidentialité">Politique de Confidentialité</a> | Création <a | |||
href="https://www.laclic.fr/" title="La Clic !" target="_blank">LA CLIC !</a> | |||
</div> | |||
</footer> |