Parcourir la source

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

feature/ticket
Guillaume il y a 3 ans
Parent
révision
24f8423fb8
6 fichiers modifiés avec 50 ajouts et 29 suppressions
  1. +1
    -1
      Field/FileManagerField.php
  2. +1
    -1
      Field/GalleryManagerField.php
  3. +0
    -1
      Field/ImageManagerField.php
  4. +23
    -0
      Resources/assets/app/adminlte/form/form.scss
  5. +25
    -25
      Resources/views/adminlte/crud/form_theme.html.twig
  6. +0
    -1
      Resources/views/adminlte/crud/index.html.twig

+ 1
- 1
Field/FileManagerField.php Voir le fichier

@@ -4,7 +4,7 @@ namespace Lc\SovBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
use Lc\SovBundle\Form\Type\Crud\FileManagerType;
use Lc\SovBundle\Form\Common\FileManagerType;
use Symfony\Component\Form\Extension\Core\Type\TextType;

/**

+ 1
- 1
Field/GalleryManagerField.php Voir le fichier

@@ -4,7 +4,7 @@ namespace Lc\SovBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
use Lc\SovBundle\Form\Type\Crud\FileManagerType;
use Lc\SovBundle\Form\Common\FileManagerType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;



+ 0
- 1
Field/ImageManagerField.php Voir le fichier

@@ -6,7 +6,6 @@ use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
use Lc\SovBundle\Form\Common\FileManagerType;


/**
* @author La clic ! <contact@laclic.fr>
*/

+ 23
- 0
Resources/assets/app/adminlte/form/form.scss Voir le fichier

@@ -42,4 +42,27 @@
z-index: 2;
}

.field-collection {
padding-top: 15px;

legend {
font-weight: bold;
font-size: 18px;
}

.field-collection-item {
background-color: gainsboro;
padding: 10px;
position: relative;
border-radius: 5px;

.field-collection-delete {
position: absolute;
right: 0px;
top: 0px;
}
}
}




+ 25
- 25
Resources/views/adminlte/crud/form_theme.html.twig Voir le fichier

@@ -122,14 +122,13 @@
{% set is_complex = form_parent(form).vars.ea_crud_form.ea_field.customOptions.get('entryIsComplex') ?? false %}

<div class="field-collection-item {{ is_complex ? 'field-collection-item-complex' }}">
{{ form_widget(form) }}

{% if form_parent(form).vars.allow_delete|default(false) %}
<button type="button" class="btn btn-link field-collection-delete"
title="{{ 'action.remove_item'|trans({}, 'EasyAdminBundle') }}">
<i class="fas fa-times"></i>
</button>
{% endif %}
{{ form_widget(form) }}
</div>
{% endblock collection_entry_widget %}

@@ -155,15 +154,16 @@
{% set type = form.vars.attr.type %}
{% endif %}

<div class="lc-filemanager row">
<div class="lc-filemanager row">
{% if type == 'image' %}
<div class="col-md-3 col-xs-12 form-group">
<div class="lc-filemenager-preview card">
<div class="no-image">
<i class="fa fa-image"></i>
<div class="lc-filemenager-preview card">
<div class="no-image">
<i class="fa fa-image"></i>
</div>
<img src="{{ form.path.vars.value }}" id="{{ form.path.vars.id }}_preview" alt=""
class="card-img-top">
</div>
<img src="{{ form.path.vars.value }}" id="{{ form.path.vars.id }}_preview" alt="" class="card-img-top">
</div>
</div>
{% else %}
<div class="callout callout-success">
@@ -200,11 +200,11 @@
{{ form_rest(form) }}
</div>
</div>
</div>
</div>
{% endblock file_manager_widget %}

{% block checkbox_radio_label -%}
{#- Do not display the label if widget is not defined in order to prevent double label rendering -#}
{#- Do not display the label if widget is not defined in order to prevent double label rendering -#}
{%- if widget is defined -%}
{% set is_parent_custom = parent_label_class is defined and ('checkbox-custom' in parent_label_class or 'radio-custom' in parent_label_class or 'switch-custom' in parent_label_class) %}
{% set is_custom = label_attr.class is defined and ('checkbox-custom' in label_attr.class or 'radio-custom' in label_attr.class or 'switch-custom' in label_attr.class) %}
@@ -254,7 +254,6 @@
{{ parent() }}

{% if ea_crud_form.form_panels is defined %}

<div class="card card-outline">
<div class="card-header p-0 border-bottom-0">
<ul id="nav-params" class="nav nav-pills" role="navigation">
@@ -291,30 +290,32 @@

<div class="card {{ panel_config.css_class ?? '' }}">
<div class="card-status-top bg-primary"></div>
<div class="card-header ">
{% if panel_has_header %}
{% if panel_has_header %}
<div class="card-header ">
{# <div class="content-panel-header {{ collapsible ? 'collapsible' }} {{ panel_config.help|default(false) is not empty ? 'with-help' }}"> #}
{% if collapsible %}
<a href="#content-{{ panel_name }}" data-toggle="collapse" class="content-panel-collapse {{ collapsed ? 'collapsed' }}" aria-expanded="{{ collapsed ? 'false' : 'true' }}" aria-controls="content-{{ panel_name }}">
<a href="#content-{{ panel_name }}" data-toggle="collapse"
class="content-panel-collapse {{ collapsed ? 'collapsed' }}"
aria-expanded="{{ collapsed ? 'false' : 'true' }}"
aria-controls="content-{{ panel_name }}">
<i class="fas fw fa-chevron-right collapse-icon"></i>
{% endif %}
{% endif %}

{% if panel_config.icon|default(false) %}
<i class="{{ panel_config.icon }}"></i>
{% endif %}
{% if panel_config.icon|default(false) %}
<i class="{{ panel_config.icon }}"></i>
{% endif %}

{{ panel_config.label|lc_trans_admin_panel(ea.getEntity().getFqcn()) }}
{{ panel_config.label|lc_trans_admin_panel(ea.getEntity().getFqcn()) }}

{% if collapsible %}
</a>
{% if collapsible %}
</a>
{% endif %}

{% if panel_config.help|default(false) %}
<div class="content-panel-header-help">{{ panel_config.help|raw }}</div>
{% endif %}

{% endif %}
</div>
</div>
{% endif %}
<div class="card-body {{ collapsible ? 'collapse' }} {{ not collapsed ? 'show' }}">
{% for field in form|filter(field => 'hidden' not in field.vars.block_prefixes and field.vars.ea_crud_form.form_panel == panel_name) %}
{% if not field.vars.ea_crud_form.form_tab or field.vars.ea_crud_form.form_tab == tab_name %}
@@ -329,7 +330,6 @@
{% else %}
<div class="card">
<div class="card-status-top bg-primary"></div>
<div class="card-header "></div>
<div class="card-body">

{% for field in form|filter(field => 'hidden' not in field.vars.block_prefixes and (not field.vars.ea_crud_form.form_tab or field.vars.ea_crud_form.form_tab == tab_name)) %}

+ 0
- 1
Resources/views/adminlte/crud/index.html.twig Voir le fichier

@@ -63,7 +63,6 @@
<table class="table table-bordered table-hover table-striped">
<thead>
{% block table_head %}

<tr>
{% if has_batch_actions %}
<th class="">

Chargement…
Annuler
Enregistrer