acces à la page des reglages

This commit is contained in:
Jean-Marie Place 2023-11-18 08:55:23 +01:00
parent ce3452df73
commit f99be92fad
4 changed files with 91 additions and 0 deletions

26
app/but/jury_export.py Normal file
View File

@ -0,0 +1,26 @@
##############################################################################
# ScoDoc
# Copyright (c) 1999 - 2023 Emmanuel Viennet. All rights reserved.
# See LICENSE
##############################################################################
"""Feuille d'export Jury BUT
"""
import datetime
from flask import render_template
from app.models import FormSemestre, FormSemestreInscription
from app.views import ScoData
def feuille_preparation_jury_but(formsemestre_id: int):
formsemestre: FormSemestre = FormSemestre.query.filter_by(
id=formsemestre_id
).first_or_404()
return render_template(
"but/jury_export.j2",
datetime=datetime,
formsemestre=formsemestre,
sco=ScoData(formsemestre=formsemestre),
)

View File

@ -444,6 +444,12 @@ def formsemestre_status_menubar(formsemestre: FormSemestre) -> str:
"args": {"formsemestre_id": formsemestre_id}, "args": {"formsemestre_id": formsemestre_id},
"enabled": not formsemestre.formation.is_apc(), "enabled": not formsemestre.formation.is_apc(),
}, },
{
"title": "Générer feuille préparation Jury (BUT)",
"endpoint": "notes.feuille_preparation_jury_but",
"args": {"formsemestre_id": formsemestre_id},
"enabled": formsemestre.formation.is_apc(),
},
{ {
"title": "Éditer les PV et archiver les résultats", "title": "Éditer les PV et archiver les résultats",
"endpoint": "notes.formsemestre_archive", "endpoint": "notes.formsemestre_archive",

View File

@ -0,0 +1,53 @@
{# -*- mode: jinja-html -*- #}
{% extends "sco_page.j2" %}
{% block styles %}
{{super()}}
{% endblock %}
{% block app_content %}
<releve-but>{{ formsemestre.id }}</releve-but>
{% endblock %}
{% block scripts %}
{{super()}}
{# <script src="{{scu.STATIC_DIR}}/js/releve-but.js"></script>#}
<script>
//let dataSrc = "{{bul_url|safe}}";
//fetch(dataSrc)
// .then(r => { return r.json() })
// .then(json => {
// let releve = document.querySelector("releve-but");
// releve.showData = json;
// // Syle custom à ajouter
// let style = document.createElement("style");
// style.textContent = `
// .module>div,
// .dateInscription,
// .numerosEtudiant,
// .dateNaissance{
// display: none;
// }`;
// releve.shadowRoot.appendChild(style);
// });
// .catch(error => {
// let div = document.createElement("div");
// div.innerText = "Une erreur s'est produite lors du transfert des données.";
// div.style.fontSize = "24px";
// div.style.color = "#d93030";
// let releve = document.querySelector("releve-but");
// releve.after(div);
// releve.remove();
// throw 'Fin du script - données invalides';
// });
document.querySelector("html").style.scrollBehavior = "smooth";
</script>
{% endblock %}

View File

@ -51,6 +51,7 @@ from app.but import (
jury_but_pv, jury_but_pv,
jury_but_validation_auto, jury_but_validation_auto,
jury_but_view, jury_but_view,
jury_export,
) )
from app.but.forms import jury_but_forms from app.but.forms import jury_but_forms
@ -2969,6 +2970,11 @@ sco_publish(
sco_prepajury.feuille_preparation_jury, sco_prepajury.feuille_preparation_jury,
Permission.ScoView, Permission.ScoView,
) )
sco_publish(
"/feuille_preparation_jury_but",
jury_export.feuille_preparation_jury_but,
Permission.ScoView,
)
sco_publish( sco_publish(
"/formsemestre_archive", "/formsemestre_archive",
sco_archives.formsemestre_archive, sco_archives.formsemestre_archive,