Ajout export pdf des heures supplémetnaires

This commit is contained in:
Ambulance Clerc
2022-05-02 14:40:10 +02:00
parent f410e3c5da
commit 5bd350aece
12 changed files with 193 additions and 11 deletions

View File

@@ -44,10 +44,14 @@
{% block object-tools-items %}
{% change_list_object_tools %}
{% endblock %}
{% load replace_collabs %}
<li>
<a href="export/" class="historylink">Export</a>
<a href="/collabs/print_pdf{{ request.get_full_path | replace_collabs }}" class="historylink">Export</a>
</li>
</ul>
{% endblock %}
{% if cl.formset and cl.formset.errors %}
<p class="errornote">

View File

@@ -0,0 +1,54 @@
<html>
<head>
<style>
* {
font-size: 15px;
}
table {
table-layout: fixed;
width: 100%;
border: 1px solid black;
}
table th {
text-align: left;
padding: 3px;
padding-bottom: 0;
}
table td {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 3px;
padding-bottom: 0;
}
</style>
</head>
<body>
<table>
<tr>
<th></th>
<th>Date</th>
<th>Heures</th>
<th>Minutes</th>
<th>Collaborateur</th>
<th>Types</th>
<th>Total du mois</th>
</tr>
{%for data in record%}
<tr>
<td style="width: 10%;"> {{forloop.counter}} </td>
<td sttyle="width: 40%; text-align: left;"> {{data.date}} </td>
<td style="width: 30%;"> {{data.hours}} </td>
<td style="width: 20%;"> {{data.minutes}} </td>
<td style="width: 20%;"> {{data.user}} ({{data.bases}}) </td>
<td style="width: 20%;"> {{data.types}} </td>
<td style="width: 20%;"> {{data.total}} </td>
</tr>
{%endfor%}
</table>
</body>
</html>