forked from ScoDoc/ScoDoc
Menu groupes: supprimer liens vers anciennes pages (laissées en bas de l'éditeur de partitions)
This commit is contained in:
parent
26c306cf16
commit
3b99081177
@ -1150,6 +1150,7 @@ class FormSemestre(models.ScoDocModel):
|
|||||||
) -> list[Partition]:
|
) -> list[Partition]:
|
||||||
"""Liste des partitions pour ce semestre (list of dicts),
|
"""Liste des partitions pour ce semestre (list of dicts),
|
||||||
triées par numéro, avec la partition par défaut en fin de liste.
|
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:
|
if only_listed:
|
||||||
partitions = [
|
partitions = [
|
||||||
|
@ -379,33 +379,7 @@ def formsemestre_status_menubar(formsemestre: FormSemestre | None) -> str:
|
|||||||
"enabled": can_change_groups,
|
"enabled": can_change_groups,
|
||||||
"helpmsg": "Editeur de partitions",
|
"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 = [
|
menu_notes = [
|
||||||
{
|
{
|
||||||
|
@ -90,6 +90,31 @@
|
|||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
{% if not read_only %}
|
||||||
|
<div class="scobox space-before-24">
|
||||||
|
<ul>
|
||||||
|
<li><a class="stdlink" href="{{
|
||||||
|
url_for('scolar.edit_partition_form',
|
||||||
|
scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre.id
|
||||||
|
)
|
||||||
|
}}">Ancienne page édition partitions</a>
|
||||||
|
</li>
|
||||||
|
<li>Ancienne page modification groupes:
|
||||||
|
<ul>
|
||||||
|
{% for partition in formsemestre.get_partitions_list(with_default=False) %}
|
||||||
|
<li><a class="stdlink" href="{{
|
||||||
|
url_for('scolar.affect_groups',
|
||||||
|
scodoc_dept=g.scodoc_dept, partition_id=partition.id
|
||||||
|
)
|
||||||
|
}}">{{ partition.partition_name }}</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<script src="{{scu.STATIC_DIR}}/libjs/xlsx-populate-1.21.0.min.js"></script>
|
<script src="{{scu.STATIC_DIR}}/libjs/xlsx-populate-1.21.0.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user