瀏覽代碼

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…
取消
儲存