added costs
This commit is contained in:
parent
83beefd23d
commit
8288902cc0
18 changed files with 378 additions and 10 deletions
77
app/costs/templates/costs/costs_all.html
Normal file
77
app/costs/templates/costs/costs_all.html
Normal file
|
@ -0,0 +1,77 @@
|
|||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% block header %}
|
||||
<!-- Datatable CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.4/css/dataTables.bootstrap5.min.css" />
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/responsive/2.2.9/css/responsive.bootstrap5.min.css">
|
||||
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
|
||||
|
||||
<!-- Datatable jQuery -->
|
||||
<script src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.11.3/js/dataTables.bootstrap5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/responsive/2.2.9/js/dataTables.responsive.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/responsive/2.2.9/js/responsive.bootstrap5.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#t__costs_all').DataTable({
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.11.3/i18n/de_de.json',
|
||||
},
|
||||
paging: false,
|
||||
info: false,
|
||||
responsive: true,
|
||||
columnDefs: [
|
||||
{ responsivePriority: 1, targets: 0 },
|
||||
]
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
{% endblock header %}
|
||||
{% block content %}
|
||||
<h3>Übersicht aller Kosten</h3>
|
||||
<p>
|
||||
Die Übersicht aller enstandenen Kosten.
|
||||
</p>
|
||||
<p>
|
||||
<a href="{% url 'costs_create' %}" class="btn btn-primary">Eine Buchung anlegen</a>
|
||||
</p>
|
||||
|
||||
<table class="table table-striped table-hover display responsive nowrap" width="100%" id="t__costs_all">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Patient</th>
|
||||
<th>Kosten</th>
|
||||
<th>Gebucht am</th>
|
||||
<th>Bemerkung</th>
|
||||
<th>Benutzer</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in costs %}
|
||||
<tr>
|
||||
<td> {{item.id_bird}} </td>
|
||||
<td> {{item.costs}} </td>
|
||||
<td> {{item.created}} </td>
|
||||
<td> {{item.comment}} </td>
|
||||
<td> {{item.user}} </td>
|
||||
<td><a href="{% url 'costs_edit' item.id %}"><i class="fa-sharp fa-solid fa-pen"></i></a></td>
|
||||
<td><a href="{% url 'costs_delete' item.id %}"><i class="fa-sharp fa-solid fa-trash"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
|
55
app/costs/templates/costs/costs_delete.html
Normal file
55
app/costs/templates/costs/costs_delete.html
Normal file
|
@ -0,0 +1,55 @@
|
|||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% block content %}
|
||||
<h3>Buchung löschen</h3>
|
||||
<p></p>
|
||||
<div class="row">
|
||||
<div class="col-lg-5 mb-3">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
{% csrf_token %}
|
||||
<div class="card bg-light mb-3" style="max-width: 30rem;">
|
||||
<div class="card-header">Buchung</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text">
|
||||
<strong>Patient:</strong> {{costs.id_bird}}<br>
|
||||
<strong>Buchung:</strong> {{costs.costs}}<br>
|
||||
<strong>Gebucht am:</strong> {{costs.created}}<br>
|
||||
<strong>Bemerkung:</strong> {{costs.comment|default_if_none:"keine Bemerkung"}}<br>
|
||||
<strong>Nutzer:</strong> {{costs.user}}<br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-success" type="abbort">Abbrechen</button>
|
||||
<button class="btn btn-danger" type="submit">Löschen</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-5">
|
||||
<h4>
|
||||
Kennung
|
||||
</h4>
|
||||
<p>
|
||||
Lorem ipsum dolor sit, amet consectetur adipisicing elit.
|
||||
Reiciendis, hic enim pariatur, exercitationem, repellat quasi sit
|
||||
temporibus dicta voluptate in voluptates. Alias deserunt sint
|
||||
suscipit explicabo et. Perferendis, dolor praesentium.
|
||||
</p>
|
||||
<h4>
|
||||
Vogel
|
||||
</h4>
|
||||
<p>
|
||||
Lorem ipsum dolor sit, amet consectetur adipisicing elit.
|
||||
Reiciendis, hic enim pariatur, exercitationem, repellat quasi sit
|
||||
temporibus dicta voluptate in voluptates. Alias deserunt sint
|
||||
suscipit explicabo et. Perferendis, dolor praesentium.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{% static 'js/bird.js' %}"></script>
|
||||
|
||||
{% endblock content %}
|
44
app/costs/templates/costs/costs_edit.html
Normal file
44
app/costs/templates/costs/costs_edit.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% block content %}
|
||||
<h3>Buchung bearbeiten</h3>
|
||||
<p></p>
|
||||
<div class="row">
|
||||
<div class="col-lg-5 mb-3">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
{% csrf_token %}
|
||||
{{form|crispy}}
|
||||
<button class="btn btn-success" type="abbort">Abbrechen</button>
|
||||
<button class="btn btn-primary" type="submit">Speichern</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-5">
|
||||
<h4>
|
||||
Kennung
|
||||
</h4>
|
||||
<p>
|
||||
Lorem ipsum dolor sit, amet consectetur adipisicing elit.
|
||||
Reiciendis, hic enim pariatur, exercitationem, repellat quasi sit
|
||||
temporibus dicta voluptate in voluptates. Alias deserunt sint
|
||||
suscipit explicabo et. Perferendis, dolor praesentium.
|
||||
</p>
|
||||
<h4>
|
||||
Vogel
|
||||
</h4>
|
||||
<p>
|
||||
Lorem ipsum dolor sit, amet consectetur adipisicing elit.
|
||||
Reiciendis, hic enim pariatur, exercitationem, repellat quasi sit
|
||||
temporibus dicta voluptate in voluptates. Alias deserunt sint
|
||||
suscipit explicabo et. Perferendis, dolor praesentium.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{% static 'js/bird.js' %}"></script>
|
||||
|
||||
{% endblock content %}
|
Loading…
Add table
Add a link
Reference in a new issue