From ce3452df73ddaeb95a439f5edfdabb9ddea07637 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 17 Nov 2023 17:00:15 +0100 Subject: [PATCH] Fix: groups_view tabs html --- app/scodoc/sco_groups_view.py | 83 ++++++++++++++++------------------- 1 file changed, 39 insertions(+), 44 deletions(-) diff --git a/app/scodoc/sco_groups_view.py b/app/scodoc/sco_groups_view.py index b04741349..0e4b8ac23 100644 --- a/app/scodoc/sco_groups_view.py +++ b/app/scodoc/sco_groups_view.py @@ -106,57 +106,52 @@ def groups_view( with_bourse=with_bourse, ) - H = [ - html_sco_header.sco_header( - javascripts=JAVASCRIPTS, - cssstyles=CSSSTYLES, - init_qtip=True, - ) - ] - # Menu choix groupe - H.append("""
""") - H.append(form_groups_choice(groups_infos, submit_on_change=True)) # Note: le formulaire est soumis a chaque modif des groupes # on pourrait faire comme pour le form de saisie des notes. Il faudrait pour cela: # - charger tous les etudiants au debut, quels que soient les groupes selectionnés # - ajouter du JS pour modifier les liens (arguments group_ids) quand le menu change - # Tabs - H.extend( - ( - """ + return f""" + { html_sco_header.sco_header( + javascripts=JAVASCRIPTS, + cssstyles=CSSSTYLES, + init_qtip=True, + ) + } +
+ + {form_groups_choice(groups_infos, submit_on_change=True)} +
-
- """, - groups_table( - groups_infos=groups_infos, - fmt=fmt, - with_codes=with_codes, - etat=etat, - with_paiement=with_paiement, - with_archives=with_archives, - with_annotations=with_annotations, - with_bourse=with_bourse, - ), - "
", - """
""", - tab_photos_html(groups_infos, etat=etat), - #'

hello

', - "
", - '
', - tab_absences_html(groups_infos, etat=etat), - "
", - ) - ) - - H.append(html_sco_header.sco_footer()) - return "\n".join(H) +
+ { + groups_table( + groups_infos=groups_infos, + fmt=fmt, + with_codes=with_codes, + etat=etat, + with_paiement=with_paiement, + with_archives=with_archives, + with_annotations=with_annotations, + with_bourse=with_bourse, + ) + } +
+
+ { tab_photos_html(groups_infos, etat=etat) } +
+
+ { tab_absences_html(groups_infos, etat=etat) } +
+
+ { html_sco_header.sco_footer() } + """ def form_groups_choice( @@ -751,7 +746,7 @@ def groups_table( H.append("") - return "".join(H) + "
" + return "".join(H) elif ( fmt == "pdf"