{% 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 '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 %}{{ "Infos"|trans }} | {% endif %} {% if routeExist('admin_' ~ interface['name'] ~ '_position') and 'edit'|moduleActive(allModules) %}{{ "Position"|trans }} | {% 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 %} | {{ columnTitle }} | {% endif %}
|
---|---|---|---|---|---|---|---|
{% 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 %} | {% if 'media' in columns and entity.mediaRelations is defined %}{% set filePath = entity|mainMedia|thumb(null, {'path': true, 'placeholder': true}) %} {{ imgRender({'src': asset(filePath), 'width': 30, 'height': 30}) }} | {% 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 %}{% 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 %} | {% endif %} {% endfor %} {% if haveInfos %}{% 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 %} | {% endif %} {% if routeExist('admin_' ~ interface['name'] ~ '_position') and 'edit'|moduleActive(allModules) %}{{ render_esi(controller(namespace ~ "::position", args)) }} | {% endif %} {% if interface.buttons is defined and interface.buttons and not disabledButtons %}{% for route in interface.buttons %} {% if route|routeExist %} {% set label = labels[route] is defined ? labels[route] : route %} {{ label }} {% endif %} {% endfor %} | {% endif %} {% if interface.count is defined and interface.count %}{{ attribute(entity, interface.count)|length }} | {% endif %}
{% 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) %}
|
{{ "Aucun résultat"|trans }} |