collection-crud/src/Resources/crud/templates/show.tpl.php

41 lines
1.2 KiB
PHP

{% extends 'form.html.twig' %}
{% block title %}<?= $entity_class_name ?>{% endblock %}
{% block form %}
<h2>Brand</h2>
<div class="callout">
<ul>
<li>
<a href="{{ path('<?= $route_name ?>_index') }}">Back to the list</a>
</li>
<li>
<a href="{{ path('<?= $route_name ?>_edit', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}">Edit</a>
</li>
</ul>
<hr/>
<form method="post" action="{{ path('<?= $route_name ?>_delete', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>) }}">
<button type="submit" class="alert button expanded">Delete</button>
</form>
</div>
<div class="large primary callout">
<table class="table">
<tbody>
<?php foreach ($entity_fields as $field): ?>
<tr>
<th><?= ucfirst($field['fieldName']) ?></th>
<td>{{ <?= $helper->getEntityFieldPrintCode($entity_twig_var_singular, $field) ?> }}</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
{% endblock %}