diff --git a/app/forms/main/config_logos.py b/app/forms/main/config_logos.py index 6529907d..31f8bc6f 100644 --- a/app/forms/main/config_logos.py +++ b/app/forms/main/config_logos.py @@ -46,10 +46,8 @@ from app.scodoc.sco_config_actions import LogoInsert from app.scodoc.sco_exceptions import ScoValueError from app.scodoc.sco_logos import find_logo - -JAVASCRIPTS = html_sco_header.BOOTSTRAP_JS + [] - CSSSTYLES = html_sco_header.BOOTSTRAP_CSS +JAVASCRIPTS = html_sco_header.BOOTSTRAP_JS # class ItemForm(FlaskForm): # """Unused Generic class to document common behavior for classes diff --git a/app/scodoc/gen_tables.py b/app/scodoc/gen_tables.py index 9c2c2880..f37a55f6 100644 --- a/app/scodoc/gen_tables.py +++ b/app/scodoc/gen_tables.py @@ -57,7 +57,6 @@ from reportlab.lib.units import cm from flask import render_template -from app.scodoc import html_sco_header from app.scodoc import sco_utils as scu from app.scodoc import sco_excel from app.scodoc import sco_pdf diff --git a/app/scodoc/sco_archives_etud.py b/app/scodoc/sco_archives_etud.py index 9b332b03..b7ff7d32 100644 --- a/app/scodoc/sco_archives_etud.py +++ b/app/scodoc/sco_archives_etud.py @@ -41,10 +41,8 @@ from app.scodoc import sco_groups from app.scodoc import sco_trombino from app.scodoc import sco_archives from app.scodoc.sco_permissions import Permission -from app.scodoc.sco_exceptions import AccessDenied, ScoValueError +from app.scodoc.sco_exceptions import AccessDenied from app.scodoc.TrivialFormulator import TrivialFormulator -from app.scodoc import html_sco_header -from app.scodoc import sco_etud class EtudsArchiver(sco_archives.BaseArchiver): @@ -142,9 +140,6 @@ def etud_upload_file_form(etudid): etud = Identite.get_etud(etudid) H = [ - html_sco_header.sco_header( - page_title=f"Chargement d'un document associé à {etud.nomprenom}", - ), f"""
Le fichier ne doit pas dépasser { @@ -171,8 +166,12 @@ def etud_upload_file_form(etudid): cancelbutton="Annuler", ) if tf[0] == 0: - return "\n".join(H) + tf[1] + html_sco_header.sco_footer() - elif tf[0] == -1: + return render_template( + "sco_page.j2", + title=f"Chargement d'un document associé à {etud.nomprenom}", + content="\n".join(H) + tf[1], + ) + if tf[0] == -1: return flask.redirect(etud.url_fiche()) data = tf[2]["datafile"].read() descr = tf[2]["description"] @@ -263,9 +262,6 @@ def etudarchive_generate_excel_sample(group_id=None): def etudarchive_import_files_form(group_id): """Formulaire pour importation fichiers d'un groupe""" H = [ - html_sco_header.sco_header( - page_title="Import de fichiers associés aux étudiants" - ), """
Les fichiers associés (dossiers d'admission, certificats, ...), de types quelconques (pdf, doc, images) sont accessibles aux utilisateurs via @@ -292,7 +288,6 @@ def etudarchive_import_files_form(group_id): """ % group_id, ] - F = html_sco_header.sco_footer() tf = TrivialFormulator( request.base_url, scu.get_request_args(), @@ -313,7 +308,11 @@ def etudarchive_import_files_form(group_id): ) if tf[0] == 0: - return "\n".join(H) + tf[1] + "" + F + return render_template( + "sco_page.j2", + title="Import de fichiers associés aux étudiants", + content="\n".join(H) + tf[1] + "", + ) # retrouve le semestre à partir du groupe: group = sco_groups.get_group(group_id) if tf[0] == -1: diff --git a/app/scodoc/sco_find_etud.py b/app/scodoc/sco_find_etud.py index eb3fb169..d0cd13bb 100644 --- a/app/scodoc/sco_find_etud.py +++ b/app/scodoc/sco_find_etud.py @@ -309,7 +309,7 @@ def search_etud_by_name(term: str) -> list: # ---------- Recherche sur plusieurs département -def search_etud_in_accessible_depts( +def search_etuds_in_accessible_depts( expnom=None, ) -> tuple[list[list[Identite]], list[str]]: """ @@ -330,14 +330,14 @@ def search_etud_in_accessible_depts( return result, accessible_depts -def table_etud_in_accessible_depts(expnom=None): +def table_etuds_in_accessible_depts(expnom=None): """ Page avec table étudiants trouvés, dans tous les departements. Attention: nous sommes ici au niveau de ScoDoc, pas dans un département """ - result, accessible_depts = search_etud_in_accessible_depts(expnom=expnom) + result, accessible_depts = search_etuds_in_accessible_depts(expnom=expnom) H = [ - f"""