flask-contacts/templates/web/contacts.html

40 lines
1.0 KiB
HTML
Raw Normal View History

2017-05-10 18:41:02 +02:00
{% extends 'layouts/master.html' %}
{% block title %}View{% endblock %}
{% block body %}
<h1>Contacts</h1>
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Surname</th>
<th scope="col">E-Mail</th>
<th scope="col">Phone</th>
<td></td>
</tr>
</thead>
<tbody>
{% for contact in contacts %}
<tr>
<td>{{ contact.name }}</td>
<td>{{ contact.surname }}</td>
<td>{{ contact.email }}</td>
<td>{{ contact.phone }}</td>
<td class="text-right">
2017-05-11 18:31:59 +02:00
<div class="row">
<div class="col-xs-6">
<a class="btn btn-primary" href="{{ url_for('edit_contact', id=contact.id) }}">Edit</a>
</div>
<div class="col-xs-6">
<form action="{{ url_for('contacts_delete') }}" method="post">
<input type="hidden" name="id" value="{{ contact.id }}">
<input type="submit" class="btn btn-danger" data-toggle="confirmation" {# data-title="¿Estas seguro?" #} value="Delete">
</form>
</div>
</div>
2017-05-10 18:41:02 +02:00
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}