From dc009856d62df331d9b21ef32e3d990e0bae15bb Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 30 Oct 2024 23:08:35 +0100 Subject: [PATCH] =?UTF-8?q?Synchro=20Apog=C3=A9e:=20listes=20d'=C3=A9tudia?= =?UTF-8?q?nts=20en=20tables=20triables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_inscr_passage.py | 75 ++++++++++++++------- app/scodoc/sco_synchro_etuds.py | 4 +- app/static/css/scodoc.css | 32 +++++++++ app/templates/formsemestre/synchro_etuds.j2 | 16 +++++ 4 files changed, 100 insertions(+), 27 deletions(-) create mode 100644 app/templates/formsemestre/synchro_etuds.j2 diff --git a/app/scodoc/sco_inscr_passage.py b/app/scodoc/sco_inscr_passage.py index e88fa7968..9e690f301 100644 --- a/app/scodoc/sco_inscr_passage.py +++ b/app/scodoc/sco_inscr_passage.py @@ -684,13 +684,30 @@ def etuds_select_box( ) if sel_inscrits: H.append( - f"""inscrits""" + f"""inscrits""" ) if with_checkbox or sel_inscrits: H.append(")") if xls_url: H.append(f'{scu.ICON_XLS} ') H.append("") + checkbox_title = "" if with_checkbox else "" + H.append( + f""" + + + + {checkbox_title} + + + + + + + """ + ) for etud in etuds: is_inscrit = etud.get("inscrit", False) extra_class = ( @@ -708,6 +725,10 @@ def etuds_select_box( extra_class=extra_class, ) ) + H.append( + """ +
ÉtapeNomPaiementFinalisé
""" + ) H.append("") return "\n".join(H) @@ -737,32 +758,34 @@ def _etud_row( # ce n'est pas un etudiant ScoDoc elink = nomprenom - if etud.get("datefinalisationinscription", None): - elink += ( - '' - + " : inscription finalisée le " - + etud["datefinalisationinscription"].strftime(scu.DATE_FMT) - + "" - ) + checkbox_cell = ( + f""" + + """ + if with_checkbox + else "" + ) + paiement = etud.get("paiementinscription", True) + datefinalisation = etud.get("datefinalisationinscription") + H.append( + f""" + + {etud.get("etape", "") or ""} + {checkbox_cell} + {elink} + { + '' if paiement else 'non paiement' + } + {"inscription finalisée le " + datefinalisation.strftime(scu.DATE_FMT) + if datefinalisation else "" } + + + """ + ) - if not etud.get("paiementinscription", True): - elink += ' (non paiement)' - - H.append(f"""
""") - if "etape" in etud: - etape_str = etud["etape"] or "" - else: - etape_str = "" - H.append(f"""{etape_str}""") - if with_checkbox: - H.append( - f"""""" - ) - H.append(elink) - if with_checkbox: - H.append("""""") - H.append("
") return "\n".join(H) diff --git a/app/scodoc/sco_synchro_etuds.py b/app/scodoc/sco_synchro_etuds.py index 73bbe9289..4f7168f61 100644 --- a/app/scodoc/sco_synchro_etuds.py +++ b/app/scodoc/sco_synchro_etuds.py @@ -299,7 +299,9 @@ def formsemestre_synchro_etuds( ) return render_template( - "sco_page.j2", title="Synchronisation des étudiants", content="\n".join(H) + "formsemestre/synchro_etuds.j2", + title="Synchronisation des étudiants", + content="\n".join(H), ) diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index bcba9fb3e..12760fe33 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -3812,11 +3812,13 @@ div.link_defaillance { } div.pas_sembox { + width: fit-content; margin-top: 10px; border: 2px solid #a0522d; padding: 5px; margin-right: 10px; font-family: arial, verdana, sans-serif; + background-color: #f7f7f7; } span.sp_etape { @@ -3846,8 +3848,38 @@ span.paspaye a { color: #9400d3 !important; } +table.etuds-box { + border-collapse: collapse; +} + +table.etuds-box th, +table.etuds-box tbody tr td { + padding: 4px; + text-align: left; +} + +table.etuds-box th { + background-color: #f2f2f2; +} + +table.etuds-box td.etape { + font-family: monospace; +} + +table.etuds-box td.paiement, +table.etuds-box td.finalise { + padding-left: 8px; + padding-right: 8px; +} + +table.etuds-box td.paiement.paspaye { + color: #9400d3 !important; +} + +table.etuds-box td.finalise, span.finalisationinscription { color: green; + font-weight: normal; } .pas_sembox_title a { diff --git a/app/templates/formsemestre/synchro_etuds.j2 b/app/templates/formsemestre/synchro_etuds.j2 new file mode 100644 index 000000000..2ee62ce74 --- /dev/null +++ b/app/templates/formsemestre/synchro_etuds.j2 @@ -0,0 +1,16 @@ +{% extends "sco_page.j2" %} +{% import 'wtf.j2' as wtf %} + +{% block scripts %} +{{ super() }} + +{% endblock %} \ No newline at end of file