Преглед на файлове

Merge branch 'develop'

master
Fabien Normand преди 3 години
родител
ревизия
57e54c710f
променени са 5 файла, в които са добавени 153 реда и са изтрити 24 реда
  1. +25
    -0
      Controller/ErrorController.php
  2. +4
    -0
      Field/Filter/FilterManager.php
  3. +100
    -24
      Resources/assets/app/adminlte/main/scss/_common.scss
  4. Двоични данни
      Resources/public/img/erreur-500.png
  5. +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()
]);
}
}
}

+ 4
- 0
Field/Filter/FilterManager.php Целия файл

@@ -160,6 +160,10 @@ class FilterManager
$this->session->set($sessionParam, $value);
return $value;
}
// pas de valeur et le form est envoyé, on supprimer le filtre correspondant
elseif($formField->isSubmitted()) {
$this->session->remove($sessionParam);
}

//action reset
if ($filtersForm->get('reset')->getData() == 'clearAll') {

+ 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 Целия файл

Before After
Width: 1024  |  Height: 478  |  Size: 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 %} #}

Loading…
Отказ
Запис