init
This commit is contained in:
26
templates/index.html
Normal file
26
templates/index.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Lista kontaktów{% endblock %}
|
||||
{% block content %}
|
||||
<table>
|
||||
<tr><th>ID</th><th>Imię i nazwisko</th><th>Email</th><th>Telefon</th><th>Akcje</th></tr>
|
||||
{% if contacts %}
|
||||
{% for c in contacts %}
|
||||
<tr>
|
||||
<td>{{ c.id }}</td>
|
||||
<td>{{ c.name }}</td>
|
||||
<td>{{ c.email or '' }}</td>
|
||||
<td>{{ c.phone or '' }}</td>
|
||||
<td class="actions">
|
||||
<a class="btn" href="{{ url_for('edit', cid=c.id) }}">Edytuj</a>
|
||||
<form method="post" action="{{ url_for('delete') }}" onsubmit="return confirm('Usunąć?');">
|
||||
<input type="hidden" name="id" value="{{ c.id }}">
|
||||
<button class="btn warn" type="submit">Usuń</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr><td colspan="5"><i>Brak adresów</i></td></tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user