瀏覽代碼

politoque + legal mention

v1
charly 3 年之前
父節點
當前提交
c5ecf89616
共有 4 個文件被更改,包括 22 次插入16 次删除
  1. +5
    -1
      config/routes.yaml
  2. +2
    -13
      src/Controller/Admin/PageCrudController.php
  3. +14
    -1
      src/Controller/Frontend/PageController.php
  4. +1
    -1
      templates/frontend/footer.html.twig

+ 5
- 1
config/routes.yaml 查看文件

@@ -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

+ 2
- 13
src/Controller/Admin/PageCrudController.php 查看文件

@@ -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
);
];
}


}

src/Controller/Frontend/MentionController.php → src/Controller/Frontend/PageController.php 查看文件

@@ -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')
]
);
}
}

+ 1
- 1
templates/frontend/footer.html.twig 查看文件

@@ -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>

Loading…
取消
儲存