Cosmetic: edition prog. classiques

This commit is contained in:
Emmanuel Viennet 2022-02-20 15:10:15 +01:00
parent f2c3841db9
commit aa3a2fb3e0
3 changed files with 33 additions and 7 deletions

View File

@ -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:

View File

@ -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("</ul>")
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('<div class="ue_list_tit_sem">%s</div>' % lab)
H.append(
'<div class="ue_list_div"><div class="ue_list_tit_sem">%s</div>' % lab
)
H.append('<ul class="notes_ue_list">')
H.append('<li class="notes_ue_list">')
if iue != 0 and editable:
@ -1015,7 +1015,9 @@ def _ue_table_ues(
H.append(
f"""</ul><ul><li><a href="{url_for('notes.ue_create', scodoc_dept=g.scodoc_dept,
formation_id=ue['formation_id'], semestre_idx=ue['semestre_id'])
}">Ajouter une UE dans le semestre {ue['semestre_id'] or ''}</a></li></ul>"""
}">Ajouter une UE dans le semestre {ue['semestre_id'] or ''}</a></li></ul>
</div>
"""
)
iue += 1

View File

@ -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;