use ControllerTrait; | use ControllerTrait; | ||||
/** | |||||
* @Route("/admin", name="app_admin_dashboard") | |||||
*/ | |||||
public function index(): Response | public function index(): Response | ||||
{ | { | ||||
return $this->render('@LcSov/adminlte/dashboard.html.twig'); | return $this->render('@LcSov/adminlte/dashboard.html.twig'); |
public function show(Throwable $exception, DebugLoggerInterface $logger = null) | public function show(Throwable $exception, DebugLoggerInterface $logger = null) | ||||
{ | { | ||||
if ($this->getRequestStack()->getCurrentRequest()->getPathInfo() == "/admin") { | |||||
if (str_contains($this->getRequestStack()->getCurrentRequest(), "/admin")) { | |||||
return $this->render('@LcSov/exception/error.html.twig', [ | return $this->render('@LcSov/exception/error.html.twig', [ | ||||
"code" => $exception->getCode(), | "code" => $exception->getCode(), | ||||
"message" => $exception->getMessage() | "message" => $exception->getMessage() |
#page-error { | |||||
text-align: center; | |||||
img { | |||||
margin-top: 100px; | |||||
} | |||||
} | |||||
nav.main-header { | nav.main-header { | ||||
ul.navbar-nav { | ul.navbar-nav { | ||||
li.nav-item-user-menu { | li.nav-item-user-menu { |
{% extends '@LcSov/adminlte/layout.html.twig' %} | |||||
{% block wrapper %} | |||||
{% block navbar_header %}{% endblock %} | |||||
{% block sidebar %}{% endblock %} | |||||
{% block content %} | |||||
<div id="page-error"> | |||||
<html> | |||||
<div id="page-error"> | |||||
<a href="{{ path('app_admin_dashboard') }}" title="Retourner sur l'admin">Retourner sur l'admin</a> | |||||
<div> | |||||
<a href="{{ path('app_admin_dashboard') }}" title="Retourner sur l'admin"> | |||||
<img src="{{ asset('bundles/lcsov/img/erreur-500.png') }}" alt="ERROR"> | <img src="{{ asset('bundles/lcsov/img/erreur-500.png') }}" alt="ERROR"> | ||||
</div> | |||||
{% endblock %} | |||||
{% endblock %} | |||||
{# {% extends 'layout.html' %} #} | |||||
{# {% set title = 'Erreur' %} #} | |||||
{# {% block page_title %}{% endblock %} #} | |||||
{# {% block title %}{{ title }}{% endblock %} #} | |||||
</a> | |||||
</div> | |||||
</div> | |||||
<style> | |||||
#page-error { | |||||
text-align: center; | |||||
} | |||||
{# {% block content %} #} | |||||
{# {% embed 'bundles/TwigBundle/Exception/_content.html.twig' %} #} | |||||
{# {% block content_error %} #} | |||||
{# <p>Une erreur est survenue.TEST</p> #} | |||||
{# {% endblock %} #} | |||||
{# {% endembed %} #} | |||||
{# {% endblock %} #} | |||||
img { | |||||
margin-top: 100px; | |||||
} | |||||
</style> | |||||
</html> |