Browse Source

link page error

develop
Charly 3 years ago
parent
commit
ffb865cad7
4 changed files with 21 additions and 31 deletions
  1. +3
    -0
      Controller/Dashboard/DashboardAdminController.php
  2. +1
    -1
      Controller/ErrorController.php
  3. +0
    -8
      Resources/assets/app/adminlte/main/scss/_common.scss
  4. +17
    -22
      Resources/views/exception/error.html.twig

+ 3
- 0
Controller/Dashboard/DashboardAdminController.php View File

@@ -19,6 +19,9 @@ class DashboardAdminController extends AbstractDashboardController

use ControllerTrait;

/**
* @Route("/admin", name="app_admin_dashboard")
*/
public function index(): Response
{
return $this->render('@LcSov/adminlte/dashboard.html.twig');

+ 1
- 1
Controller/ErrorController.php View File

@@ -10,7 +10,7 @@ class ErrorController extends AbstractController

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', [
"code" => $exception->getCode(),
"message" => $exception->getMessage()

+ 0
- 8
Resources/assets/app/adminlte/main/scss/_common.scss View File

@@ -1,11 +1,3 @@
#page-error {
text-align: center;

img {
margin-top: 100px;
}
}

nav.main-header {
ul.navbar-nav {
li.nav-item-user-menu {

+ 17
- 22
Resources/views/exception/error.html.twig View File

@@ -1,24 +1,19 @@
{% 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">
</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>

Loading…
Cancel
Save