Resources/views/User/show.html.twig
{% extends beelab_user_layout %}
{% block title %}User - {{ parent() }}{% endblock %}
{% block body %}
<h1>{{ 'User'|trans({}, 'admin') }}</h1>
<table class="table table-hover record_properties">
<tbody>
<tr>
<th scope="row">Id</th>
<td>{{ user.id }}</td>
</tr>
<tr>
<th scope="row">{{ 'Email'|trans({}, 'admin') }}</th>
<td>{{ user.email }}</td>
</tr>
<tr>
<th scope="row">{{ 'Roles'|trans({}, 'admin') }}</th>
<td>{{ user.roles|join(', ') }}</td>
</tr>
<tr>
<th scope="row">{{ 'Active'|trans({}, 'admin') }}</th>
<td>{% if user.isActive %}<i class="fa fa-check"></i>{% endif %}</td>
</tr>
<tr>
<th scope="row">{{ 'Last login'|trans({}, 'admin') }}</th>
<td>{% if user.lastLogin %}{{ user.lastLogin|date('Y-m-d H:i:s') }}{% endif %}</td>
</tr>
</tbody>
</table>
{{ form_start(delete_form) }}
{{ form_widget(delete_form) }}
<div class="btn-group record_actions">
<a class="btn btn-info" href="{{ path('user') }}">
<i class="fa fa-list"></i> {{ 'Back to the list'|trans({}, 'admin') }}
</a>
<a class="btn btn-primary" href="{{ path('user_edit', {id: user.id}) }}">
<i class="fa fa-edit"></i> {{ 'Edit'|trans({}, 'admin') }}
</a>
<button class="btn btn-danger" type="submit">
<i class="fa fa-trash-o"></i> {{ 'Delete'|trans({}, 'admin') }}
</button>
</div>
<input name="modal" type="hidden" value="0">
{{ form_end(delete_form) }}
<div id="delete_confirm" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>{{ 'Confirm delete'|trans({}, 'admin') }}</h3>
</div>
<div class="modal-body">
<p>{{ 'You are about to delete an item'|trans({}, 'admin') }}, {{ 'this procedure is irreversible'|trans({}, 'admin') }}.</p>
<p>{{ 'Do you want to proceed?'|trans({}, 'admin') }}</p>
</div>
<div class="modal-footer">
<button class="btn btn-danger">{{ 'Yes'|trans({}, 'admin') }}</button>
<button class="btn btn-default" data-dismiss="modal">{{ 'No'|trans({}, 'admin') }}</button>
</div>
</div>
</div>
</div>
{% endblock %}