Browse Source

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

feature/ticket
Guillaume 3 years ago
parent
commit
24f8423fb8
6 changed files with 50 additions and 29 deletions
  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 View File



use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait; 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; use Symfony\Component\Form\Extension\Core\Type\TextType;


/** /**

+ 1
- 1
Field/GalleryManagerField.php View File



use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait; 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; use Symfony\Component\Form\Extension\Core\Type\CollectionType;





+ 0
- 1
Field/ImageManagerField.php View File

use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait; use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
use Lc\SovBundle\Form\Common\FileManagerType; use Lc\SovBundle\Form\Common\FileManagerType;



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

+ 23
- 0
Resources/assets/app/adminlte/form/form.scss View File

z-index: 2; 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 View File

{% set is_complex = form_parent(form).vars.ea_crud_form.ea_field.customOptions.get('entryIsComplex') ?? false %} {% 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' }}"> <div class="field-collection-item {{ is_complex ? 'field-collection-item-complex' }}">
{{ form_widget(form) }}

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


{% set type = form.vars.attr.type %} {% set type = form.vars.attr.type %}
{% endif %} {% endif %}


<div class="lc-filemanager row">
<div class="lc-filemanager row">
{% if type == 'image' %} {% if type == 'image' %}
<div class="col-md-3 col-xs-12 form-group"> <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> </div>
<img src="{{ form.path.vars.value }}" id="{{ form.path.vars.id }}_preview" alt="" class="card-img-top">
</div>
</div> </div>
{% else %} {% else %}
<div class="callout callout-success"> <div class="callout callout-success">
{{ form_rest(form) }} {{ form_rest(form) }}
</div> </div>
</div> </div>
</div>
</div>
{% endblock file_manager_widget %} {% endblock file_manager_widget %}


{% block checkbox_radio_label -%} {% 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 -%} {%- 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_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) %} {% 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) %}
{{ parent() }} {{ parent() }}


{% if ea_crud_form.form_panels is defined %} {% if ea_crud_form.form_panels is defined %}

<div class="card card-outline"> <div class="card card-outline">
<div class="card-header p-0 border-bottom-0"> <div class="card-header p-0 border-bottom-0">
<ul id="nav-params" class="nav nav-pills" role="navigation"> <ul id="nav-params" class="nav nav-pills" role="navigation">


<div class="card {{ panel_config.css_class ?? '' }}"> <div class="card {{ panel_config.css_class ?? '' }}">
<div class="card-status-top bg-primary"></div> <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' }}"> #} {# <div class="content-panel-header {{ collapsible ? 'collapsible' }} {{ panel_config.help|default(false) is not empty ? 'with-help' }}"> #}
{% if collapsible %} {% 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> <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 %} {% endif %}


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

{% endif %}
</div>
</div>
{% endif %}
<div class="card-body {{ collapsible ? 'collapse' }} {{ not collapsed ? 'show' }}"> <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) %} {% 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 %} {% if not field.vars.ea_crud_form.form_tab or field.vars.ea_crud_form.form_tab == tab_name %}
{% else %} {% else %}
<div class="card"> <div class="card">
<div class="card-status-top bg-primary"></div> <div class="card-status-top bg-primary"></div>
<div class="card-header "></div>
<div class="card-body"> <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)) %} {% 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 View File

<table class="table table-bordered table-hover table-striped"> <table class="table table-bordered table-hover table-striped">
<thead> <thead>
{% block table_head %} {% block table_head %}

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

Loading…
Cancel
Save