1
0
forked from ScoDoc/ScoDoc

cosmetic table

This commit is contained in:
Emmanuel Viennet 2023-02-06 22:43:07 +01:00
parent 40d313be41
commit 3165c3820d
2 changed files with 19 additions and 9 deletions

View File

@ -4070,6 +4070,14 @@ table.table_recap.jury tr.odd td.col_rcue_code {
background-color: #e0eeff; background-color: #e0eeff;
} }
table.table_recap.jury td.empty_code::after {
content: "📍";
}
table.table_recap.jury td.fontred a {
color: red;
}
table.table_recap .group { table.table_recap .group {
border-left: 1px dashed rgb(160, 160, 160); border-left: 1px dashed rgb(160, 160, 160);
white-space: nowrap; white-space: nowrap;

View File

@ -31,12 +31,9 @@ from app.scodoc.sco_codes_parcours import (
BUT_RCUE_SUFFISANT, BUT_RCUE_SUFFISANT,
) )
from app.scodoc import sco_formsemestre_status from app.scodoc import sco_formsemestre_status
from app.scodoc import sco_pvjury
from app.scodoc import sco_utils as scu from app.scodoc import sco_utils as scu
from app.tables.recap import RowRecap, TableRecap from app.tables.recap import RowRecap, TableRecap
EMO_EMPTY_CODE_JURY = "🏮" # "🍽" "🚨"
class TableJury(TableRecap): class TableJury(TableRecap):
"""Cette table recap reprend les colonnes du tableau recap, sauf les évaluations, """Cette table recap reprend les colonnes du tableau recap, sauf les évaluations,
@ -104,20 +101,22 @@ class TableJury(TableRecap):
row.add_cell( row.add_cell(
"jury_code_sem", "jury_code_sem",
"Jury", "Jury",
jury_code_sem or "🍽", jury_code_sem or "",
raw_content=jury_code_sem,
group="jury_code_sem", group="jury_code_sem",
classes=[] if jury_code_sem else ["empty_code"],
) )
self.foot_title_row.cells["jury_code_sem"].target_attrs[ self.foot_title_row.cells["jury_code_sem"].target_attrs[
"title" "title"
] = """Code jury sur le semestre""" ] = """Code jury sur le semestre"""
a_saisir = (not res.validations) or (not res.validations.has_decision(etud))
row.add_cell( row.add_cell(
"jury_link", "jury_link",
"", "",
f"""{("modifier" if res.validations and res.validations.has_decision(etud) else "➨ saisir") f"""{("➨ saisir" if a_saisir else "modifier")
if res.formsemestre.etat else "voir"} décisions""", if res.formsemestre.etat else "voir"} décisions""",
group="col_jury_link", group="col_jury_link",
classes=["fontred"] if a_saisir else [],
target=url_for( target=url_for(
"notes.formsemestre_validation_etud_form", "notes.formsemestre_validation_etud_form",
scodoc_dept=g.scodoc_dept, scodoc_dept=g.scodoc_dept,
@ -229,10 +228,13 @@ class RowJury(RowRecap):
self.add_cell( self.add_cell(
col_id + "_code", col_id + "_code",
f"<div>{rcue.ue_1.acronyme}</div><div>{rcue.ue_2.acronyme}</div>", f"<div>{rcue.ue_1.acronyme}</div><div>{rcue.ue_2.acronyme}</div>",
dec_rcue.code_valide or EMO_EMPTY_CODE_JURY, dec_rcue.code_valide or "",
raw_content=dec_rcue.code_valide or "",
group="rcue", group="rcue",
classes=["col_rcue_code", "recorded_code"], classes=[
"col_rcue_code",
"recorded_code",
"empty_code" if not dec_rcue.code_valide else "",
],
column_classes={"col_rcue"}, column_classes={"col_rcue"},
) )