From 3b990811777bd429076ff3ba2d679633d647360d Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 26 Aug 2024 01:47:09 +0200 Subject: [PATCH] =?UTF-8?q?Menu=20groupes:=20supprimer=20liens=20vers=20an?= =?UTF-8?q?ciennes=20pages=20(laiss=C3=A9es=20en=20bas=20de=20l'=C3=A9dite?= =?UTF-8?q?ur=20de=20partitions)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/formsemestre.py | 1 + app/scodoc/sco_formsemestre_status.py | 26 ------------------------ app/templates/scolar/partition_editor.j2 | 25 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/app/models/formsemestre.py b/app/models/formsemestre.py index 9c73cf58a..865352656 100644 --- a/app/models/formsemestre.py +++ b/app/models/formsemestre.py @@ -1150,6 +1150,7 @@ class FormSemestre(models.ScoDocModel): ) -> list[Partition]: """Liste des partitions pour ce semestre (list of dicts), triées par numéro, avec la partition par défaut en fin de liste. + Si only_listed, seulement les partitions indiquées "à lister" (show_in_lists). """ if only_listed: partitions = [ diff --git a/app/scodoc/sco_formsemestre_status.py b/app/scodoc/sco_formsemestre_status.py index 154a55978..ba49dec9d 100755 --- a/app/scodoc/sco_formsemestre_status.py +++ b/app/scodoc/sco_formsemestre_status.py @@ -379,33 +379,7 @@ def formsemestre_status_menubar(formsemestre: FormSemestre | None) -> str: "enabled": can_change_groups, "helpmsg": "Editeur de partitions", }, - { - "title": "Ancienne page édition partitions", - "endpoint": "scolar.edit_partition_form", - "args": {"formsemestre_id": formsemestre_id}, - "enabled": can_change_groups, - }, ] - # 1 item / partition: - partitions = sco_groups.get_partitions_list(formsemestre_id, with_default=False) - submenu = [] - enabled = can_change_groups and partitions - for partition in partitions: - submenu.append( - { - "title": str(partition["partition_name"]), - "endpoint": "scolar.affect_groups", - "args": {"partition_id": partition["partition_id"]}, - "enabled": enabled, - } - ) - menu_groupes.append( - { - "title": "Ancienne page édition groupes", - "submenu": submenu, - "enabled": enabled, - } - ) menu_notes = [ { diff --git a/app/templates/scolar/partition_editor.j2 b/app/templates/scolar/partition_editor.j2 index 66fb7e499..68afc2a3f 100644 --- a/app/templates/scolar/partition_editor.j2 +++ b/app/templates/scolar/partition_editor.j2 @@ -90,6 +90,31 @@ +{% if not read_only %} +
+ +
+{% endif %} +