use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | ||||
use Lc\SovBundle\Controller\AbstractAdminController; | use Lc\SovBundle\Controller\AbstractAdminController; | ||||
use Lc\SovBundle\Factory\Newsletter\NewsletterFactory; | use Lc\SovBundle\Factory\Newsletter\NewsletterFactory; | ||||
use Lc\SovBundle\Field\ToggleField; | |||||
use Lc\SovBundle\Field\BooleanField; | |||||
use Lc\SovBundle\Field\CKEditorField; | use Lc\SovBundle\Field\CKEditorField; | ||||
use Lc\SovBundle\Field\StatusField; | use Lc\SovBundle\Field\StatusField; | ||||
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 Symfony\Component\Form\Extension\Core\Type\CheckboxType; | |||||
use Symfony\Component\Form\Extension\Core\Type\TextType; | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||||
/** | /** | ||||
->setProperty($propertyName) | ->setProperty($propertyName) | ||||
->setLabel($label) | ->setLabel($label) | ||||
->setTemplatePath('@LcSov/adminlte/crud/field/boolean.html.twig') | ->setTemplatePath('@LcSov/adminlte/crud/field/boolean.html.twig') | ||||
->setFormType(TextType::class); | |||||
->setFormType(CheckboxType::class); | |||||
} | } | ||||
} | } |
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\FileManagerType; | |||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | ||||
use Symfony\Component\Form\Extension\Core\Type\TextType; | |||||
/** | /** | ||||
* @author La clic ! <contact@laclic.fr> | * @author La clic ! <contact@laclic.fr> | ||||
if (!$templateToggle) { | if (!$templateToggle) { | ||||
$template = 'status.html.twig'; | $template = 'status.html.twig'; | ||||
} | } | ||||
$field->setTemplatePath('@LcSov/adminlte/crud/field/' . $template); | $field->setTemplatePath('@LcSov/adminlte/crud/field/' . $template); | ||||
return $field; | return $field; |
ul.navbar-nav { | ul.navbar-nav { | ||||
li.nav-item-user-menu { | li.nav-item-user-menu { | ||||
.dropdown-menu { | .dropdown-menu { | ||||
position: absolute ; | |||||
z-index: 1000 ; | |||||
position: absolute; | |||||
z-index: 1000; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | |||||
.main-sidebar p { | |||||
font-size: 0.8rem; | |||||
} | |||||
.nav-link { | |||||
padding: 0.5rem 0.5rem; | |||||
} | |||||
.nav-treeview .nav-link { | |||||
padding: 0.2rem 0.5rem 0.2rem 1.2rem; | |||||
} | } |
{% if field.value == 1 %} | {% if field.value == 1 %} | ||||
<div class="badge badge-success">En ligne</div> | <div class="badge badge-success">En ligne</div> | ||||
{% else %} | {% else %} |
{% set item = entity.instance %} | {% set item = entity.instance %} | ||||
{% set property_name = field.getProperty() %} | {% set property_name = field.getProperty() %} | ||||
{% set id_toggle = 'toogle-'~item.id~'-'~property_name %} | |||||
{% set id_toggle = 'toggle-'~item.id~'-'~property_name %} | |||||
<div class="custom-control custom-switch custom-switch-on-success custom-switch-off-default" | <div class="custom-control custom-switch custom-switch-on-success custom-switch-off-default" | ||||
data-url="{{ ea_url({crudAction: 'edit', entityId: item.id, fieldName: property_name }) }}"> | data-url="{{ ea_url({crudAction: 'edit', entityId: item.id, fieldName: property_name }) }}"> |