feat: Ajout des Bundles de fichiers [#24]

This commit is contained in:
Luc SORIGNET
2025-02-10 18:35:24 +01:00
parent fb7fbaf839
commit ffc6ce8de8
25 changed files with 1736 additions and 743 deletions

View File

@ -3,95 +3,205 @@
<head>
<meta charset="UTF-8">
<title>{{ pdf_title }}</title>
<style type="text/css">
<style>
@page {
size: A4;
margin: 2cm;
}
body {
font-weight: 200;
font-size: 14px;
font-family: Helvetica, Arial, sans-serif;
font-size: 11pt;
line-height: 1.3;
margin: 0;
padding: 0;
color:#333;
}
.container {
width: 100%;
}
.header {
font-size: 20px;
font-weight: 100;
text-align: center;
color: #007cae;
margin-bottom: 30px;
border-bottom: 2px solid #333;
padding-bottom: 10px;
}
.title {
font-size: 22px;
font-weight: 100;
/* text-align: right;*/
padding: 10px 20px 0px 20px;
font-size: 18pt;
font-weight: bold;
margin: 0;
padding: 0;
}
.title span {
color: #007cae;
.section {
margin-bottom: 15px; /* Réduit de 25px à 15px */
padding: 10px; /* Réduit de 15px à 10px */
page-break-inside: avoid;
}
.details {
padding: 10px 20px 0px 20px;
text-align: left !important;
/*margin-left: 40%;*/
.section-title {
font-size: 16pt;
font-weight: bold;
margin: 0 0 10px 0; /* Réduit de 15px à 10px */
padding-bottom: 3px; /* Réduit de 5px à 3px */
border-bottom: 1px solid #333;
text-align: center;
}
.hrItem {
border: none;
height: 1px;
/* Set the hr color */
color: #333; /* old IE */
background-color: #fff; /* Modern Browsers */
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 10px;
}
td {
padding: 4px;
vertical-align: top;
}
.label-cell {
font-weight: bold;
width: 150px;
}
.value-cell {
width: auto;
}
.half-row td {
width: 50%;
}
.subsection-title {
font-size: 12pt;
font-weight: bold;
margin-bottom: 5px; /* Réduit de 10px à 5px */
}
.signature {
margin-top: 30px;
text-align: right;
font-style: italic;
}
.signature-text {
font-weight: bold;
}
.clearfix::after {
content: "";
clear: both;
display: table;
}
p {
margin: 0; /* Ajout de margin 0 pour les paragraphes */
padding: 0; /* Ajout de padding 0 pour les paragraphes */
}
</style>
</head>
<body>
{% load myTemplateTag %}
<div class='wrapper'>
<div class='header'>
<p class='title'>{{ pdf_title }}</p>
<div class="container">
<div class="header">
<h1 class="title">{{ pdf_title }}</h1>
</div>
<div>
<div class='details'>
Signé le : <b>{{ signatureDate }}</b> <br/>
A : <b>{{ signatureTime }}</b>
<hr class='hrItem' />
<h1>ELEVE</h1>
<div class="section">
<h2 class="section-title">ÉLÈVE</h2>
{% with level=student|getStudentLevel %}
{% with gender=student|getStudentGender %}
NOM : <b>{{ student.last_name }}</b> <br/>
PRENOM : <b>{{ student.first_name }}</b> <br/>
ADRESSE : <b>{{ student.address }}</b> <br/>
GENRE : <b>{{ gender }}</b> <br/>
NE(E) LE : <b>{{ student.birth_date }}</b> <br/>
A : <b>{{ student.birth_place }} ({{ student.birth_postal_code }})</b> <br/>
NATIONALITE : <b>{{ student.nationality }}</b> <br/>
NIVEAU : <b>{{ level }}</b> <br/>
MEDECIN TRAITANT : <b>{{ student.attending_physician }}</b> <br/>
<table>
<tr class="half-row">
<td class="label-cell">NOM :</td>
<td>{{ student.last_name }}</td>
<td class="label-cell">PRÉNOM :</td>
<td>{{ student.first_name }}</td>
</tr>
<tr>
<td class="label-cell">ADRESSE :</td>
<td colspan="3">{{ student.address }}</td>
</tr>
<tr class="half-row">
<td class="label-cell">GENRE :</td>
<td>{{ gender }}</td>
<td class="label-cell">NÉ(E) LE :</td>
<td>{{ student.birth_date }}</td>
</tr>
<tr>
<td class="label-cell">À :</td>
<td colspan="3">{{ student.birth_place }} ({{ student.birth_postal_code }})</td>
</tr>
<tr class="half-row">
<td class="label-cell">NATIONALITÉ :</td>
<td>{{ student.nationality }}</td>
<td class="label-cell">NIVEAU :</td>
<td>{{ level }}</td>
</tr>
<tr>
<td class="label-cell">MÉDECIN TRAITANT :</td>
<td colspan="3">{{ student.attending_physician }}</td>
</tr>
</table>
{% endwith %}
{% endwith %}
<hr class='hrItem' />
<h1>RESPONSABLES</h1>
</div>
<div class="section">
<h2 class="section-title">RESPONSABLES</h2>
{% with guardians=student.getGuardians %}
{% with siblings=student.getGuardians %}
{% for guardian in guardians%}
<h2>Guardian {{ forloop.counter }}</h2>
NOM : <b>{{ guardian.last_name }}</b> <br/>
PRENOM : <b>{{ guardian.first_name }}</b> <br/>
ADRESSE : <b>{{ guardian.address }}</b> <br/>
NE(E) LE : <b>{{ guardian.birth_date }}</b> <br/>
MAIL : <b>{{ guardian.email }}</b> <br/>
TEL : <b>{{ guardian.phone }}</b> <br/>
PROFESSION : <b>{{ guardian.profession }}</b> <br/>
<div class="subsection">
<h3 class="subsection-title">Responsable {{ forloop.counter }}</h3>
<table>
<tr class="half-row">
<td class="label-cell">NOM :</td>
<td>{{ guardian.last_name }}</td>
<td class="label-cell">PRÉNOM :</td>
<td>{{ guardian.first_name }}</td>
</tr>
<tr>
<td class="label-cell">ADRESSE :</td>
<td colspan="3">{{ guardian.address }}</td>
</tr>
<tr class="half-row">
<td class="label-cell">NÉ(E) LE :</td>
<td>{{ guardian.birth_date }}</td>
<td class="label-cell">EMAIL :</td>
<td>{{ guardian.email }}</td>
</tr>
<tr class="half-row">
<td class="label-cell">TÉLÉPHONE :</td>
<td>{{ guardian.phone }}</td>
<td class="label-cell">PROFESSION :</td>
<td>{{ guardian.profession }}</td>
</tr>
</table>
</div>
{% endfor %}
<hr class='hrItem' />
<h1>FRATRIE</h1>
{% endwith %}
</div>
<div class="section">
<h2 class="section-title">FRATRIE</h2>
{% with siblings=student.getGuardians %}
{% for sibling in siblings%}
<h2>Frère - Soeur {{ forloop.counter }}</h2>
NOM : <b>{{ sibling.last_name }}</b> <br/>
PRENOM : <b>{{ sibling.first_name }}</b> <br/>
NE(E) LE : <b>{{ sibling.birth_date }}</b> <br/>
<div class="subsection">
<h3 class="subsection-title">Frère/Sœur {{ forloop.counter }}</h3>
<table>
<tr class="half-row">
<td class="label-cell">NOM :</td>
<td>{{ sibling.last_name }}</td>
<td class="label-cell">PRÉNOM :</td>
<td>{{ sibling.first_name }}</td>
</tr>
<tr>
<td class="label-cell">NÉ(E) LE :</td>
<td colspan="3">{{ sibling.birth_date }}</td>
</tr>
</table>
</div>
{% endfor %}
<hr class='hrItem' />
<h1>MODALITES DE PAIEMENT</h1>
{% endwith %}
</div>
<div class="section">
<h2 class="section-title">MODALITÉS DE PAIEMENT</h2>
{% with paymentMethod=student|getStudentPaymentMethod %}
<b>{{ paymentMethod }}</b> <br/>
{% endwith %}
{% endwith %}
<p>{{ paymentMethod }}</p>
{% endwith %}
</div>
<div class="signature">
Fait le <span class="signature-text">{{ signatureDate }}</span> à <span class="signature-text">{{ signatureTime }}</span>
</div>
</div>
</body>
</html>