mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
feat: Génération du bilan de compétence en PDF [#16]
This commit is contained in:
74
Back-End/Subscriptions/templates/pdfs/bilan_competences.html
Normal file
74
Back-End/Subscriptions/templates/pdfs/bilan_competences.html
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Bilan de compétences</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; margin: 2em; }
|
||||
h1, h2 { color: #059669; }
|
||||
.student-info { margin-bottom: 2em; }
|
||||
.domain-table { width: 100%; border-collapse: collapse; margin-bottom: 2em; }
|
||||
.domain-header th {
|
||||
background: #d1fae5;
|
||||
color: #065f46;
|
||||
font-size: 1.1em;
|
||||
padding: 0.7em;
|
||||
text-align: left;
|
||||
}
|
||||
.category-row td {
|
||||
background: #f0fdf4;
|
||||
color: #059669;
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
padding: 0.6em;
|
||||
}
|
||||
th, td { border: 1px solid #e5e7eb; padding: 0.5em; }
|
||||
th.competence-header { background: #d1fae5; }
|
||||
td.competence-nom { word-break: break-word; max-width: 320px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Bilan de compétences</h1>
|
||||
<div class="student-info">
|
||||
<strong>Élève :</strong> {{ student.last_name }} {{ student.first_name }}<br>
|
||||
<strong>Niveau :</strong> {{ student.level }}<br>
|
||||
<strong>Classe :</strong> {{ student.class_name }}<br>
|
||||
<strong>Date :</strong> {{ date }}
|
||||
</div>
|
||||
|
||||
{% for domaine in domaines %}
|
||||
<table class="domain-table" {% if not forloop.first %}style="page-break-before: always;"{% endif %}>
|
||||
<thead>
|
||||
<tr class="domain-header">
|
||||
<th colspan="4" style="text-align:center">{{ domaine.nom }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="competence-header" style="min-width: 120px;">Compétence</th>
|
||||
<th class="competence-header" style="width: 28px; text-align:center;">1</th>
|
||||
<th class="competence-header" style="width: 28px; text-align:center;">2</th>
|
||||
<th class="competence-header" style="width: 28px; text-align:center;">3</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for categorie in domaine.categories %}
|
||||
<tr class="category-row">
|
||||
<td colspan="4">{{ categorie.nom }}</td>
|
||||
</tr>
|
||||
{% for competence in categorie.competences %}
|
||||
<tr>
|
||||
<td class="competence-nom">{{ competence.nom }}</td>
|
||||
{% for note in "123" %}
|
||||
<td style="text-align:center; width:28px;">
|
||||
{% if competence.score|stringformat:"s" == note %}
|
||||
<span style="color:#059669; font-weight:bold; font-size:1.1em;">✓</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user