1
0
forked from ScoDoc/ScoDoc

Recap: affichage si aucun inscrit

This commit is contained in:
Emmanuel Viennet 2022-03-27 23:19:17 +02:00
parent ca286288bc
commit 74b432020d
2 changed files with 64 additions and 52 deletions

View File

@ -112,14 +112,19 @@ def formsemestre_recapcomplet(
sco_formsemestre_status.formsemestre_status_head(
formsemestre_id=formsemestre_id
),
]
if len(formsemestre.inscriptions) > 0:
H += [
'<form name="f" method="get" action="%s">' % request.base_url,
'<input type="hidden" name="formsemestre_id" value="%s"></input>'
% formsemestre_id,
'<input type="hidden" name="pref_override" value="0"></input>',
]
if modejury:
H.append(
'<input type="hidden" name="modejury" value="%s"></input>' % modejury
'<input type="hidden" name="modejury" value="%s"></input>'
% modejury
)
H.append(
'<select name="tabformat" onchange="document.f.submit()" class="noprint">'
@ -143,6 +148,7 @@ def formsemestre_recapcomplet(
"""&nbsp;(cliquer sur un nom pour afficher son bulletin ou <a class="stdlink" href="%s/Notes/formsemestre_bulletins_pdf?formsemestre_id=%s">ici avoir le classeur papier</a>)"""
% (scu.ScoURL(), formsemestre_id)
)
data = do_formsemestre_recapcomplet(
formsemestre_id,
format=tabformat,
@ -161,6 +167,7 @@ def formsemestre_recapcomplet(
H.append(data)
if not isFile:
if len(formsemestre.inscriptions) > 0:
H.append("</form>")
H.append(
"""<p><a class="stdlink" href="formsemestre_pvjury?formsemestre_id=%s">Voir les décisions du jury</a></p>"""
@ -1023,6 +1030,11 @@ def gen_formsemestre_recapcomplet_html(
Return: data, filename
"""
rows, footer_rows, titles, column_ids = res.get_table_recap(convert_values=True)
if not rows:
return (
'<div class="table_recap"><div class="message">aucun étudiant !</div></div>',
"",
)
H = ['<div class="table_recap"><table class="table_recap">']
# header
H.append(

View File

@ -2840,7 +2840,7 @@ ul.main li {
#scodoc_admin {
background-color: #EEFFFF;
}
#message {
#message, .message {
margin-top: 2px;
margin-bottom: 0px;
padding: 0.1em;