{% extends "admin/base.html.twig" %} {% trans_default_domain 'admin' %} {% import 'core/src-macro.html.twig' as resources %} {% set transDomain = interface.name is defined and interface.name ? 'entity_' ~ interface.name : NULL %} {% set title = 'plural'|trans([], transDomain) and 'plural'|trans([], transDomain) != 'plural' ? 'plural'|trans([], transDomain) : 'Index'|trans ~ " " ~ interface.name %} {% if pageTitle %} {% set title = pageTitle %} {% endif %} {% block title %}{{ title }}{% endblock %} {% block pageTitle %}{{ title }}{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %} {% block body %} {% set haveExport = interface.configuration.exports is defined and interface.configuration.exports %} {% set orderBy = interface.configuration.orderBy is defined ? interface.configuration.orderBy : 'id' %} {% set infosFields = ['startDate', 'endDate', 'publishedAt', 'publicationStart', 'publicationEnd', 'createdBy', 'createdAt', 'updatedBy', 'updatedAt', 'lastLogin', 'infos', 'locale'] %} {% set haveInfos = false %} {% for column in columns %} {% if column in infosFields %} {% set haveInfos = true %} {% endif %} {% endfor %} {% set labels = interface.labels is defined ? interface.labels : [] %} {% set entityBase = interface.entity is defined and interface.entity ? interface.entity : null %} {% set entityArray = entityBase|objectToArray %} {% set args = {'website': websiteId()} %} {% if interface.masterField is defined and interface.masterField != 'configuration' and interface.masterField != 'website' %} {% set args = args|merge({(interface.masterField): interface.masterFieldId}) %} {% endif %} {% set haveParentMasterField = interface.parentMasterField is defined and interface.parentMasterField and interface.parentMasterFieldId is defined and interface.parentMasterFieldId %} {% if haveParentMasterField %} {% set args = args|merge({(interface.parentMasterField): interface.parentMasterFieldId}) %} {% endif %} {% if interface.configuration.uniqueLocale is defined and interface.configuration.uniqueLocale %} {% set args = args|merge({"entitylocale": interface.website.configuration.locale}) %} {% endif %}
{% if searchFiltersForm is defined and searchFiltersForm %} {% include 'admin/core/form/filters.html.twig' with {'form': searchFiltersForm} %} {% endif %} {% if searchForm %} {% include 'admin/core/form/index-search-form.html.twig' with {'form': searchForm} %} {% endif %}
{% if 'delete'|moduleActive(allModules) and routeExist('admin_' ~ interface['name'] ~ '_delete') %} {% endif %} {% if haveExport in interface.configuration.exports and routeExist('admin_' ~ interface['name'] ~ '_export') and 'edit'|moduleActive(allModules) %} {{ render_esi(controller(namespace ~ "::export", args)) }} {% endif %} {% if routeExist('admin_' ~ interface['name'] ~ '_new') and not disableFormNew %} {# Go#} {{ render_esi(controller(namespace ~ "::new", args)) }} {% endif %}
{% include 'admin/include/stripe-preloader.html.twig' with {'preloaderId': 'index-preloader'} only %} {% if 'media' in columns %} {% endif %} {% for column in columns %} {% if entityArray[column] is defined and column not in infosFields %} {% set fieldValue = attribute(interface.entity, column) %} {% set columnTitle = column|trans([], transDomain) and column|trans([], transDomain) != 'plural' ? column|trans([], transDomain) : column %} {{ columnTitle }} {% endif %} {% endfor %} {% if haveInfos %} {% endif %} {% if routeExist('admin_' ~ interface['name'] ~ '_position') and 'edit'|moduleActive(allModules) %} {% endif %} {% set disabledButtons = interface.disabledButtons is defined and haveParentMasterField %} {% if interface.buttons is defined and interface.buttons and not disabledButtons %} {% endif %} {% if interface.count is defined and interface.count %} {% set columnTitle = interface.count|trans([], transDomain) ? interface.count|trans([], transDomain) : interface.count %} {% endif %} {% for entity in pagination %} {% set disabledRow = not entity|indexAllowed(is_granted('ROLE_INTERNAL')) %} {% set args = args|merge({(interface['name']): entity.id}) %} {% if not disabledRow %} {% if 'media' in columns and entity.mediaRelations is defined %} {% endif %} {% for property in columns %} {% if entityArray[property] is defined and property not in infosFields %} {% set haveProperty = entityArray[property] is defined %} {% set fieldValue = haveProperty ? attribute(entity, property) : null %} {% endif %} {% endfor %} {% if haveInfos %} {% endif %} {% if routeExist('admin_' ~ interface['name'] ~ '_position') and 'edit'|moduleActive(allModules) %} {% endif %} {% if interface.buttons is defined and interface.buttons and not disabledButtons %} {% endif %} {% if interface.count is defined and interface.count %} {% endif %} {% endif %} {% else %} {% endfor %}
{{ "Infos"|trans }}{{ "Position"|trans }}{{ columnTitle }}
{{ "Actions"|trans }}
{% set orderBy = entity|methodInit(orderBy) %} {% if attribute(entity, orderBy) %} {% set orderValue = attribute(entity, orderBy) %} {% include 'core/data-formater.html.twig' with {'dataValue': orderValue, 'property': orderBy, 'view': 'index'} %} {% endif %} {% set filePath = entity|mainMedia|thumb(null, {'path': true, 'placeholder': true}) %} {{ imgRender({'src': asset(filePath), 'width': 30, 'height': 30}) }} {% if fieldValue|isBool and 'edit'|moduleActive(allModules) %} {% include 'admin/core/form/boolean-switcher.html.twig' %} {% elseif fieldValue or fieldValue == false %} {% include 'core/data-formater.html.twig' with {'dataValue': fieldValue, 'property': property, 'view': 'index', 'truncate': 50} %} {% endif %} {% if ('admin/core/include/informations/' ~ interface.name ~ '.html.twig')|fileExist %} {% include 'admin/core/include/informations/' ~ interface.name ~ '.html.twig' %} {% else %} {% include 'admin/core/include/informations/general.html.twig' %} {% endif %} {{ render_esi(controller(namespace ~ "::position", args)) }} {% for route in interface.buttons %} {% if route|routeExist %} {% set label = labels[route] is defined ? labels[route] : route %} {{ label }} {% endif %} {% endfor %} {{ attribute(entity, interface.count)|length }} {% if entity.urls is defined %} {% include 'admin/core/include/urls-status.html.twig' with {"allLocales": allLocales} %} {% endif %} {% if routeExist('admin_' ~ interface['name'] ~ '_edit') and 'edit'|moduleActive(allModules) %} {% endif %} {% if routeExist('admin_' ~ interface['name'] ~ '_layout') and 'edit'|moduleActive(allModules) and entity.customLayout is not defined %} {% endif %} {% if routeExist('admin_' ~ interface['name'] ~ '_tree') and 'edit'|moduleActive(allModules) %} {% endif %} {% if routeExist('admin_' ~ interface['name'] ~ '_profile') %} {% elseif routeExist('admin_' ~ interface['name'] ~ '_show') %} {% endif %} {% if routeExist('admin_' ~ interface['name'] ~ '_delete') and 'delete'|moduleActive(allModules) %}
{% endif %} {% if routeExist('admin_' ~ interface['name'] ~ '_reset') and 'delete'|moduleActive(allModules) %} {% endif %}
{{ "Aucun résultat"|trans }}
{% include 'admin/core/include/pagination.html.twig' %}
{% endblock %}