chore: Amélioration de la fiche d'élève

This commit is contained in:
N3WT DE COMPET
2025-05-31 11:08:21 +02:00
parent 5be5f9f70d
commit f265540da2

View File

@ -1,233 +1,228 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Fiche élève de {{ student.last_name }} {{ student.first_name }}</title> <title>Fiche élève de {{ student.last_name }} {{ student.first_name }}</title>
<style> <style>
@page { @page {
size: A4; size: A4;
margin: 2cm; margin: 2cm;
} }
body { body {
font-family: 'Arial', sans-serif; font-family: 'Arial', sans-serif;
font-size: 12pt; font-size: 12pt;
line-height: 1.6; color: #222;
margin: 0; background: #fff;
padding: 0; margin: 0;
color: #333; padding: 0;
background-color: #f9f9f9; }
} .container {
.container { width: 100%;
width: 100%; padding: 0;
padding: 20px; background: #fff;
background-color: #fff; }
border-radius: 10px; .header {
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); text-align: center;
} margin-bottom: 24px;
.header { border-bottom: 2px solid #4CAF50;
text-align: center; padding-bottom: 12px;
margin-bottom: 30px; position: relative;
border-bottom: 3px solid #4CAF50; }
padding-bottom: 15px; .title {
position: relative; font-size: 22pt;
} font-weight: bold;
.title { color: #4CAF50;
font-size: 20pt; margin: 0;
font-weight: bold; }
color: #4CAF50; .photo {
margin: 0; position: absolute;
} top: 0;
.photo { right: 0;
position: absolute; width: 90px;
top: 0; height: 90px;
right: 0; object-fit: cover;
width: 100px; border: 1px solid #4CAF50;
height: 100px; border-radius: 8px;
object-fit: cover; }
border: 2px solid #4CAF50; .section {
border-radius: 10px; margin-bottom: 32px; /* Espacement augmenté entre les sections */
} }
.section { .section-title {
margin-bottom: 20px; font-size: 15pt;
padding: 15px; font-weight: bold;
border: 1px solid #ddd; color: #4CAF50;
border-radius: 8px; margin-bottom: 18px; /* Espacement sous le titre de section */
background-color: #fefefe; border-bottom: 1px solid #4CAF50;
} padding-bottom: 2px;
.section-title { }
font-size: 18pt; table {
font-weight: bold; width: 100%;
color: #4CAF50; border-collapse: collapse;
margin-bottom: 10px; margin-bottom: 8px;
text-align: left; }
border-bottom: 2px solid #4CAF50; th, td {
padding-bottom: 5px; border: 1px solid #bbb;
} padding: 6px 8px;
table { text-align: left;
width: 100%; }
border-collapse: collapse; th {
margin-top: 10px; background: #f3f3f3;
} font-weight: bold;
td { }
padding: 8px; tr:nth-child(even) {
vertical-align: top; background: #fafafa;
} }
.label-cell { .label-cell {
font-weight: bold; font-weight: bold;
color: #555; width: 30%;
width: 35%; background: #f3f3f3;
text-align: right; }
padding-right: 10px; .value-cell {
} width: 70%;
.value-cell { }
color: #333; .signature {
width: 65%; margin-top: 30px;
text-align: left; text-align: right;
} font-style: italic;
.phone { color: #555;
white-space: nowrap; }
} .signature-text {
.signature { font-weight: bold;
margin-top: 30px; color: #333;
text-align: right; }
font-style: italic; .subsection-title {
color: #555; font-size: 12pt;
} color: #333;
.signature-text { margin: 8px 0 4px 0;
font-weight: bold; font-weight: bold;
color: #333; }
} </style>
</style> </head>
</head> <body>
<body> {% load myTemplateTag %}
{% load myTemplateTag %} <div class="container">
<div class="container"> <!-- Header Section -->
<!-- Header Section --> <div class="header">
<div class="header"> <h1 class="title">Fiche élève de {{ student.last_name }} {{ student.first_name }}</h1>
<h1 class="title">Fiche élève de {{ student.last_name }} {{ student.first_name }}</h1> {% if student.photo %}
{% if student.photo %} <img src="{{ student.get_photo_url }}" alt="Photo de l'élève" class="photo" />
<img {% else %}
src="{{ student.get_photo_url }}" <img src="/static/img/default-photo.jpg" alt="Photo par défaut" class="photo" />
alt="Photo de l'élève" {% endif %}
class="photo"
/>
{% else %}
<img
src="/static/img/default-photo.jpg"
alt="Photo par défaut"
class="photo"
/>
{% endif %}
</div>
<!-- Student Section -->
<div class="section">
<h2 class="section-title">ÉLÈVE</h2>
<table>
<tr>
<td class="label-cell">Nom :</td>
<td class="value-cell">{{ student.last_name }}</td>
<td class="label-cell">Prénom :</td>
<td class="value-cell">{{ student.first_name }}</td>
</tr>
<tr>
<td class="label-cell">Adresse :</td>
<td colspan="3" class="value-cell">{{ student.address }}</td>
</tr>
<tr>
<td class="label-cell">Genre :</td>
<td class="value-cell">{{ student|getStudentGender }}</td>
<td class="label-cell">Né(e) le :</td>
<td class="value-cell">{{ student.birth_date }}</td>
</tr>
<tr>
<td class="label-cell">À :</td>
<td colspan="3" class="value-cell">{{ student.birth_place }} ({{ student.birth_postal_code }})</td>
</tr>
<tr>
<td class="label-cell">Nationalité :</td>
<td class="value-cell">{{ student.nationality }}</td>
<td class="label-cell">Niveau :</td>
<td class="value-cell">{{ student|getStudentLevel }}</td>
</tr>
</table>
</div>
<!-- Guardians Section -->
<div class="section">
<h2 class="section-title">RESPONSABLES</h2>
{% for guardian in student.getGuardians %}
<div class="subsection">
<h3 class="subsection-title">Responsable {{ forloop.counter }}</h3>
<table>
<tr>
<td class="label-cell">Nom :</td>
<td class="value-cell">{{ guardian.last_name }}</td>
<td class="label-cell">Prénom :</td>
<td class="value-cell">{{ guardian.first_name }}</td>
</tr>
<tr>
<td class="label-cell">Adresse :</td>
<td colspan="3" class="value-cell">{{ guardian.address }}</td>
</tr>
<tr>
<td class="label-cell">Né(e) le :</td>
<td class="value-cell">{{ guardian.birth_date }}</td>
<td class="label-cell">Email :</td>
<td class="value-cell">{{ guardian.email }}</td>
</tr>
<tr>
<td class="label-cell">Téléphone :</td>
<td class="value-cell phone">{{ guardian.phone|phone_format }}</td>
<td class="label-cell">Profession :</td>
<td class="value-cell">{{ guardian.profession }}</td>
</tr>
</table>
</div>
{% endfor %}
</div>
<!-- Siblings Section -->
<div class="section">
<h2 class="section-title">FRATRIE</h2>
{% for sibling in student.getSiblings %}
<div class="subsection">
<h3 class="subsection-title">Frère/Soeur {{ forloop.counter }}</h3>
<table>
<tr>
<td class="label-cell">Nom :</td>
<td class="value-cell">{{ sibling.last_name }}</td>
<td class="label-cell">Prénom :</td>
<td class="value-cell">{{ sibling.first_name }}</td>
</tr>
<tr>
<td class="label-cell">Né(e) le :</td>
<td colspan="3" class="value-cell">{{ sibling.birth_date }}</td>
</tr>
</table>
</div>
{% endfor %}
</div>
<!-- Payment Section -->
<div class="section">
<h2 class="section-title">MODALITÉS DE PAIEMENT</h2>
<table>
<tr>
<td class="label-cell">Frais d'inscription :</td>
<td class="value-cell">{{ student|getRegistrationPaymentMethod }} en {{ student|getRegistrationPaymentPlan }}</td>
</tr>
<tr>
<td class="label-cell">Frais de scolarité :</td>
<td class="value-cell">{{ student|getTuitionPaymentMethod }} en {{ student|getTuitionPaymentPlan }}</td>
</tr>
</table>
</div>
<!-- Signature Section -->
<div class="signature">
Fait le <span class="signature-text">{{ signatureDate }}</span> à <span class="signature-text">{{ signatureTime }}</span>
</div>
</div> </div>
</body>
<!-- Élève -->
<div class="section">
<div class="section-title">ÉLÈVE</div>
<table>
<tr>
<td class="label-cell">Nom</td>
<td class="value-cell">{{ student.last_name }}</td>
<td class="label-cell">Prénom</td>
<td class="value-cell">{{ student.first_name }}</td>
</tr>
<tr>
<td class="label-cell">Adresse</td>
<td class="value-cell" colspan="3">{{ student.address }}</td>
</tr>
<tr>
<td class="label-cell">Genre</td>
<td class="value-cell">{{ student|getStudentGender }}</td>
<td class="label-cell">Né(e) le</td>
<td class="value-cell">{{ student.birth_date }}</td>
</tr>
<tr>
<td class="label-cell">À</td>
<td class="value-cell">{{ student.birth_place }} ({{ student.birth_postal_code }})</td>
<td class="label-cell">Nationalité</td>
<td class="value-cell">{{ student.nationality }}</td>
</tr>
<tr>
<td class="label-cell">Niveau</td>
<td class="value-cell">{{ student|getStudentLevel }}</td>
<td class="label-cell"></td>
<td class="value-cell"></td>
</tr>
</table>
</div>
<!-- Responsables -->
<div class="section">
<div class="section-title">RESPONSABLES</div>
{% for guardian in student.getGuardians %}
<div>
<div class="subsection-title">Responsable {{ forloop.counter }}</div>
<table>
<tr>
<td class="label-cell">Nom</td>
<td class="value-cell">{{ guardian.last_name }}</td>
<td class="label-cell">Prénom</td>
<td class="value-cell">{{ guardian.first_name }}</td>
</tr>
<tr>
<td class="label-cell">Adresse</td>
<td class="value-cell" colspan="3">{{ guardian.address }}</td>
</tr>
<tr>
<td class="label-cell">Email</td>
<td class="value-cell" colspan="3">{{ guardian.email }}</td>
</tr>
<tr>
<td class="label-cell">Né(e) le</td>
<td class="value-cell">{{ guardian.birth_date }}</td>
<td class="label-cell">Téléphone</td>
<td class="value-cell">{{ guardian.phone|phone_format }}</td>
</tr>
<tr>
<td class="label-cell">Profession</td>
<td class="value-cell" colspan="3">{{ guardian.profession }}</td>
</tr>
</table>
</div>
{% endfor %}
</div>
<!-- Fratrie -->
<div class="section">
<div class="section-title">FRATRIE</div>
{% for sibling in student.getSiblings %}
<div>
<div class="subsection-title">Frère/Soeur {{ forloop.counter }}</div>
<table>
<tr>
<td class="label-cell">Nom</td>
<td class="value-cell">{{ sibling.last_name }}</td>
<td class="label-cell">Prénom</td>
<td class="value-cell">{{ sibling.first_name }}</td>
</tr>
<tr>
<td class="label-cell">Né(e) le</td>
<td class="value-cell" colspan="3">{{ sibling.birth_date }}</td>
</tr>
</table>
</div>
{% endfor %}
</div>
<!-- Paiement -->
<div class="section">
<div class="section-title">MODALITÉS DE PAIEMENT</div>
<table>
<tr>
<td class="label-cell">Frais d'inscription</td>
<td class="value-cell">{{ student|getRegistrationPaymentMethod }} en {{ student|getRegistrationPaymentPlan }}</td>
</tr>
<tr>
<td class="label-cell">Frais de scolarité</td>
<td class="value-cell">{{ student|getTuitionPaymentMethod }} en {{ student|getTuitionPaymentPlan }}</td>
</tr>
</table>
</div>
<!-- Signature -->
<div class="signature">
Fait le <span class="signature-text">{{ signatureDate }}</span> à <span class="signature-text">{{ signatureTime }}</span>
</div>
</div>
</body>
</html> </html>