index.html.twig
1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{% extends 'base.html.twig' %}
{% block body %}
{% for type, flashMessage in app.session.flashbag.all() %}
<div class="alert alert-{{ type }} fade in">
<button class="close" data-dismiss="alert" type="button">×</button>
{% if flashMessage.title is defined %}
<strong>{{ flashMessage.title }}</strong>
{{ flashMessage.message }}
{% else %}
{{ type }}
{% endif %}
</div>
{% endfor %}
<h1>Lista de personas</h1>
<ul>
<a class="btn btn-info" role="button" href="{{ path('persona_new') }}"><span class="glyphicon glyphicon-plus"></span></a>
</ul>
<table class="table table-bordered">
<thead>
<tr class="info">
<th>Id</th>
<th>Nombre</th>
<th>Apellido</th>
<th>Cedula</th>
<th>Acciones</th>
</thead>
<tbody>
{% for persona in personas %}
<tr>
<td><a href="{{ path('persona_show', { 'id': persona.id }) }}">{{ persona.id }}</a></td>
<td>{{ persona.nombre }}</td>
<td>{{ persona.apellido }}</td>
<td><a href="{{ path('persona_show', { 'id': persona.id }) }}">{{ persona.cedula }}</td></a>
<td>
<ul>
<a class="btn btn-info" role="button" href="{{ path('persona_show', { 'id': persona.id }) }}"><span class="glyphicon glyphicon-eye-open"></span></a>
<a class="btn btn-danger" role="button" href="{{ path('persona_edit', { 'id': persona.id }) }}"><span class="glyphicon glyphicon-pencil"></span></a>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}