Browse Source

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

develop
Guillaume 3 years ago
parent
commit
30a0a97886
7 changed files with 54 additions and 56 deletions
  1. +0
    -6
      Controller/Reminder/ReminderAdminController.php
  2. +0
    -1
      Controller/User/UserAdminController.php
  3. +0
    -1
      Form/Setting/SiteSettingsFormType.php
  4. +0
    -4
      Model/Site/PageModel.php
  5. +2
    -2
      Model/Site/SiteModel.php
  6. +4
    -0
      Resources/assets/app/adminlte/index/index.scss
  7. +48
    -42
      Resources/views/adminlte/crud/form_theme.html.twig

+ 0
- 6
Controller/Reminder/ReminderAdminController.php View File

namespace Lc\SovBundle\Controller\Reminder; namespace Lc\SovBundle\Controller\Reminder;


use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Lc\CaracoleBundle\Resolver\MerchantResolver;
use Lc\CaracoleBundle\Resolver\SectionResolver;
use Lc\SovBundle\Factory\Reminder\ReminderFactoryInterface; use Lc\SovBundle\Factory\Reminder\ReminderFactoryInterface;
use Lc\SovBundle\Form\Reminder\ReminderAdminFormType; use Lc\SovBundle\Form\Reminder\ReminderAdminFormType;
use Lc\SovBundle\Repository\Reminder\ReminderRepositoryQueryInterface; use Lc\SovBundle\Repository\Reminder\ReminderRepositoryQueryInterface;
ReminderRepositoryQueryInterface $reminderRepositoryQuery, ReminderRepositoryQueryInterface $reminderRepositoryQuery,
FormFactoryInterface $formFactory, FormFactoryInterface $formFactory,
UrlGeneratorInterface $urlGenerator, UrlGeneratorInterface $urlGenerator,
MerchantResolver $merchantResolver,
SectionResolver $sectionResolver,
ParameterBagInterface $parameterBag ParameterBagInterface $parameterBag
) { ) {
$this->entityManager = $entityManager; $this->entityManager = $entityManager;
$this->reminderRepositoryQuery = $reminderRepositoryQuery; $this->reminderRepositoryQuery = $reminderRepositoryQuery;
$this->formFactory = $formFactory; $this->formFactory = $formFactory;
$this->urlGenerator = $urlGenerator; $this->urlGenerator = $urlGenerator;
$this->merchantResolver = $merchantResolver;
$this->sectionResolver = $sectionResolver;
$this->parameterBag = $parameterBag; $this->parameterBag = $parameterBag;
} }



+ 0
- 1
Controller/User/UserAdminController.php View File

TranslatorAdmin $translatorAdmin, TranslatorAdmin $translatorAdmin,
RolesDefinitionInterface $rolesDefinition RolesDefinitionInterface $rolesDefinition
) { ) {
parent::__construct($session, $request, $em, $translatorAdmin);
$this->rolesDefinition = $rolesDefinition; $this->rolesDefinition = $rolesDefinition;
} }



+ 0
- 1
Form/Setting/SiteSettingsFormType.php View File

namespace Lc\SovBundle\Form\Setting; namespace Lc\SovBundle\Form\Setting;


use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use Lc\SovBundle\Model\Site\SiteInterface; use Lc\SovBundle\Model\Site\SiteInterface;
use Lc\SovBundle\Translation\TranslatorAdmin; use Lc\SovBundle\Translation\TranslatorAdmin;
use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Bridge\Doctrine\Form\Type\EntityType;

+ 0
- 4
Model/Site/PageModel.php View File

namespace Lc\SovBundle\Model\Site; namespace Lc\SovBundle\Model\Site;


use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface;
use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface;
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use Lc\CaracoleBundle\Model\Section\SectionInterface;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity; use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;


/** /**

+ 2
- 2
Model/Site/SiteModel.php View File

use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Model\Setting\EntitySettingTrait;
//use Lc\CaracoleBundle\Model\Setting\EntitySettingTrait;
use Lc\SovBundle\Model\Setting\SiteSettingInterface; use Lc\SovBundle\Model\Setting\SiteSettingInterface;
use Lc\SovBundle\Doctrine\EntityInterface; use Lc\SovBundle\Doctrine\EntityInterface;
use Lc\SovBundle\Doctrine\Extension\DevAliasInterface; use Lc\SovBundle\Doctrine\Extension\DevAliasInterface;


abstract class SiteModel implements SiteInterface, EntityInterface, DevAliasInterface abstract class SiteModel implements SiteInterface, EntityInterface, DevAliasInterface
{ {
use EntitySettingTrait;
// use EntitySettingTrait;
use DevAliasTrait; use DevAliasTrait;


/** /**

+ 4
- 0
Resources/assets/app/adminlte/index/index.scss View File



.table td, .table th { .table td, .table th {
padding: 0.35rem; padding: 0.35rem;
}

.table th input {
width: 100%;
} }

+ 48
- 42
Resources/views/adminlte/crud/form_theme.html.twig View File

{% set managerDir = form.vars.ea_crud_form.ea_field.customOptions.get('managerDir') %} {% set managerDir = form.vars.ea_crud_form.ea_field.customOptions.get('managerDir') %}
{% set type = form.vars.ea_crud_form.ea_field.customOptions.get('type') %} {% set type = form.vars.ea_crud_form.ea_field.customOptions.get('type') %}
{% else %} {% else %}
{% set managerDir = form.vars.attr.type %}
{% set type = form.vars.attr.type %}
{% if form.vars.attr.type is defined %}
{% set managerDir = form.vars.attr.type %}
{% set type = form.vars.attr.type %}
{% endif %}
{% endif %} {% endif %}


<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>
{% if type is defined %}
<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>
<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 %}
<div class="callout callout-success">
<h5><i class="fa fa-file-alt"></i>
<span id="{{ form.path.vars.id }}_preview_text">{{ form.path.vars.value }}</span>
</h5>
</div>
{% endif %}
{% else %}
<div class="callout callout-success">
<h5><i class="fa fa-file-alt"></i>
<span id="{{ form.path.vars.id }}_preview_text">{{ form.path.vars.value }}</span>
</h5>
</div>
{% endif %}


<div class="col-12">
<div class="input-group">
<div class="input-group-prepend">
{% if form.parent.vars['row_attr']['data-sortable'] is defined %}
<button type="button" class="btn btn-success lc-btn-sortable" data-toggle="tooltip"
title="Trier les images">
<i class="fa fa-arrows-alt"></i>
<div class="col-12">
{# {{ dump(form.vars) }}#}
{# {{ dump(form.vars.ea_crud_form.ea_field) }}#}
<div class="input-group">
<div class="input-group-prepend">
{% if form.parent.vars['row_attr']['data-sortable'] is defined %}
<button type="button" class="btn btn-success lc-btn-sortable" data-toggle="tooltip"
title="Trier les images">
<i class="fa fa-arrows-alt"></i>
</button>
{% endif %}
<button type="button" class="btn btn-primary lc-filemanager-open" data-id="{{ form.path.vars.id }}"
data-toggle="tooltip" title="Sélectionner un fichier"
data-target="{{ path('file_manager', {module:1, conf: managerDir})|raw }}">
<i class="fa fa-folder-open"></i>
</button> </button>
{% endif %}
<button type="button" class="btn btn-primary lc-filemanager-open" data-id="{{ form.path.vars.id }}"
data-toggle="tooltip" title="Sélectionner un fichier"
data-target="{{ path('file_manager', {module:1, conf: managerDir})|raw }}">
<i class="fa fa-folder-open"></i>
</button>
</div>
{{ form_widget(form.legend) }}
<div class="input-group-append">
<button type="button" class="btn btn-danger lc-filemanager-delete" data-toggle="tooltip"
title="Supprimer l'image"
data-id="{{ form.path.vars.id }}">
<i class="fa fa-trash"></i>
</button>
</div>
</div>
{{ form_widget(form.legend) }}
<div class="input-group-append">
<button type="button" class="btn btn-danger lc-filemanager-delete" data-toggle="tooltip"
title="Supprimer l'image"
data-id="{{ form.path.vars.id }}">
<i class="fa fa-trash"></i>
</button>
</div>


{{ form_rest(form) }}
{{ form_rest(form) }}
</div>
</div> </div>
</div> </div>
</div>
{% endif %}
{% endblock file_manager_widget %} {% endblock file_manager_widget %}


{% block checkbox_radio_label -%} {% block checkbox_radio_label -%}

Loading…
Cancel
Save