forked from ScoDoc/ScoDoc
Place pour le futur éditeur de partitions
This commit is contained in:
parent
adc086f83c
commit
2f5a786b2d
@ -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 = [
|
||||
{
|
||||
|
1
app/static/css/partition_editor.css
Normal file
1
app/static/css/partition_editor.css
Normal file
@ -0,0 +1 @@
|
||||
// Editeur de partitions
|
1
app/static/js/partition_editor.js
Normal file
1
app/static/js/partition_editor.js
Normal file
@ -0,0 +1 @@
|
||||
// Ici viendra le code de Seb
|
6
app/templates/scolar/partition_editor.html
Normal file
6
app/templates/scolar/partition_editor.html
Normal 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>
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user