From aa3a2fb3e0efc875139108d4ee60a0f1cf669390 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 20 Feb 2022 15:10:15 +0100 Subject: [PATCH] Cosmetic: edition prog. classiques --- app/scodoc/sco_edit_module.py | 7 +++++-- app/scodoc/sco_edit_ue.py | 10 ++++++---- app/static/css/scodoc.css | 23 ++++++++++++++++++++++- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/app/scodoc/sco_edit_module.py b/app/scodoc/sco_edit_module.py index 2bedc0c11..9c8aa07df 100644 --- a/app/scodoc/sco_edit_module.py +++ b/app/scodoc/sco_edit_module.py @@ -512,8 +512,8 @@ def module_edit(module_id=None): ] else: mat_names = ["%s / %s" % (mat.ue.acronyme, mat.titre or "") for mat in matieres] - ue_mat_ids = ["%s!%s" % (mat.ue.id, mat.id) for mat in matieres] + ue_mat_ids = ["%s!%s" % (mat.ue.id, mat.id) for mat in matieres] module["ue_matiere_id"] = "%s!%s" % (module["ue_id"], module["matiere_id"]) semestres_indices = list(range(1, parcours.NB_SEM + 1)) @@ -741,8 +741,11 @@ def module_edit(module_id=None): else: # l'UE de rattachement peut changer tf[2]["ue_id"], tf[2]["matiere_id"] = tf[2]["ue_matiere_id"].split("!") + x, y = tf[2]["ue_matiere_id"].split("!") + tf[2]["ue_id"] = int(x) + tf[2]["matiere_id"] = int(y) old_ue_id = a_module.ue.id - new_ue_id = int(tf[2]["ue_id"]) + new_ue_id = tf[2]["ue_id"] if (old_ue_id != new_ue_id) and in_use: new_ue = UniteEns.query.get_or_404(new_ue_id) if new_ue.semestre_idx != a_module.ue.semestre_idx: diff --git a/app/scodoc/sco_edit_ue.py b/app/scodoc/sco_edit_ue.py index 061bf43c6..408109122 100644 --- a/app/scodoc/sco_edit_ue.py +++ b/app/scodoc/sco_edit_ue.py @@ -941,13 +941,13 @@ def _ue_table_ues( if cur_ue_semestre_id != ue["semestre_id"]: cur_ue_semestre_id = ue["semestre_id"] - # if iue > 0: - # H.append("") if ue["semestre_id"] == sco_codes_parcours.UE_SEM_DEFAULT: lab = "Pas d'indication de semestre:" else: lab = "Semestre %s:" % ue["semestre_id"] - H.append('
%s
' % lab) + H.append( + '
%s
' % lab + ) H.append('""" + }">Ajouter une UE dans le semestre {ue['semestre_id'] or ''} +
+ """ ) iue += 1 diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index ecd8b0ab0..9079cfa7d 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -1699,7 +1699,7 @@ ul.notes_ue_list { margin-top: 4px; margin-right: 1em; margin-left: 1em; - padding-top: 1em; + /* padding-top: 1em; */ padding-bottom: 1em; font-weight: bold; } @@ -1761,6 +1761,27 @@ ul.notes_module_list { font-style: normal; } +div.ue_list_div { + border: 3px solid rgb(35, 0, 160); + padding-left: 5px; + padding-top: 5px; + margin-bottom: 5px; + margin-right: 5px; +} + +div.ue_list_tit_sem { + font-size: 120%; + font-weight: bold; + color: orangered; + display: list-item; /* This has to be "list-item" */ + list-style-type: disc; /* See https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type */ + list-style-position: inside; +} + +input.sco_tag_checkbox { + margin-bottom: 10px; +} + .notes_ue_list a.stdlink { color: #001084; text-decoration: underline;