From 3165c3820d3701b6451a0a2f6ea7f04b842ef178 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 6 Feb 2023 22:43:07 +0100 Subject: [PATCH] cosmetic table --- app/static/css/scodoc.css | 8 ++++++++ app/tables/jury_recap.py | 20 +++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index d827e227..0898786a 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -4070,6 +4070,14 @@ table.table_recap.jury tr.odd td.col_rcue_code { 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 { border-left: 1px dashed rgb(160, 160, 160); white-space: nowrap; diff --git a/app/tables/jury_recap.py b/app/tables/jury_recap.py index db9b4238..67dceebf 100644 --- a/app/tables/jury_recap.py +++ b/app/tables/jury_recap.py @@ -31,12 +31,9 @@ from app.scodoc.sco_codes_parcours import ( BUT_RCUE_SUFFISANT, ) from app.scodoc import sco_formsemestre_status -from app.scodoc import sco_pvjury from app.scodoc import sco_utils as scu from app.tables.recap import RowRecap, TableRecap -EMO_EMPTY_CODE_JURY = "🏮" # "🍽" "🚨" - class TableJury(TableRecap): """Cette table recap reprend les colonnes du tableau recap, sauf les évaluations, @@ -104,20 +101,22 @@ class TableJury(TableRecap): row.add_cell( "jury_code_sem", "Jury", - jury_code_sem or "🍽", - raw_content=jury_code_sem, + jury_code_sem or "", group="jury_code_sem", + classes=[] if jury_code_sem else ["empty_code"], ) self.foot_title_row.cells["jury_code_sem"].target_attrs[ "title" ] = """Code jury sur le semestre""" + a_saisir = (not res.validations) or (not res.validations.has_decision(etud)) row.add_cell( "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""", group="col_jury_link", + classes=["fontred"] if a_saisir else [], target=url_for( "notes.formsemestre_validation_etud_form", scodoc_dept=g.scodoc_dept, @@ -229,10 +228,13 @@ class RowJury(RowRecap): self.add_cell( col_id + "_code", f"
{rcue.ue_1.acronyme}
{rcue.ue_2.acronyme}
", - dec_rcue.code_valide or EMO_EMPTY_CODE_JURY, - raw_content=dec_rcue.code_valide or "", + dec_rcue.code_valide or "", 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"}, )