Browse Source

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/LcShopBundle into develop

develop
Guillaume 3 years ago
parent
commit
dc98ad3655
4 changed files with 219 additions and 153 deletions
  1. +58
    -26
      ShopBundle/Controller/Backend/AdminController.php
  2. +144
    -121
      ShopBundle/Resources/public/css/backend/custom.css
  3. +6
    -3
      ShopBundle/Resources/public/sass/backend/custom.scss
  4. +11
    -3
      ShopBundle/Resources/views/backend/default/list.html.twig

+ 58
- 26
ShopBundle/Controller/Backend/AdminController.php View File

@@ -193,9 +193,11 @@ class AdminController extends EasyAdminController
'entity_class' => $this->entity['class']
));
$this->filtersForm->handleRequest($this->request);
$easyadmin = $this->request->attributes->get('easyadmin');

if ($this->filtersForm->isSubmitted() && $this->filtersForm->isValid()) {
if (($this->filtersForm->isSubmitted() && $this->filtersForm->isValid()) || $this->entity[$easyadmin['view']]['filters']!==false) {
foreach ($listFields as $field) {
//if ($this->filtersForm->has($field['property'])->getConfig()->getOption('AdminController')) {
if ($this->filtersForm->has($field['property'])) {
switch ($field['dataType']) {
case 'option':
@@ -203,8 +205,8 @@ class AdminController extends EasyAdminController
case 'text':
case 'string':
case 'toggle':
// $filter = $this->getListFilterParam($field['property']);
$filter = $this->filtersForm->get($field['property'])->getData();
$filter = $this->getListFilterParam($field['property']);
//$filter = $this->filtersForm->get($field['property'])->getData();
if ($filter !== null) {

$queryBuilder->andWhere('entity.' . $field['property'] . ' LIKE :' . $field['property'] . '');
@@ -212,8 +214,8 @@ class AdminController extends EasyAdminController
}
break;
case 'association' :
$filter = $this->filtersForm->get($field['property'])->getData();
$filter = $this->getListFilterParam($field['property']);
//$filter = $this->filtersForm->get($field['property'])->getData();
if ($filter !== null) {
if ($field['type_options']['multiple']) {
$queryBuilder->andWhere(':' . $field['property'] . ' MEMBER OF entity.' . $field['property'] . '');
@@ -229,9 +231,8 @@ class AdminController extends EasyAdminController
break;
case 'datetime':
case 'date':
$dateStart = $this->filtersForm->get($field['property'])->get('dateStart')->getData();
$dateEnd = $this->filtersForm->get($field['property'])->get('dateEnd')->getData();

$dateStart = $this->getListFilterParam($field['property'], 'dateStart');
$dateEnd = $this->getListFilterParam($field['property'], 'dateEnd');

if ($dateStart) $queryBuilder->andWhere('entity.' . $field['property'] . ' >= :dateStart')->setParameter('dateStart', $dateStart);
if ($dateEnd) $queryBuilder->andWhere('entity.' . $field['property'] . ' <= :dateEnd')->setParameter('dateEnd', $dateEnd);
@@ -251,6 +252,55 @@ class AdminController extends EasyAdminController
return $queryBuilder;
}

//TODO finaliser la sauvegarde des filtres

protected function getListFilterParam($param, $extraParam = null){
$entityName = $this->entity['name'];
$sessionParam = $entityName.$param.$extraParam;
//CUSTOM
if($extraParam){
$value = $this->filtersForm->get($param)->get($extraParam)->getViewData();
}else{
$value = $this->filtersForm->get($param)->getViewData();
}

if($this->request->query->get('filterClear')){
$this->session->remove($sessionParam);
}else {
if ($value) {
$this->session->set($sessionParam, $value);
} else if ($this->session->get($sessionParam) && !$this->filtersForm->isSubmitted() && $this->filtersForm->get($param)) {
$value = $this->session->get($sessionParam);

if($extraParam){

if($this->filtersForm->get($param)->get($extraParam)->getConfig()->getOption('input')=='datetime'){

$this->filtersForm->get($param)->get($extraParam)->setData(new \DateTime($value));
}else{
$this->filtersForm->get($param)->get($extraParam)->setData($value);
}

}else {
//Champ association
if ($this->filtersForm->get($param)->getConfig()->getOption('class')) {
$valFormated = $this->em->getRepository($this->filtersForm->get($param)->getConfig()->getOption('class'))->find($value);
$this->filtersForm->get($param)->setData($valFormated);
} else {
//Champ noramux
$this->filtersForm->get($param)->setData($value);
}
}

}
}

if($value !== "")return $value;
else return null;

}



public function renderTemplate($actionName, $templatePath, array $parameters = [])
{
@@ -328,24 +378,6 @@ class AdminController extends EasyAdminController
return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);
}

//TODO finaliser la sauvegarde des filtres
/*
protected function getListFilterParam($param){
$entityName = $this->entity['name'];
$sessionParam = $entityName.$param;
//CUSTOM

$value = $this->filtersForm->get($param)->getViewData();
if($value){
$this->session->set($sessionParam, $value);
}else if($this->session->get($sessionParam) && !$this->filtersForm->isSubmitted() && $this->filtersForm->get($param)){
$value = $this->session->get($sessionParam);
$this->filtersForm->get($param)->setData($value);
}

return $value;

}*/

protected function getListParam($param, $default =null){
$entityName = $this->entity['name'];

+ 144
- 121
ShopBundle/Resources/public/css/backend/custom.css View File

@@ -160,83 +160,106 @@ table.fixedHeader-floating {

/* line 60, ../../sass/backend/custom.scss */
table th.sorting_asc, table th.sorting_desc {
border-top: 3px solid var(--success);
border-top: 2px solid var(--success);
}

/* line 61, ../../sass/backend/custom.scss */
.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.filtered {
border-top: 2px solid var(--primary);
}

/*.card-body table.lc-table-list th{border-top:3px solid var(--success);}*/
/* line 63, ../../sass/backend/custom.scss */
table th.filtered {
border-top: 3px solid var(--primary);
border-top: 2px solid var(--primary);
}

/* line 64, ../../sass/backend/custom.scss */
.card-body table.lc-table-list th.sorted, table th.sorting_asc, table th.sorting_desc {
border-top: 2px solid var(--success);
}

/* line 65, ../../sass/backend/custom.scss */
.card-body table.lc-table-list th.sorted.filtered {
border-top: 0px;
position: relative;
}

/* line 66, ../../sass/backend/custom.scss */
.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%);
}

/* line 69, ../../sass/backend/custom.scss */
.lc-table-list thead a {
color: #212529;
}

/* line 67, ../../sass/backend/custom.scss */
/* line 70, ../../sass/backend/custom.scss */
.table-filters-line th {
font-weight: 400;
position: relative;
}

/* line 69, ../../sass/backend/custom.scss */
/* line 72, ../../sass/backend/custom.scss */
#list_filter_id {
width: 60px;
}

/* line 70, ../../sass/backend/custom.scss */
/* line 73, ../../sass/backend/custom.scss */
.lc-table-list .date-range {
width: 130px;
}

/* line 72, ../../sass/backend/custom.scss */
/* line 75, ../../sass/backend/custom.scss */
th.actions, td.actions {
white-space: nowrap;
text-align: right;
}

/* line 74, ../../sass/backend/custom.scss */
/* line 77, ../../sass/backend/custom.scss */
.table td, .table th {
padding: 0.35rem;
}

/* line 75, ../../sass/backend/custom.scss */
/* line 78, ../../sass/backend/custom.scss */
.delivery-field .form-group {
display: inline-block;
margin-bottom: 0px;
margin-right: 15px;
}

/* line 76, ../../sass/backend/custom.scss */
/* line 79, ../../sass/backend/custom.scss */
.delivery-field .form-group .form-control {
width: 150px;
}

/* line 78, ../../sass/backend/custom.scss */
/* line 81, ../../sass/backend/custom.scss */
table th input {
width: 100%;
}

/* line 79, ../../sass/backend/custom.scss */
/* line 82, ../../sass/backend/custom.scss */
table th .select2-container--default .select2-selection--single {
padding: 0.3rem 0.4rem;
}

/************************ LOGIN PAGE *********************/
/* line 82, ../../sass/backend/custom.scss */
/* line 85, ../../sass/backend/custom.scss */
.login-logo {
display: block;
margin: auto;
}

/************************ form error *********************/
/* line 85, ../../sass/backend/custom.scss */
/* line 88, ../../sass/backend/custom.scss */
.form-sent .form-control:invalid {
border-color: #dc3545;
padding-right: 2.25rem;
@@ -246,19 +269,19 @@ table th .select2-container--default .select2-selection--single {
background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

/* line 86, ../../sass/backend/custom.scss */
/* line 89, ../../sass/backend/custom.scss */
.form-sent select.form-control:invalid + .select2 .select2-selection {
border-color: #dc3545;
}

/* line 87, ../../sass/backend/custom.scss */
/* line 90, ../../sass/backend/custom.scss */
.form-sent select.form-control:invalid + .select2 .select2-selection b {
border-color: #dc3545 transparent transparent transparent;
}

/*CUSTOM Checkbox
/* Customize the label (the container) */
/* line 92, ../../sass/backend/custom.scss */
/* line 95, ../../sass/backend/custom.scss */
.form-check-label {
display: block;
position: relative;
@@ -271,7 +294,7 @@ table th .select2-container--default .select2-selection--single {
}

/* Hide the browser's default checkbox */
/* line 94, ../../sass/backend/custom.scss */
/* line 97, ../../sass/backend/custom.scss */
.form-check-label input {
position: absolute;
opacity: 0;
@@ -281,22 +304,22 @@ table th .select2-container--default .select2-selection--single {
}

/* Create a custom checkbox */
/* line 97, ../../sass/backend/custom.scss */
/* line 100, ../../sass/backend/custom.scss */
.form-check {
padding-left: 0px;
}

/* line 99, ../../sass/backend/custom.scss */
/* line 102, ../../sass/backend/custom.scss */
.form-sent .form-check-label input:invalid ~ .checkmark {
border-color: #dc3545;
}

/* line 100, ../../sass/backend/custom.scss */
/* line 103, ../../sass/backend/custom.scss */
.form-check-label input:disabled ~ .checkmark {
display: none;
}

/* line 101, ../../sass/backend/custom.scss */
/* line 104, ../../sass/backend/custom.scss */
.form-check-label input ~ .checkmark {
position: absolute;
top: 0;
@@ -307,36 +330,36 @@ table th .select2-container--default .select2-selection--single {
border: 1px solid var(--primary);
}

/* line 102, ../../sass/backend/custom.scss */
/* line 105, ../../sass/backend/custom.scss */
.form-check-label.big input ~ .checkmark {
height: 21px;
width: 21px;
}

/* line 103, ../../sass/backend/custom.scss */
/* line 106, ../../sass/backend/custom.scss */
.form-check-label input[type="checkbox"] ~ .checkmark {
top: 2px;
}

/* line 104, ../../sass/backend/custom.scss */
/* line 107, ../../sass/backend/custom.scss */
.form-check-label input[type="radio"] ~ .checkmark {
top: 3px;
border-radius: 50%;
}

/* line 105, ../../sass/backend/custom.scss */
/* line 108, ../../sass/backend/custom.scss */
.form-check-label:hover input ~ .checkmark {
background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
/* line 107, ../../sass/backend/custom.scss */
/* line 110, ../../sass/backend/custom.scss */
.form-check-label input:checked ~ .checkmark {
background-color: var(--primary);
}

/* Create the checkmark/indicator (hidden when not checked) */
/* line 109, ../../sass/backend/custom.scss */
/* line 112, ../../sass/backend/custom.scss */
.form-check-label .checkmark:after {
content: "";
position: absolute;
@@ -344,13 +367,13 @@ table th .select2-container--default .select2-selection--single {
}

/* Show the checkmark when checked */
/* line 111, ../../sass/backend/custom.scss */
/* line 114, ../../sass/backend/custom.scss */
.form-check-label input:checked ~ .checkmark:after {
display: block;
}

/* Style the checkmark/indicator */
/* line 111, ../../sass/backend/custom.scss */
/* line 116, ../../sass/backend/custom.scss */
.form-check-label .checkmark:after {
left: 7px;
top: 3px;
@@ -363,7 +386,7 @@ table th .select2-container--default .select2-selection--single {
transform: rotate(45deg);
}

/* line 114, ../../sass/backend/custom.scss */
/* line 117, ../../sass/backend/custom.scss */
.form-check-label input[type="checkbox"] ~ .checkmark:after {
left: 6px;
top: 2px;
@@ -376,7 +399,7 @@ table th .select2-container--default .select2-selection--single {
transform: rotate(45deg);
}

/* line 115, ../../sass/backend/custom.scss */
/* line 118, ../../sass/backend/custom.scss */
.form-check-label input[type="radio"] ~ .checkmark:after {
top: 4px;
left: 4px;
@@ -386,7 +409,7 @@ table th .select2-container--default .select2-selection--single {
background: white;
}

/* line 117, ../../sass/backend/custom.scss */
/* line 120, ../../sass/backend/custom.scss */
.form-check-label.big input[type="checkbox"] ~ .checkmark:after {
left: 7px;
top: 3px;
@@ -395,118 +418,118 @@ table th .select2-container--default .select2-selection--single {
}

/* Create a custom radio button */
/* line 121, ../../sass/backend/custom.scss */
/* line 124, ../../sass/backend/custom.scss */
.product-categories .parent .form-group.field-checkbox .form-check-label {
padding-left: 0px;
font-style: italic;
}

/* line 122, ../../sass/backend/custom.scss */
/* line 125, ../../sass/backend/custom.scss */
.product-categories .children .form-group.field-checkbox {
margin-left: 20px;
}

/* line 123, ../../sass/backend/custom.scss */
/* line 126, ../../sass/backend/custom.scss */
.product-categories .form-group {
margin-bottom: 0.15rem;
}

/* line 124, ../../sass/backend/custom.scss */
/* line 127, ../../sass/backend/custom.scss */
.lc-deleted-field {
display: none;
}

/* line 125, ../../sass/backend/custom.scss */
/* line 128, ../../sass/backend/custom.scss */
.lc-offline-field {
opacity: 0.5;
}

/* line 126, ../../sass/backend/custom.scss */
/* line 129, ../../sass/backend/custom.scss */
.lc-offline-field label::after {
content: ' [hors ligne]';
}

/* Général */
/* line 132, ../../sass/backend/custom.scss */
/* line 135, ../../sass/backend/custom.scss */
.btn.action-save {
float: right;
margin-left: 10px;
}

/* line 133, ../../sass/backend/custom.scss */
/* line 136, ../../sass/backend/custom.scss */
.button-action a.float-right {
margin-left: 10px;
}

/* line 135, ../../sass/backend/custom.scss */
/* line 138, ../../sass/backend/custom.scss */
.input-group-text {
padding: 0.25rem 0.75rem;
}

/* line 137, ../../sass/backend/custom.scss */
/* line 142, ../../sass/backend/custom.scss */
.col-form-label {
font-weight: bold;
}

/* line 139, ../../sass/backend/custom.scss */
/* line 144, ../../sass/backend/custom.scss */
#toast-container.toast-top-right {
top: 60px;
}

/* SIDEBAR */
/* line 142, ../../sass/backend/custom.scss */
/* line 147, ../../sass/backend/custom.scss */
.main-header.navbar {
padding: 0;
min-height: 57px;
}

/* line 143, ../../sass/backend/custom.scss */
/* line 148, ../../sass/backend/custom.scss */
.lc-navbar li {
border-left: 1px solid #e0e0e0;
padding: 0.5rem 1.5rem;
}

/* line 144, ../../sass/backend/custom.scss */
/* line 149, ../../sass/backend/custom.scss */
.lc-navbar li label {
margin-bottom: 0;
vertical-align: middle;
font-weight: normal !important;
}

/* line 146, ../../sass/backend/custom.scss */
/* line 151, ../../sass/backend/custom.scss */
#switch-merchant {
min-width: 170px;
}

/*************************** PAGINATION *******************************/
/* line 152, ../../sass/backend/custom.scss */
/* line 155, ../../sass/backend/custom.scss */
.pagination {
justify-content: center;
}

/* line 153, ../../sass/backend/custom.scss */
/* line 156, ../../sass/backend/custom.scss */
.disabled .page-link {
color: #343a40;
}

/* line 154, ../../sass/backend/custom.scss */
/* line 157, ../../sass/backend/custom.scss */
.disabled .page-link:hover, .page-link.current:hover {
background-color: #fff;
cursor: default;
}

/* Sortable */
/* line 152, ../../sass/backend/custom.scss */
/* line 162, ../../sass/backend/custom.scss */
.ui-sortable-helper {
display: table;
}

/* line 153, ../../sass/backend/custom.scss */
/* line 163, ../../sass/backend/custom.scss */
.ui-state-highlight {
background: #eee;
}

/* line 154, ../../sass/backend/custom.scss */
/* line 164, ../../sass/backend/custom.scss */
.lc-sortable div:last-child {
display: none;
}
@@ -523,13 +546,13 @@ table th .select2-container--default .select2-selection--single {
.lc-ckfinder-wrap .lc-ckfinder-button{width: 100%; bottom: 0px; left: 0; position: absolute;}
*/
/* VUES JS */
/* line 169, ../../sass/backend/custom.scss */
/* line 179, ../../sass/backend/custom.scss */
.nav-item .btn {
padding-right: 15px;
position: relative;
}

/* line 170, ../../sass/backend/custom.scss */
/* line 180, ../../sass/backend/custom.scss */
.nav-item .btn .invalid-form {
display: none;
position: absolute;
@@ -541,67 +564,67 @@ table th .select2-container--default .select2-selection--single {
font-size: 1.2rem;
}

/* line 171, ../../sass/backend/custom.scss */
/* line 181, ../../sass/backend/custom.scss */
.nav-item.has-invalid .btn .invalid-form {
display: inline-block;
z-index: 2;
}

/* ProductFamily */
/* line 176, ../../sass/backend/custom.scss */
/* line 186, ../../sass/backend/custom.scss */
.field-unit-quantity {
border-bottom: 2px dotted #eee;
padding-bottom: 10px;
margin-bottom: 20px;
}

/* line 177, ../../sass/backend/custom.scss */
/* line 187, ../../sass/backend/custom.scss */
.field-reduction-apply {
border-top: 2px dotted #eee;
padding-top: 10px;
margin-top: 20px;
}

/* line 179, ../../sass/backend/custom.scss */
/* line 189, ../../sass/backend/custom.scss */
.new-productfamily #nav-params,
.edit-productfamily #nav-params {
margin-bottom: 30px;
}

/* line 184, ../../sass/backend/custom.scss */
/* line 194, ../../sass/backend/custom.scss */
.new-productfamily #nav-params .btn,
.edit-productfamily #nav-params .btn {
margin-left: 20px;
}

/* line 189, ../../sass/backend/custom.scss */
/* line 199, ../../sass/backend/custom.scss */
.new-productfamily #product-categories .row,
.edit-productfamily #product-categories .row {
padding: 10px;
}

/* line 194, ../../sass/backend/custom.scss */
/* line 204, ../../sass/backend/custom.scss */
.new-productfamily #product-categories .form-group,
.edit-productfamily #product-categories .form-group {
width: 100%;
padding: 4px;
}

/* line 200, ../../sass/backend/custom.scss */
/* line 210, ../../sass/backend/custom.scss */
.new-productfamily #product-categories .children,
.edit-productfamily #product-categories .children {
margin-left: 20px;
width: 100%;
}

/* line 206, ../../sass/backend/custom.scss */
/* line 216, ../../sass/backend/custom.scss */
.new-productfamily ul.products,
.edit-productfamily ul.products {
padding: 0px;
list-style-type: none;
}

/* line 212, ../../sass/backend/custom.scss */
/* line 222, ../../sass/backend/custom.scss */
.new-productfamily ul.products li.product,
.edit-productfamily ul.products li.product {
padding: 0px;
@@ -609,49 +632,49 @@ table th .select2-container--default .select2-selection--single {
position: relative;
}

/* line 219, ../../sass/backend/custom.scss */
/* line 229, ../../sass/backend/custom.scss */
.new-productfamily ul.products li.add,
.edit-productfamily ul.products li.add {
text-align: right;
}

/* line 224, ../../sass/backend/custom.scss */
/* line 234, ../../sass/backend/custom.scss */
.autoresize textarea {
height: auto;
min-height: 38px;
}

/* line 226, ../../sass/backend/custom.scss */
/* line 236, ../../sass/backend/custom.scss */
.field-price .input-group.buyingPrice input, .field-price .input-group.buyingPrice .input-group-text {
font-weight: bold;
border-color: #222;
}

/* line 227, ../../sass/backend/custom.scss */
/* line 237, ../../sass/backend/custom.scss */
.field-price .input-group.buyingPriceByRefUnit input, .field-price .input-group.buyingPriceByRefUnit .input-group-text {
font-weight: bold;
border-color: #222;
}

/* line 228, ../../sass/backend/custom.scss */
/* line 238, ../../sass/backend/custom.scss */
.field-price .input-group.priceWithTax input, .field-price .input-group.priceWithTax .input-group-text {
font-weight: bold;
border-color: #222;
}

/* line 229, ../../sass/backend/custom.scss */
/* line 239, ../../sass/backend/custom.scss */
.field-price .input-group.priceByRefUnitWithTax input, .field-price .input-group.priceByRefUnitWithTax .input-group-text {
font-weight: bold;
border-color: #222;
}

/* line 230, ../../sass/backend/custom.scss */
/* line 240, ../../sass/backend/custom.scss */
.input-group.multiplyingFactor input, .input-group.multiplyingFactor .input-group-text {
font-weight: bold;
border-color: #222;
}

/* line 234, ../../sass/backend/custom.scss */
/* line 244, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .card-sections {
width: 100%;
position: fixed;
@@ -659,31 +682,31 @@ table th .select2-container--default .select2-selection--single {
top: 0px;
z-index: 10;
}
/* line 242, ../../sass/backend/custom.scss */
/* line 252, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .form {
padding-top: 50px;
}
/* line 246, ../../sass/backend/custom.scss */
/* line 256, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .card-footer {
display: none;
}
/* line 251, ../../sass/backend/custom.scss */
/* line 261, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .in-advanced-editing-table .form {
padding-top: 0px;
}
/* line 254, ../../sass/backend/custom.scss */
/* line 264, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .in-advanced-editing-table .card-sections,
.layout-ajax #edit-productfamily-form .in-advanced-editing-table .row-note {
display: none;
}

/* ORDER */
/* line 236, ../../sass/backend/custom.scss */
/* line 274, ../../sass/backend/custom.scss */
.table-order-summary {
width: 100%;
}

/* line 239, ../../sass/backend/custom.scss */
/* line 277, ../../sass/backend/custom.scss */
.order-product-item.redelivery {
background: rgba(18, 104, 253, 0.38) !important;
}
@@ -691,36 +714,36 @@ table th .select2-container--default .select2-selection--single {
/*.select2-container--bootstrap .select2-selection{max-width: none;}*/
/*.order-product-item{margin: 15px 0; padding: 0;}*/
/* Product */
/* line 244, ../../sass/backend/custom.scss */
/* line 282, ../../sass/backend/custom.scss */
.product-form-modal {
display: none;
}

/* line 245, ../../sass/backend/custom.scss */
/* line 283, ../../sass/backend/custom.scss */
.product-form.modal .form-check-label {
font-style: italic;
color: #666;
text-align: left;
}

/* line 246, ../../sass/backend/custom.scss */
/* line 284, ../../sass/backend/custom.scss */
.products-collection-table .inherited {
color: #888;
font-style: italic;
font-weight: initial;
}

/* line 247, ../../sass/backend/custom.scss */
/* line 285, ../../sass/backend/custom.scss */
.products-collection-table td {
position: relative;
}

/* line 248, ../../sass/backend/custom.scss */
/* line 286, ../../sass/backend/custom.scss */
.card-body.p-0 .products-collection-table tbody > tr > td:first-of-type, .card-body.p-0 .products-collection-table tbody > tr > th:first-of-type, .card-body.p-0 .products-collection-table thead > tr > td:first-of-type, .card-body.p-0 .products-collection-table thead > tr > th:first-of-type {
padding-left: 0.35rem;
}

/* line 249, ../../sass/backend/custom.scss */
/* line 287, ../../sass/backend/custom.scss */
.products-collection-table .btn-empty-field {
position: absolute;
right: 3px;
@@ -729,14 +752,14 @@ table th .select2-container--default .select2-selection--single {
padding: 0px;
}

/* line 250, ../../sass/backend/custom.scss */
/* line 288, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table {
table-layout: fixed;
/* background-clip: padding-box;*/
border-collapse: collapse;
}

/* line 251, ../../sass/backend/custom.scss */
/* line 289, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table th {
font-size: 13px;
border-left: 1px solid #dee2e6;
@@ -746,22 +769,22 @@ table th .select2-container--default .select2-selection--single {
position: relative;
}

/* line 252, ../../sass/backend/custom.scss */
/* line 290, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table tfoot th {
border-top: 2px solid #dee2e6;
}

/* line 253, ../../sass/backend/custom.scss */
/* line 291, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table th span {
white-space: initial;
}

/* line 254, ../../sass/backend/custom.scss */
/* line 292, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table th:last-child {
border-right: 1px solid #dee2e6;
}

/* line 255, ../../sass/backend/custom.scss */
/* line 293, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td {
border-left: 1px solid #dee2e6;
text-align: center;
@@ -769,26 +792,26 @@ table th .select2-container--default .select2-selection--single {
border-bottom: 1px solid #dee2e6;
}

/* line 256, ../../sass/backend/custom.scss */
/* line 294, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td:last-child {
border-right: 1px solid #dee2e6;
white-space: nowrap;
}

/* line 257, ../../sass/backend/custom.scss */
/* line 295, ../../sass/backend/custom.scss */
#lc-product-family-edit .btn-add-product {
margin: 20px 0;
float: right;
}

/* line 258, ../../sass/backend/custom.scss */
/* line 296, ../../sass/backend/custom.scss */
#lc-product-family-edit .inherited {
color: #888;
font-style: italic;
font-weight: initial;
}

/* line 259, ../../sass/backend/custom.scss */
/* line 297, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td .value {
min-width: 80%;
margin: auto;
@@ -796,79 +819,79 @@ table th .select2-container--default .select2-selection--single {
cursor: pointer;
}

/* line 260, ../../sass/backend/custom.scss */
/* line 298, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td .modal {
text-align: left;
}

/* line 261, ../../sass/backend/custom.scss */
/* line 299, ../../sass/backend/custom.scss */
table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax {
background: #eeeeee;
background-clip: padding-box;
text-decoration: underline;
}

/* line 263, ../../sass/backend/custom.scss */
/* line 301, ../../sass/backend/custom.scss */
table.products-collection-table tr.disabled {
opacity: 0.5;
}

/* line 264, ../../sass/backend/custom.scss */
/* line 302, ../../sass/backend/custom.scss */
.table-striped tbody .tr-sep {
border-top: 2px solid #888;
}

/* DeliveryZone */
/* line 268, ../../sass/backend/custom.scss */
/* line 306, ../../sass/backend/custom.scss */
#autocomplete-cities {
position: relative;
}

/* line 272, ../../sass/backend/custom.scss */
/* line 310, ../../sass/backend/custom.scss */
#autocomplete-cities .ui-autocomplete {
left: 30%;
top: 41px;
margin-left: 18px;
}

/* line 278, ../../sass/backend/custom.scss */
/* line 316, ../../sass/backend/custom.scss */
.head-reminders {
margin-top: 15px;
}

/* TABLEAU DE BORD */
/* line 281, ../../sass/backend/custom.scss */
/* line 319, ../../sass/backend/custom.scss */
.todo-list > li {
position: relative;
}

/* line 282, ../../sass/backend/custom.scss */
/* line 320, ../../sass/backend/custom.scss */
.todo-list > li .text {
margin-left: 30px;
}

/* line 283, ../../sass/backend/custom.scss */
/* line 321, ../../sass/backend/custom.scss */
.todo-list > li .tools {
position: absolute;
top: 4px;
right: 15px;
}

/* line 285, ../../sass/backend/custom.scss */
/* line 323, ../../sass/backend/custom.scss */
#addTicketMessageForm {
margin-top: 30px;
border-top: 2px dotted #eee;
padding-top: 30px;
}

/* line 287, ../../sass/backend/custom.scss */
/* line 325, ../../sass/backend/custom.scss */
#dashboard .list-btn-statistic {
display: flex;
flex-wrap: wrap;
justify-content: center;
}

/* line 288, ../../sass/backend/custom.scss */
/* line 326, ../../sass/backend/custom.scss */
#dashboard .btn-statistic {
width: 120px;
height: 70px;
@@ -877,62 +900,62 @@ table.products-collection-table tr.disabled {
line-height: 1rem;
}

/* line 289, ../../sass/backend/custom.scss */
/* line 327, ../../sass/backend/custom.scss */
#dashboard .btn-statistic small {
margin-bottom: 10px;
display: block;
}

/* line 290, ../../sass/backend/custom.scss */
/* line 328, ../../sass/backend/custom.scss */
#dashboard .btn-statistic .value {
display: block;
}

/* line 292, ../../sass/backend/custom.scss */
/* line 330, ../../sass/backend/custom.scss */
#dashboard #range_date_interval {
margin-bottom: 20px;
}

/* line 293, ../../sass/backend/custom.scss */
/* line 331, ../../sass/backend/custom.scss */
#dashboard #range_date_interval label {
float: left;
margin-right: 20px;
}

/* line 294, ../../sass/backend/custom.scss */
/* line 332, ../../sass/backend/custom.scss */
#dashboard #range_date_interval .form-check {
float: left;
margin-right: 10px;
}

/* line 295, ../../sass/backend/custom.scss */
/* line 333, ../../sass/backend/custom.scss */
#dashboard .table-condensed .btn, #dashboard .table-condensed .btn-sm {
white-space: nowrap;
}

/* Tickets */
/* line 301, ../../sass/backend/custom.scss */
/* line 339, ../../sass/backend/custom.scss */
#ticket-list .btn-sm {
display: block;
}

/* line 314, ../../sass/backend/custom.scss */
/* line 345, ../../sass/backend/custom.scss */
#toast-container {
width: 350px;
}

/* line 315, ../../sass/backend/custom.scss */
/* line 346, ../../sass/backend/custom.scss */
.toast {
float: right;
}

/* line 317, ../../sass/backend/custom.scss */
/* line 348, ../../sass/backend/custom.scss */
#toast-container:before:hover {
opacity: 1;
cursor: pointer;
}

/* line 321, ../../sass/backend/custom.scss */
/* line 352, ../../sass/backend/custom.scss */
#toast-close-all {
border: 0;
position: absolute;

+ 6
- 3
ShopBundle/Resources/public/sass/backend/custom.scss View File

@@ -57,10 +57,13 @@ body#pdl-body .wrapper .content-wrapper{margin-top: 0; padding-top: 57px;}
.dataTables_length, .dataTables_filter{padding: .75rem 1.25rem 0.25rem;}

table.fixedHeader-floating{margin-top: 0px !important;}
table th.sorting_asc, table th.sorting_desc{border-top:3px solid var(--success);}
.card-body table.lc-table-list th.sorted, table th.sorting_asc, table th.sorting_desc{border-top:2px solid var(--success);}
table th.sorting_asc, table th.sorting_desc{border-top:2px solid var(--success);}
.card-body table.lc-table-list th.filtered{border-top:2px solid var(--primary);}
/*.card-body table.lc-table-list th{border-top:3px solid var(--success);}*/
table th.filtered{border-top:3px solid var(--primary);}
table 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%);}


.lc-table-list thead a{color: #212529}

+ 11
- 3
ShopBundle/Resources/views/backend/default/list.html.twig View File

@@ -216,8 +216,13 @@
{% set nextSortDirection = isSortingField ? (app.request.get('sortDirection') == 'DESC' ? 'ASC' : 'DESC') : 'DESC' %}
{% set _column_label = metadata.label|trans(_trans_parameters) %}
{% set _column_icon = isSortingField ? (nextSortDirection == 'DESC' ? 'fa-arrow-up' : 'fa-arrow-down') : 'fa-sort' %}
{% set isFilteredField = false %}
{% if filters_form[field] is defined and filters_form[field].vars.value is not empty %} {% set isFilteredField = false %}
{% set isFilteredField = true %}
{% endif %}


<th class="{{ isSortingField ? 'sorted' }} {{ metadata.virtual ? 'virtual' }} {{ metadata.dataType|lower }} {{ metadata.css_class }}" {{ easyadmin_config('design.rtl') ? 'dir="rtl"' }}>
<th class="{{ isSortingField ? 'sorted' }} {{ isFilteredField ? 'filtered': '' }} {{ metadata.virtual ? 'virtual' }} {{ metadata.dataType|lower }} {{ metadata.css_class }}" {{ easyadmin_config('design.rtl') ? 'dir="rtl"' }}>
{% if metadata.sortable %}
<a href="{{ path('easyadmin', _request_parameters|merge({ page: 1, sortField: metadata.property, sortDirection: nextSortDirection })) }}">
{{ _column_label|raw }} <i class="fa fa-fw {{ _column_icon }}"></i>
@@ -236,6 +241,7 @@
</tr>
{% endblock table_head %}
{% block table_filters %}
{% set fieldAreNotEmpty = false %}
{% if filters_form is defined %}
<tr class="table-filters-line">
{% if _has_batch_actions %}
@@ -244,6 +250,8 @@
<th>

{% if filters_form[field] is defined %}

{% if filters_form[field].vars.value is not null and filters_form[field].vars.value is not empty %}{% set fieldAreNotEmpty = true %}{% endif %}
{% if metadata['dataType'] == 'datetime' or metadata['dataType'] == 'date' %}
<div class="input-group input-group-sm">
<input type="text"
@@ -281,8 +289,8 @@
aria-label="{{ "action.apply"|trans({}, 'lcshop') }}">
<i class="fa fa-search"></i>
</button>
{% if filters_form.vars.submitted %}
<a href="{{ path('easyadmin', {action: app.request.get('action'), entity: _entity_config.name}) }}"
{% if filters_form.vars.submitted or fieldAreNotEmpty %}
<a href="{{ path('easyadmin', _request_parameters|merge({ 'filterClear' : 'clearAll', list_filter : null, referer : null })) }}"
class="btn btn-sm btn-warning lc-reset-filters"
data-toggle="tooltip"
title="{{ "action.reset"|trans({}, 'lcshop') }}"

Loading…
Cancel
Save