{% set _entity_config = easyadmin_entity(app.request.query.get('entity')) %} {# the empty string concatenation is needed when the primary key is an object (e.g. an Uuid object) #} {% set _entity_id = '' ~ attribute(entity, _entity_config.primary_key_field_name) %} {% trans_default_domain _entity_config.translation_domain %} {% set _trans_parameters = { '%entity_name%': _entity_config.name|trans, '%entity_label%': _entity_config.label|trans, '%entity_id%': _entity_id } %} {% extends _entity_config.templates.layout %} {% block body_id 'easyadmin-show-' ~ _entity_config.name ~ '-' ~ _entity_id %} {% block body_class 'show show-' ~ _entity_config.name|lower %} {% block content_title %} {% spaceless %} {% set _default_title = 'show.page_title'|trans(_trans_parameters, 'EasyAdminBundle') %} {{ _entity_config.show.title is defined ? _entity_config.show.title|trans(_trans_parameters) : _default_title }} {% endspaceless %} {% endblock %} {% block main %}
{% block show_fields %} {% for field, metadata in fields %} {% block show_field %}
{{ easyadmin_render_field_for_show_view(_entity_config.name, entity, metadata) }}
{% if metadata.help|default('') != '' %} {{ metadata.help|trans|raw }} {% endif %}
{% endblock %} {% endfor %} {% endblock %}
{% block item_actions %} {% set _show_actions = easyadmin_get_actions_for_show_item(_entity_config.name) %} {% set _request_parameters = { entity: _entity_config.name, referer: app.request.query.get('referer') } %} {{ include('@EasyAdmin/default/includes/_actions.html.twig', { actions: _show_actions, request_parameters: _request_parameters, translation_domain: _entity_config.translation_domain, trans_parameters: _trans_parameters, item_id: _entity_id }, with_context = false) }} {% endblock item_actions %}
{% block delete_form %} {{ include('@EasyAdmin/default/includes/_delete_form.html.twig', { view: 'show', referer: app.request.query.get('referer', ''), delete_form: delete_form, _translation_domain: _entity_config.translation_domain, _trans_parameters: _trans_parameters, _entity_config: _entity_config, }, with_context = false) }} {% endblock delete_form %} {% endblock %} {% block body_javascript %} {{ parent() }} {% endblock %}