Ajout impression

This commit is contained in:
Ambulance Clerc
2023-09-12 15:13:11 +02:00
parent a4b5c7964a
commit 1d72a244ea
4 changed files with 164 additions and 1 deletions

View File

@@ -0,0 +1,155 @@
<html>
<head>
<style>
@page{
size: A4 landscape;
margin: 2cm;
}
* {
font-size: 10pt;
}
@page regular_template { margin: 2cm; }
table {
table-layout: fixed;
width: 100%;
border: 1px solid black;
}
table th {
text-align: left;
padding: 3px;
padding-bottom: 0;
}
table td {
width: 40%;
padding: 1mm;
}
table th{
width: 20%;
padding: 1mm;
}
.desc {
padding: 1mm;
}
.desc td{
width 50%;
}
.global{
padding: 1mm;
}
.global td{
width: 100%;
}
</style>
</head>
<body>
{%for object in objects%}
<h3>Liste des évaluations #{{object.ID}} {{object.sStudent}}</h3>
<table class="">
<tbody>
<tr class="">
<th class=" " align="center" >Date de suivi</th>
<td class="">{{ object.dtDate }}</td>
<th class=" " align="center">Date de d'écriture</th>
<td class="">{{ object.dtCreated }}</td>
</tr>
<tr class="">
<th class="" align="center">Auteur</th>
<td class="">{{ object.sAuthor }}</td>
<th class=" " align="center">Second auteur</th>
<td class="">{{ object.sAuthor_2e }}</td>
</tr>
<tr class="">
<th class=" "align="center">Type de suivi</th>
<td class="">{{ object.get_eval_type }}</td>
</tr>
{% if object.nEval_Type == "1" %}
<tr class="">
<th class=" "align="center">N° FIP</th>
<td class="">{{ object.sRef }}</td>
<th class=" "align="center">Priorité</th>
<td class="">{{ object.get_inter_priority }}</td>
</tr>
<tr>
<th class=" "align="center">Description</th>
<td class="" >{{ object.sInter_Desc }}</td>
<th class=" "align="center">Rôle de l'étudiant</th>
<td class="">{{ object.get_student_role }}</td>
</tr>
<tr class="">
<th class=" "align="center">Nature de l'intervention</th>
<td class="">{{ object.get_inter_nature }}</td>
<th class=" "align="center">Complexité de l'intervention</th>
<td class="" >{{ object.get_inter_complexity }}</td>
</tr>
{% endif %}
</tbody>
</table>
<hr>
<table class="desc">
<tbody>
<tr>
<th class="">
Éléments positifs (auto-évaluation)
</th>
<th class="">
Éléments positifs (Encadrant)
</th>
</tr>
<tr>
<td class="" >
{{object.o_Auto_eval.sDesc_pos | safe}}
</td>
<td class="" >
{{object.o_Encadrant_eval.sDesc_pos | safe}}
</td>
</tr>
<tr>
<td class=""></td>
</tr>
<tr>
<th class="">
Éléments à améliorer (auto-évaluation)
</th>
<th class="">
Éléments améliorer (Encadrant)
</th>
</tr>
<tr>
<td class="" >
{{object.o_Auto_eval.sDesc_neg | safe}}
</td>
<td class="" >
{{object.o_Encadrant_eval.sDesc_neg | safe}}
</td>
</tr>
</tbody>
</table>
<table class="global">
<tbody>
<tr class="">
<th class="">Avis Global</th>
</tr>
<tr class="">
<td class="">{{ object.o_Encadrant_eval.sDesc_global | safe }}</td>
</tr>
<tr class="">
<th class="">Avis Global (auto)</th>
</tr>
<tr class="">
<td class="">{{ object.o_Auto_eval.sDesc_global | safe}}</td>
</tr>
</tbody>
</table>
<pdf:nextpage />
{%endfor%}
</body>
</html>

View File

@@ -118,7 +118,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>

View File

@@ -4,6 +4,9 @@
<li> <li>
<a href="{% url 'studenteval:student_eval_list' object.Student.id %}?dtDate__range__gte={{ dtDate__range__gte }}&dtDate__range__lte={{ dtDate__range__lte }}" class="nav-link" target="_blank">Voir toutes les évaluations</a> <a href="{% url 'studenteval:student_eval_list' object.Student.id %}?dtDate__range__gte={{ dtDate__range__gte }}&dtDate__range__lte={{ dtDate__range__lte }}" class="nav-link" target="_blank">Voir toutes les évaluations</a>
</li> </li>
<li>
<a href="{% url 'studenteval:Export_pdf' object.uuid %}?dtDate__range__gte={{ dtDate__range__gte }}&dtDate__range__lte={{ dtDate__range__lte }}" class="nav-link" target="_blank">Imprimer liste PDF</a>
</li>
{% endblock %} {% endblock %}
{% block cl_content %} {% block cl_content %}
{% include 'studenteval/cl_student_eval.html' with object=object %} {% include 'studenteval/cl_student_eval.html' with object=object %}

View File

@@ -2,6 +2,11 @@
{% block title %}Liste des évaluations{% endblock %} {% block title %}Liste des évaluations{% endblock %}
{% block url_nav %}
<li>
<a href="{% url 'studenteval:Export_pdf_all' student_id %}?dtDate__range__gte={{ dtDate__range__gte }}&dtDate__range__lte={{ dtDate__range__lte }}" class="nav-link" target="_blank">Imprimer liste PDF</a>
</li>
{% endblock %}
{% block cl_content %} {% block cl_content %}
<div class="row"> <div class="row">
<div class="col"> <div class="col">