Place pour le futur éditeur de partitions

This commit is contained in:
Emmanuel Viennet 2022-07-22 17:37:01 +02:00
parent adc086f83c
commit 2f5a786b2d
5 changed files with 50 additions and 0 deletions

View File

@ -355,6 +355,17 @@ def formsemestre_status_menubar(sem):
menuGroupes.append(
{"title": "Modifier les groupes", "submenu": submenu, "enabled": enabled}
)
menuGroupes.append(
{
"title": "Expérimental: éditeur de partitions",
"endpoint": "scolar.partition_editor",
"args": {"formsemestre_id": formsemestre_id},
"enabled": sco_groups.sco_permissions_check.can_change_groups(
formsemestre_id
),
"helpmsg": "Une spécialité de Mulhouse",
},
)
menuNotes = [
{

View File

@ -0,0 +1 @@
// Editeur de partitions

View File

@ -0,0 +1 @@
// Ici viendra le code de Seb

View File

@ -0,0 +1,6 @@
{# -*- mode: jinja-html -*- #}
<h2>{% if not read_only %}Édition des p{% else %}P{%endif%}artitions</h2>
<div>Une spécialité Mulhousaine vous sera prochainement servie ici</div>

View File

@ -51,6 +51,7 @@ from app.decorators import (
admin_required,
login_required,
)
from app.models import formsemestre
from app.models.etudiants import Identite
from app.models.etudiants import make_etud_args
from app.models.events import ScolarNews
@ -909,6 +910,36 @@ sco_publish(
methods=["GET", "POST"],
)
# Nouvel éditeur de partitions et groupe, @SebL Jul 2022
@bp.route("/partition_editor", methods=["GET", "POST"])
@scodoc
@permission_required(Permission.ScoView)
@scodoc7func
def partition_editor(formsemestre_id: int):
formsemestre: FormSemestre = FormSemestre.query.get_or_404(formsemestre_id)
H = [
html_sco_header.sco_header(
cssstyles=["css/partition_editor.css"],
javascripts=[
"js/partition_editor.js",
],
page_title=f"Partitions de {formsemestre.titre_annee()}",
),
f"""<h2>
</h2>
""",
render_template(
"scolar/partition_editor.html",
formsemestre=formsemestre,
read_only=not sco_groups.sco_permissions_check.can_change_groups(
formsemestre_id
),
),
html_sco_header.sco_footer(),
]
return "\n".join(H)
@bp.route("/create_partition_parcours", methods=["GET", "POST"])
@scodoc