forked from ScoDoc/ScoDoc
Fix: groups_view tabs html
This commit is contained in:
parent
66f3cc97e0
commit
ce3452df73
@ -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("""<div id="group-tabs">""")
|
||||
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(
|
||||
(
|
||||
"""<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-listes" data-toggle="tab">Listes</a></li>
|
||||
<li><a href="#tab-photos" data-toggle="tab">Photos</a></li>
|
||||
<li><a href="#tab-abs" data-toggle="tab">Absences et feuilles...</a></li>
|
||||
</ul>
|
||||
return f"""
|
||||
{ html_sco_header.sco_header(
|
||||
javascripts=JAVASCRIPTS,
|
||||
cssstyles=CSSSTYLES,
|
||||
init_qtip=True,
|
||||
)
|
||||
}
|
||||
<div id="group-tabs">
|
||||
<!-- Menu choix groupe -->
|
||||
{form_groups_choice(groups_infos, submit_on_change=True)}
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-listes" data-toggle="tab">Listes</a></li>
|
||||
<li><a href="#tab-photos" data-toggle="tab">Photos</a></li>
|
||||
<li><a href="#tab-abs" data-toggle="tab">Absences et feuilles...</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-listes">
|
||||
""",
|
||||
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,
|
||||
),
|
||||
"</div>",
|
||||
"""<div class="tab-pane" id="tab-photos">""",
|
||||
tab_photos_html(groups_infos, etat=etat),
|
||||
#'<p>hello</p>',
|
||||
"</div>",
|
||||
'<div class="tab-pane" id="tab-abs">',
|
||||
tab_absences_html(groups_infos, etat=etat),
|
||||
"</div>",
|
||||
)
|
||||
)
|
||||
|
||||
H.append(html_sco_header.sco_footer())
|
||||
return "\n".join(H)
|
||||
<div class="tab-pane active" id="tab-listes">
|
||||
{
|
||||
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,
|
||||
)
|
||||
}
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-photos">
|
||||
{ tab_photos_html(groups_infos, etat=etat) }
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-abs">
|
||||
{ tab_absences_html(groups_infos, etat=etat) }
|
||||
</div>
|
||||
</div>
|
||||
{ html_sco_header.sco_footer() }
|
||||
"""
|
||||
|
||||
|
||||
def form_groups_choice(
|
||||
@ -751,7 +746,7 @@ def groups_table(
|
||||
|
||||
H.append("</ul>")
|
||||
|
||||
return "".join(H) + "</div>"
|
||||
return "".join(H)
|
||||
|
||||
elif (
|
||||
fmt == "pdf"
|
||||
|
Loading…
Reference in New Issue
Block a user