login_redirection: | login_redirection: | ||||
redirect_referer: true | redirect_referer: true | ||||
roles_redirection: | roles_redirection: | ||||
- { role: "ROLE_ADMIN", redirect: "admin_dashboard" } | |||||
- { role: "ROLE_SUPER_ADMIN", redirect: "admin_dashboard" } | |||||
- { role: "ROLE_ADMIN", redirect: "app_admin_dashboard" } | |||||
- { role: "ROLE_SUPER_ADMIN", redirect: "app_admin_dashboard" } |
artgris_bundle_file_manager: | artgris_bundle_file_manager: | ||||
resource: "@ArtgrisFileManagerBundle/Controller" | resource: "@ArtgrisFileManagerBundle/Controller" | ||||
type: annotation | type: annotation | ||||
prefix: /manager | |||||
admin_dashboard: | |||||
path: /admin | |||||
controller: App\Controller\Dashboard\DashboardAdminController::index | |||||
app_homepage: | |||||
path: / | |||||
defaults: { _controller: App\Controller\IndexController::index , _locale: fr} | |||||
app_page: | |||||
path: /page/{pageSlug} | |||||
controller: App\Controller\IndexController::page | |||||
prefix: /manager |
app.locales: ["fr"] | app.locales: ["fr"] | ||||
app.default_locale: "fr" | app.default_locale: "fr" | ||||
app.path_uploads: '/uploads' | app.path_uploads: '/uploads' | ||||
app.reminder.route_render_modal: 'carac_admin_reminder_render_modal' | |||||
app.reminder.route_new: 'carac_admin_reminder_new' | |||||
app.reminder.route_render_modal: 'sov_admin_reminder_render_modal' | |||||
app.reminder.route_new: 'sov_admin_reminder_new' | |||||
services: | services: | ||||
# default configuration for services in *this* file | # default configuration for services in *this* file | ||||
# add more service definitions when explicit configuration is needed | # add more service definitions when explicit configuration is needed | ||||
# please note that last definitions always *replace* previous ones | # please note that last definitions always *replace* previous ones | ||||
# Definition | |||||
Lc\CaracoleBundle\Definition\MerchantSettingDefinition: | Lc\CaracoleBundle\Definition\MerchantSettingDefinition: | ||||
class: App\Definition\MerchantSettingDefinition | class: App\Definition\MerchantSettingDefinition | ||||
Lc\SovBundle\Definition\SiteSettingDefinition: | Lc\SovBundle\Definition\SiteSettingDefinition: | ||||
class: App\Definition\SiteSettingDefinition | class: App\Definition\SiteSettingDefinition | ||||
# Repository | |||||
Lc\SovBundle\Repository\Reminder\ReminderRepositoryInterface: | |||||
class: Lc\SovBundle\Repository\Reminder\ReminderRepository | |||||
Lc\SovBundle\Repository\File\FileRepositoryInterface: | |||||
class: Lc\SovBundle\Repository\File\FileRepository | |||||
Lc\SovBundle\Repository\Newsletter\NewsletterRepositoryInterface: | |||||
class: Lc\SovBundle\Repository\Newsletter\NewsletterRepository | |||||
Lc\SovBundle\Repository\Setting\SiteSettingRepositoryInterface: | |||||
class: Lc\SovBundle\Repository\Setting\SiteSettingRepository | |||||
Lc\SovBundle\Repository\Site\SiteRepositoryInterface: | |||||
class: Lc\SovBundle\Repository\Site\SiteRepository | |||||
Lc\SovBundle\Repository\Site\PageRepositoryInterface: | |||||
class: Lc\SovBundle\Repository\Site\PageRepository | |||||
Lc\SovBundle\Repository\Site\NewsRepositoryInterface: | |||||
class: Lc\SovBundle\Repository\Site\NewsRepository | |||||
Lc\SovBundle\Repository\Ticket\TicketRepositoryInterface: | |||||
class: Lc\SovBundle\Repository\Ticket\TicketRepository | |||||
Lc\SovBundle\Repository\Ticket\TicketMessageRepositoryInterface: | |||||
class: Lc\SovBundle\Repository\Ticket\TicketMessageRepository | |||||
Lc\SovBundle\Repository\User\GroupUserRepositoryInterface: | |||||
class: Lc\CaracoleBundle\Repository\User\GroupUserRepository | |||||
Lc\SovBundle\Repository\User\UserRepositoryInterface: | |||||
class: Lc\SovBundle\Repository\User\UserRepository | |||||
Lc\CaracoleBundle\Repository\Merchant\MerchantRepositoryInterface: | |||||
class: Lc\CaracoleBundle\Repository\Merchant\MerchantRepository | |||||
Lc\CaracoleBundle\Repository\User\UserMerchantRepositoryInterface: | |||||
class: Lc\CaracoleBundle\Repository\User\UserMerchantRepository | |||||
Lc\CaracoleBundle\Repository\User\VisitorRepositoryInterface: | |||||
class: Lc\CaracoleBundle\Repository\User\VisitorRepository | |||||
Lc\CaracoleBundle\Repository\Section\SectionRepositoryInterface: | |||||
class: Lc\CaracoleBundle\Repository\Section\SectionRepository | |||||
Lc\CaracoleBundle\Repository\PointSale\PointSaleRepositoryInterface: | |||||
class: Lc\CaracoleBundle\Repository\PointSale\PointSaleRepository | |||||
Lc\CaracoleBundle\Repository\Credit\CreditHistoryRepositoryInterface: | |||||
class: Lc\CaracoleBundle\Repository\Credit\CreditHistoryRepository | |||||
# Factory | |||||
Lc\SovBundle\Factory\Reminder\ReminderFactoryInterface: | Lc\SovBundle\Factory\Reminder\ReminderFactoryInterface: | ||||
class: Lc\CaracoleBundle\Factory\Reminder\ReminderFactory | class: Lc\CaracoleBundle\Factory\Reminder\ReminderFactory | ||||
Lc\SovBundle\Factory\Ticket\TicketFactoryInterface: | Lc\SovBundle\Factory\Ticket\TicketFactoryInterface: | ||||
class: Lc\CaracoleBundle\Factory\Ticket\TicketFactory | class: Lc\CaracoleBundle\Factory\Ticket\TicketFactory |
use App\Entity\Site\Page; | use App\Entity\Site\Page; | ||||
use App\Entity\Ticket\Ticket; | use App\Entity\Ticket\Ticket; | ||||
use App\Entity\User\GroupUser; | use App\Entity\User\GroupUser; | ||||
use App\Entity\User\User; | |||||
use App\Entity\User\UserMerchant; | use App\Entity\User\UserMerchant; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem; | use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem; | ||||
use Lc\CaracoleBundle\Controller\Dashboard\DashboardAdminAdminController as CaracDashboardController; | use Lc\CaracoleBundle\Controller\Dashboard\DashboardAdminAdminController as CaracDashboardController; | ||||
use Symfony\Component\HttpFoundation\Response; | use Symfony\Component\HttpFoundation\Response; | ||||
use Symfony\Component\Routing\Annotation\Route; | |||||
class DashboardAdminController extends CaracDashboardController | class DashboardAdminController extends CaracDashboardController | ||||
{ | { | ||||
[ | [ | ||||
MenuItem::linkToRoute('setting_merchant', '', 'carac_admin_setting_merchant'), | MenuItem::linkToRoute('setting_merchant', '', 'carac_admin_setting_merchant'), | ||||
MenuItem::linkToRoute('setting_section', '', 'carac_admin_setting_section'), | MenuItem::linkToRoute('setting_section', '', 'carac_admin_setting_section'), | ||||
MenuItem::linkToRoute('setting_global', '', 'carac_admin_setting_global'), | |||||
MenuItem::linkToRoute('setting_global', '', 'sov_admin_setting_global'), | |||||
] | ] | ||||
); | ); | ||||
); | ); | ||||
} | } | ||||
/** | |||||
* @Route("/admin", name="app_admin_dashboard") | |||||
*/ | |||||
public function index(): Response | public function index(): Response | ||||
{ | { | ||||
return $this->render('admin/dashboard/dashboard.html.twig'); | return $this->render('admin/dashboard/dashboard.html.twig'); |
use Lc\SovBundle\Doctrine\EntityManager; | use Lc\SovBundle\Doctrine\EntityManager; | ||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
use Symfony\Component\HttpFoundation\Response; | use Symfony\Component\HttpFoundation\Response; | ||||
use Symfony\Component\Routing\Annotation\Route; | |||||
class IndexController extends AbstractController | class IndexController extends AbstractController | ||||
{ | { | ||||
protected $em; | |||||
protected $mailer; | |||||
public function __construct(EntityManager $em) | |||||
{ | |||||
$this->em = $em; | |||||
} | |||||
public function index(): Response | |||||
{ | |||||
$pageRepository = $this->em->getRepository(Page::class); | |||||
$pages = $pageRepository->findAll(); | |||||
return $this->render('page/index.html.twig', [ | |||||
protected $em; | |||||
protected $mailer; | |||||
public function __construct(EntityManager $em) | |||||
{ | |||||
$this->em = $em; | |||||
} | |||||
/** | |||||
* @Route("/", name="app_homepage") | |||||
*/ | |||||
public function index(): Response | |||||
{ | |||||
$pageRepository = $this->em->getRepository(Page::class); | |||||
$pages = $pageRepository->findAll(); | |||||
return $this->render( | |||||
'page/index.html.twig', | |||||
[ | |||||
'controller_name' => 'IndexController', | 'controller_name' => 'IndexController', | ||||
'pages' => $pages | 'pages' => $pages | ||||
]); | |||||
} | |||||
public function page($pageSlug): Response | |||||
{ | |||||
$pageRepository = $this->em->getRepository(Page::class); | |||||
$page = $pageRepository->findOneBySlug($pageSlug); | |||||
return $this->render('page/page.html.twig', [ | |||||
] | |||||
); | |||||
} | |||||
/** | |||||
* @Route("/page/{pageSlug}", name="app_page") | |||||
*/ | |||||
public function page($pageSlug): Response | |||||
{ | |||||
$pageRepository = $this->em->getRepository(Page::class); | |||||
$page = $pageRepository->findOneBySlug($pageSlug); | |||||
return $this->render( | |||||
'page/page.html.twig', | |||||
[ | |||||
'controller_name' => 'IndexController', | 'controller_name' => 'IndexController', | ||||
'page' => $page | 'page' => $page | ||||
]); | |||||
} | |||||
] | |||||
); | |||||
} | |||||
} | } |
<?php | |||||
namespace App\Dependency\Reminder; | |||||
use App\Entity\Reminder\Reminder; | |||||
use Lc\CaracoleBundle\Factory\Reminder\ReminderFactory; | |||||
use Lc\SovBundle\Factory\Reminder\ReminderFactoryInterface; | |||||
use Lc\SovBundle\Model\Reminder\ReminderInterface; | |||||
use Lc\SovBundle\Repository\Reminder\ReminderRepositoryInterface; | |||||
use App\Repository\Reminder\ReminderRepository; | |||||
class ReminderDependency implements DependencyInterface | |||||
{ | |||||
public function getAliases() | |||||
{ | |||||
return [ | |||||
ReminderInterface::class => Reminder::class, | |||||
ReminderFactoryInterface::class => ReminderFactory::class, | |||||
ReminderRepositoryInterface::class => ReminderRepository::class, | |||||
// doctrine entity | |||||
// factory | |||||
// repository | |||||
// repository query | |||||
// store | |||||
]; | |||||
} | |||||
} |
namespace App\Entity\Reminder; | namespace App\Entity\Reminder; | ||||
use Lc\SovBundle\Repository\Reminder\ReminderRepository; | |||||
use Lc\CaracoleBundle\Factory\Reminder\ReminderFactory; | |||||
use Lc\SovBundle\Factory\Reminder\ReminderFactoryInterface; | |||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\CaracoleBundle\Model\Reminder\ReminderModel; | use Lc\CaracoleBundle\Model\Reminder\ReminderModel; | ||||
use Lc\SovBundle\Repository\Reminder\ReminderRepositoryInterface; | |||||
use App\Repository\Reminder\ReminderRepository; | |||||
/** | /** | ||||
* @ORM\Entity(repositoryClass=ReminderRepository::class) | * @ORM\Entity(repositoryClass=ReminderRepository::class) | ||||
*/ | */ | ||||
private $id; | private $id; | ||||
public function getAliases() | |||||
{ | |||||
return [ | |||||
ReminderFactoryInterface::class => ReminderFactory::class, | |||||
ReminderRepositoryInterface::class => ReminderRepository::class, | |||||
]; | |||||
} | |||||
public function getId(): ?int | public function getId(): ?int | ||||
{ | { | ||||
return $this->id; | return $this->id; |
{% extends '@LcCaracole/adminlte/layout.html.twig' %} | {% extends '@LcCaracole/adminlte/layout.html.twig' %} | ||||
{% block content_title %} | {% block content_title %} | ||||
{{ 'dashboard'|lc_trans_admin_title }} | |||||
{{ 'dashboard'|sov_trans_admin_title }} | |||||
{% endblock %} | {% endblock %} | ||||
{% block main %} | {% block main %} |
{% endfor %} | {% endfor %} | ||||
</ul> | </ul> | ||||
{% for lg, url in translated_urls() %} | |||||
{% for lg, url in sov_translated_urls() %} | |||||
<a class="{{ app.request.locale == lg ? 'selected' : '' }}" title="{{ "misc.switch"|trans({"%lang%": lg}) }}" href="{{ url }}">{{ lg }}</a> | <a class="{{ app.request.locale == lg ? 'selected' : '' }}" title="{{ "misc.switch"|trans({"%lang%": lg}) }}" href="{{ url }}">{{ lg }}</a> | ||||
{% if lg == 'fr' %} | {% if lg == 'fr' %} | ||||
<span class="slash">/</span> | <span class="slash">/</span> |
{% block content %} | {% block content %} | ||||
{{ page.description|raw }} | {{ page.description|raw }} | ||||
<img src="{{ lc_liip(page.image.path, 'page') }}" alt="{{ page.image.legend }}" /> | |||||
<img src="{{ sov_liip(page.image.path, 'page') }}" alt="{{ page.image.legend }}" /> | |||||
{% endblock %} | {% endblock %} |
.addEntry('adminlte-sort', './Lc/SovBundle/Resources/assets/app/adminlte/sort/app.sort.js') | .addEntry('adminlte-sort', './Lc/SovBundle/Resources/assets/app/adminlte/sort/app.sort.js') | ||||
.addEntry('adminlte-field-filemanager', './Lc/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js') | .addEntry('adminlte-field-filemanager', './Lc/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js') | ||||
.addEntry('adminlte-field-collection', './Lc/SovBundle/Resources/assets/app/adminlte/field/collection/app.collection.js') | .addEntry('adminlte-field-collection', './Lc/SovBundle/Resources/assets/app/adminlte/field/collection/app.collection.js') | ||||
.addEntry('adminlte-ticket', './Lc/SovBundle/Resources/assets/app/adminlte/ticket/app.ticket.js') | |||||
.addEntry('adminlte-reminder', './Lc/SovBundle/Resources/assets/app/adminlte/reminder/app.reminder.js') | |||||
.addEntry('carac-switch-merchant', './Lc/CaracoleBundle/Resources/assets/app/switchmerchant/app.switchmerchant.js') | |||||
.addEntry('sov-reminder', './Lc/SovBundle/Resources/assets/app/admin/reminder/app.reminder.js') | |||||
.addEntry('sov-ticket', './Lc/SovBundle/Resources/assets/app/admin/ticket/app.ticket.js') | |||||
.addEntry('carac-common', './Lc/CaracoleBundle/Resources/assets/app/adminlte/common/app.common.js') | .addEntry('carac-common', './Lc/CaracoleBundle/Resources/assets/app/adminlte/common/app.common.js') | ||||
.addEntry('carac-switch-merchant', './Lc/CaracoleBundle/Resources/assets/app/admin/switchmerchant/app.switchmerchant.js') | |||||
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js) | // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js) | ||||
.enableStimulusBridge('./assets/controllers.json') | .enableStimulusBridge('./assets/controllers.json') |