|
- {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
- {% use '@EasyAdmin/crud/form_theme.html.twig' %}
-
-
- {% block gallery_manager_row %}
- {{ block('collection_row') }}
- {% endblock gallery_manager_row %}
-
- {% block gallery_manager_widget %}
- {{ block('collection_widget') }}
- {% endblock gallery_manager_widget %}
-
-
- {% block collection_row %}
- {% if prototype is defined and not prototype.rendered %}
- {% set row_attr = row_attr|merge({ 'data-prototype': form_row(prototype) }) %}
- {% endif %}
-
- {% set row_attr = row_attr|merge({
- 'data-entry-is-complex': form.vars.ea_crud_form.ea_field and form.vars.ea_crud_form.ea_field.customOptions.get('entryIsComplex') ? 'true' : 'false',
- 'data-allow-add': allow_add ? 'true' : 'false',
- 'data-allow-delete': allow_delete ? 'true' : 'false',
- 'data-num-items': form.children|length,
- 'data-form-type-name-placeholder': prototype is defined ? prototype.vars.name : '',
- }) %}
-
- {{ block('form_row') }}
- {% endblock collection_row %}
-
- {% block collection_widget %}
- {{ block('form_widget') }}
- {% if allow_add|default(false) %}
- <button type="button" class="btn btn-link field-collection-add">
- <i class="fa fa-plus pr-1"></i>
- {{ 'action.add_new_item'|trans({}, 'EasyAdminBundle') }}
- </button>
- {% endif %}
- {% endblock collection_widget %}
-
- {% block collection_entry_widget %}
- {% 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 %}
- </div>
- {% endblock collection_entry_widget %}
-
- {% block file_manager_image_row %}
- {{ form_widget(form) }}
- {% endblock file_manager_image_row %}
-
- {% block file_manager_legend_row %}
- {{ form_widget(form) }}
- {% endblock file_manager_legend_row %}
-
- {% block file_manager_position_row %}
- {{ form_widget(form) }}
- {% endblock file_manager_position_row %}
-
-
- {% block file_manager_widget %}
-
- <div class="lc-filemanager col-xs-12">
- <div class="col-md-6 col-xs-12 nopadding" style="padding: 0px;">
- <img style="width: 200px; height: 150px; object-fit: contain; background: #ddd; " src="{{ form.path.vars.value }}" class="lc-filemenager-preview" id="{{ form.path.vars.id }}_preview" alt="">
- </div>
- <div class="input-group">
- {{ form_widget(form) }}
-
- <div class="input-group-append">
- <button type="button" class="btn btn-sm lc-filemanager-open" data-id="{{ form.path.vars.id }}"
- data-target="{{ path('file_manager', {module:1, conf:'default'})|raw }}">
- <i class="fa fa-folder-open-o"></i>
- </button>
- {% if value %}
- <button type="button" class="btn btn-sm lc-filemanager-delete" data-id="{{ form.path.vars.id }}">
- <i class="fa fa-trash-o"></i>
- </button>
- {% endif %}
-
- {% if form.parent.vars['row_attr']['data-sortable'] is defined %}
- <button type="button" class="btn btn-sm lc-btn-sortable" >
- <i class="fa fa-arrows"></i>
- </button>
- {% endif %}
- </div>
- </div>
-
- </div>
-
-
- {% endblock file_manager_widget %}
|