Améliore présentation table niveaux parcours

This commit is contained in:
Emmanuel Viennet 2023-03-28 22:35:31 +02:00 committed by iziram
parent 63603463f1
commit cf778eba85
2 changed files with 11 additions and 2 deletions

View File

@ -31,12 +31,17 @@ table.table_niveaux_parcours tr.parcours_but td {
padding-top: 8px;
}
table.table_niveaux_parcours tr.parcours_but td b {
margin-right: 12px;
}
table.table_niveaux_parcours tr.annee_but {
text-align: center;
}
table.table_niveaux_parcours tr td:not(:first-child) {
width: 120px;
border: 1px solid #999;
}
table.table_niveaux_parcours tr.annee_but td:first-child {
@ -45,6 +50,9 @@ table.table_niveaux_parcours tr.annee_but td:first-child {
color: #ddd;
}
table.table_niveaux_parcours tr.annee_but td.empty {
opacity: 0;
}
.comp-c1 {
background: #a44

View File

@ -12,12 +12,13 @@
<tbody>
{% set nb_cols = ref.competences.count() + 1 %}
{% for parcour in ref.parcours %}
<tr class="parcours_but"><td colspan="{{nb_cols}}">Parcours {{parcour.code}} <i>{{parcour.libelle}}</i></td></tr>
<tr class="parcours_but"><td colspan="{{nb_cols}}">Parcours <b>{{parcour.code}}</b> <i>{{parcour.libelle}}</i></td></tr>
{% for annee in [ 1, 2, 3] %}
<tr class="annee_but">
<td>BUT{{annee}}</td>
{% for comp in ref.competences %}
<td class="comp-c{{1 + loop.index0 % 6}}">{{ table_niveaux_parcours[parcour.id][annee][comp.id] }}</td>
{% set niveau = table_niveaux_parcours[parcour.id][annee][comp.id] %}
<td class="comp-c{{1 + loop.index0 % 6}} {% if not niveau %}empty{% endif %}">{{ niveau }}</td>
{% endfor %}
</tr>
{% endfor %}