浏览代码

Gestion config artgris

tags/0.1
Fab 3 年前
父节点
当前提交
3a35951595
共有 2 个文件被更改,包括 9 次插入2 次删除
  1. +2
    -0
      Field/GalleryManagerField.php
  2. +7
    -2
      Resources/views/adminlte/crud/form_theme.html.twig

+ 2
- 0
Field/GalleryManagerField.php 查看文件

@@ -34,6 +34,8 @@ class GalleryManagerField implements FieldInterface
->setFormTypeOption('entry_type', FileManagerType::class)
->setFormTypeOption('attr', array('class'=> 'field-collection-group'))
->setFormTypeOption('row_attr', array('data-sortable'=> true))
->setCustomOption('managerDir', 'image')
->setCustomOption('type', 'image')
->hideOnIndex();

//->setEntryType(FileManagerType::class);

+ 7
- 2
Resources/views/adminlte/crud/form_theme.html.twig 查看文件

@@ -147,8 +147,13 @@


{% block file_manager_widget %}
{% set managerDir = form.vars.ea_crud_form.ea_field.customOptions.get('managerDir') %}
{% set type = form.vars.ea_crud_form.ea_field.customOptions.get('type') %}
{% if form.vars.ea_crud_form.ea_field is not null %}
{% set managerDir = form.vars.ea_crud_form.ea_field.customOptions.get('managerDir') %}
{% set type = form.vars.ea_crud_form.ea_field.customOptions.get('type') %}
{% else %}
{% set managerDir = form.parent.vars.ea_crud_form.ea_field.customOptions.get('managerDir') %}
{% set type = form.parent.vars.ea_crud_form.ea_field.customOptions.get('type') %}
{% endif %}

<div class="lc-filemanager row">
{% if type == 'image' %}

正在加载...
取消
保存