ソースを参照

error 500 custom laclic

develop
Charly 3年前
コミット
3fc9a073b8
4個のファイルの変更149行の追加24行の削除
  1. +25
    -0
      Controller/ErrorController.php
  2. +100
    -24
      Resources/assets/app/adminlte/main/scss/_common.scss
  3. バイナリ
      Resources/public/img/erreur-500.png
  4. +24
    -0
      Resources/views/exception/error.html.twig

+ 25
- 0
Controller/ErrorController.php ファイルの表示

@@ -0,0 +1,25 @@
<?php

namespace Lc\SovBundle\Controller;

use Throwable;
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;

class ErrorController extends AbstractController
{

public function show(Throwable $exception, DebugLoggerInterface $logger = null)
{
if ($this->getRequestStack()->getCurrentRequest()->getPathInfo() == "/admin") {
return $this->render('@LcSov/exception/error.html.twig', [
"code" => $exception->getCode(),
"message" => $exception->getMessage()
]);
} else {
return $this->render('bundles/TwigBundle/Exception/error.html.twig', [
"code" => $exception->getCode(),
"message" => $exception->getMessage()
]);
}
}
}

+ 100
- 24
Resources/assets/app/adminlte/main/scss/_common.scss ファイルの表示

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

img {
margin-top: 100px;
}
}

nav.main-header {
ul.navbar-nav {
@@ -31,36 +38,103 @@ nav.main-header {
}

//TODO à réecrire correctement
.table.datatable-simple .highlight{background: var(--teal);}
.datatable-field-search.small{width: 50px;}
.table.datatable-simple .highlight {
background: var(--teal);
}

.datatable-field-search.small {
width: 50px;
}

.dataTables_length, .dataTables_filter {
padding: .75rem 1.25rem 0.25rem;
}

table.fixedHeader-floating {
margin-top: 0px !important;
}

.dataTables_length, .dataTables_filter{padding: .75rem 1.25rem 0.25rem;}
.card-body table.lc-table-list th.filtered {
border-top: 2px solid var(--primary);
}

.card-body table.lc-table-list th.sorted, table th.sorting_asc, table th.sorting_desc {
border-top: 2px solid var(--success);
}

.card-body table.lc-table-list th.sorted.filtered {
border-top: 0px;
position: relative;
}

table.fixedHeader-floating{margin-top: 0px !important;}
.card-body table.lc-table-list th.sorted.filtered:after {
content: '';
height: 2px;
position: absolute;
left: 0;
width: 100%;
right: 0;
top: -1px;
background: linear-gradient(to right, var(--success) 0%, var(--success) 50%, var(--primary) 50%, var(--primary) 100%);
}

.card-body table.lc-table-list th.filtered{border-top:2px solid var(--primary);}
.card-body table.lc-table-list th.sorted, table th.sorting_asc, table th.sorting_desc{border-top:2px solid var(--success);}
.card-body table.lc-table-list th.sorted.filtered{border-top:0px; position: relative;}
.card-body table.lc-table-list th.sorted.filtered:after{ content: ''; height: 2px; position: absolute; left: 0; width: 100%; right: 0; top: -1px; background: linear-gradient(to right, var(--success) 0%, var(--success) 50%, var(--primary) 50%, var(--primary) 100%);}
.table-filters-line th {
font-weight: 400;
position: relative;
}

.table-filters-line th {font-weight: 400; position: relative;}
.table-filters-line th input{}
#list_filter_id{width: 60px;}
.table-filters-line th input {
}

.delivery-field .form-group{display: inline-block; margin-bottom: 0px; margin-right: 15px;}
.delivery-field .form-group .form-control{width: 90px;}
#list_filter_id {
width: 60px;
}

.table{
thead a{color: #212529}
.date-range{width: 130px;}
.delivery-field .form-group {
display: inline-block;
margin-bottom: 0px;
margin-right: 15px;
}

th, td{padding: 0.35rem;}
th input{width: 100%;}
th.filtered{border-top:2px solid var(--primary);}
th.actions, td.actions{white-space: nowrap; text-align: right;}
th .select2-container--default .select2-selection--single{padding:0.3rem 0.4rem; }
th.sorting_asc, th.sorting_desc{border-top:2px solid var(--success);}
.actions .btn-sm{
.delivery-field .form-group .form-control {
width: 90px;
}

.table {
thead a {
color: #212529
}

.date-range {
width: 130px;
}

th, td {
padding: 0.35rem;
}

th input {
width: 100%;
}

th.filtered {
border-top: 2px solid var(--primary);
}

th.actions, td.actions {
white-space: nowrap;
text-align: right;
}

th .select2-container--default .select2-selection--single {
padding: 0.3rem 0.4rem;
}

th.sorting_asc, th.sorting_desc {
border-top: 2px solid var(--success);
}

.actions .btn-sm {
margin-right: 3px;
}
}
@@ -71,4 +145,6 @@ table.fixedHeader-floating{margin-top: 0px !important;}
display: none;
}

.hidden{display: none;}
.hidden {
display: none;
}

バイナリ
Resources/public/img/erreur-500.png ファイルの表示

変更前 変更後
幅: 1024  |  高さ: 478  |  サイズ: 128KB

+ 24
- 0
Resources/views/exception/error.html.twig ファイルの表示

@@ -0,0 +1,24 @@
{% extends '@LcSov/adminlte/layout.html.twig' %}

{% block wrapper %}
{% block navbar_header %}{% endblock %}
{% block sidebar %}{% endblock %}
{% block content %}
<div id="page-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 %} #}

{# {% block content %} #}
{# {% embed 'bundles/TwigBundle/Exception/_content.html.twig' %} #}
{# {% block content_error %} #}
{# <p>Une erreur est survenue.TEST</p> #}
{# {% endblock %} #}
{# {% endembed %} #}
{# {% endblock %} #}

読み込み中…
キャンセル
保存