2019-05-12 16:04:25 +02:00
|
|
|
{% set title = "Bills" %}
|
2019-04-26 06:22:43 +02:00
|
|
|
|
|
|
|
{% extends "layout/dash.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
2019-05-10 08:24:13 +02:00
|
|
|
<style id="grid">
|
|
|
|
.container.module:nth-child(1n) {
|
|
|
|
grid-area: 1 / 1 / 5 / 5;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2019-04-26 06:22:43 +02:00
|
|
|
<div class="container module">
|
|
|
|
|
2019-05-12 16:04:25 +02:00
|
|
|
<button type="button" class="btn btn-primary" style="margin:10px;" data-toggle="modal" data-target="#myModal">{{ _("Add") }}</button>
|
2019-04-26 07:50:49 +02:00
|
|
|
<div class="modal fade" id="myModal" role="dialog">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<!-- Modal content-->
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
2019-05-12 19:31:26 +02:00
|
|
|
<h4 class="modal-title">{{ _("Add bill") }}</h4>
|
2019-04-26 07:50:49 +02:00
|
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
{% macro render_field(field) %}
|
2019-05-12 16:04:25 +02:00
|
|
|
<dt><label for="{{ field.label.field_id }}">{{ _(field.label.text) }}</label>
|
2019-04-26 07:50:49 +02:00
|
|
|
<dd>{{ field(**kwargs)|safe }}
|
|
|
|
{% if field.errors %}
|
|
|
|
<ul class=errors>
|
|
|
|
{% for error in field.errors %}
|
|
|
|
<li>{{ error }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
</dd>
|
|
|
|
{% endmacro %}
|
|
|
|
<form method=post>
|
|
|
|
<dl>
|
|
|
|
{{ render_field(form.payment_to) }}
|
|
|
|
{{ render_field(form.description) }}
|
|
|
|
{{ render_field(form.sum) }}
|
|
|
|
{{ render_field(form.kid) }}
|
2019-05-12 04:22:48 +02:00
|
|
|
{{ render_field(form.date_due) }}
|
2019-04-26 07:50:49 +02:00
|
|
|
</dl>
|
2019-05-12 16:04:25 +02:00
|
|
|
<input type=submit value="{{ _('Add') }}">
|
2019-04-26 07:50:49 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2019-05-12 16:04:25 +02:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ _("Close") }}</button>
|
2019-04-26 07:50:49 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-04-26 06:22:43 +02:00
|
|
|
<table class="table">
|
|
|
|
<thead class="thead-light">
|
|
|
|
<tr>
|
2019-05-12 16:04:25 +02:00
|
|
|
<th scope="col">{{ _("Payment to") }}</th>
|
|
|
|
<th scope="col">{{ _("Description") }}</th>
|
|
|
|
<th scope="col" style="width: 120px">{{ _("Sum") }}</th>
|
|
|
|
<th scope="col" style="width: 220px">{{ _("KID") }}</th>
|
|
|
|
<th scope="col" style="width: 120px">{{ _("Date due") }}</th>
|
|
|
|
<th scope="col" style="width: 150px">{{ _("Payment status") }}</th>
|
2019-04-26 06:22:43 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for row in data %}
|
2019-04-26 06:52:27 +02:00
|
|
|
<!--<tr class="table-{{ 'success' if row[5] else 'danger' }}">-->
|
2019-04-26 06:22:43 +02:00
|
|
|
<tr>
|
|
|
|
<th>{{ row[0] }}</th>
|
|
|
|
<td>{{ row[1] }}</td>
|
|
|
|
<td>{{ row[2] }}</td>
|
|
|
|
<td>{{ row[3] }}</td>
|
|
|
|
<td>{{ row[4] }}</td>
|
2019-04-26 06:52:27 +02:00
|
|
|
<td style="background-color:{{ '#4F4' if row[5] else '#F44' }};"></td>
|
2019-04-26 06:22:43 +02:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|