{% 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 '@!EasyAdmin/default/show.html.twig' %}
{% block content_breadcrumb_link %}
{% set _default_title = 'list.page_title'|trans(_trans_parameters, 'EasyAdminBundle') %}
<li>
<a href="#">
{{ (_entity_config.list.title is defined ? _entity_config.list.title|trans(_trans_parameters) : _default_title)|raw }}
</a>
</li>
<li class="active">{{ "action.show"|trans }}</li>
{% endblock content_breadcrumb_link %}
{% block content_header_title %}
<i class="fa fa-{{ _entity_config.icon is defined ? _entity_config.icon : "cog" }}"></i>
{% apply spaceless %}
{% set _default_title = 'list.page_title'|trans(_trans_parameters, 'EasyAdminBundle') %}
{{ _entity_config.list.title is defined ? _entity_config.list.title|trans(_trans_parameters) : _default_title }}
{% endapply %}
{% endblock %}
{% block main %}
<div class="panel">
<div class="panel-heading">
<div class="panel-control">
{{- block('global_actions') -}}
</div>
<h3 class="panel-title">{{- block('content_title') -}}</h3>
</div>
<div class="panel-body">
{% block show_fields %}
{% set _fields_visible_by_user = fields|filter((metadata, field) => easyadmin_is_granted(metadata.permission)) %}
{% for field, metadata in _fields_visible_by_user %}
{% block show_field %}
<div class="form-group field-{{ metadata.type|default('default')|lower }} {{ metadata.css_class|default('') }}">
<label class="control-label">
{{ metadata.label|trans(_trans_parameters)|raw }}
</label>
<div class="form-widget">
<div class="form-control">
{{ easyadmin_render_field_for_show_view(_entity_config.name, entity, metadata) }}
</div>
{% if metadata.help|default('') != '' %}
<small class="form-help"><i class="fa fa-fw fa-info-circle"></i> {{ metadata.help|trans|raw }}</small>
{% endif %}
</div>
</div>
{% endblock %}
{% endfor %}
{% endblock %}
</div>
<div class="panel-footer">
<div class="form-actions">
{% block item_actions %}
{% set _show_actions = easyadmin_get_actions_for_show_item(_entity_config.name) %}
{% set _request_parameters = app.request.query.all %}
{{ include('@EasyAdmin/default/includes/_actions.html.twig', {
actions: _show_actions,
entity_config: _entity_config,
request_parameters: _request_parameters,
translation_domain: _entity_config.translation_domain,
trans_parameters: _trans_parameters,
item_id: _entity_id,
item: entity
}, with_context = false) }}
{% endblock item_actions %}
</div>
</div>
{% 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 %}
</div>
{% endblock %}