forked from ScoDoc/ScoDoc
Améliore lègèrement présentation page edition formation.
This commit is contained in:
parent
aed7b48fac
commit
ea7ef4f1a5
2
.gitignore
vendored
2
.gitignore
vendored
@ -175,7 +175,7 @@ Thumbs.db
|
|||||||
copy
|
copy
|
||||||
|
|
||||||
# Symlinks static ScoDoc
|
# Symlinks static ScoDoc
|
||||||
app/static/links/[0-9]*.*[0-9]
|
app/static/links/[0-9]*.*
|
||||||
|
|
||||||
# Essais locaux
|
# Essais locaux
|
||||||
xp/
|
xp/
|
||||||
|
@ -255,7 +255,7 @@ class ScoSMTPHandler(SMTPHandler):
|
|||||||
return subject
|
return subject
|
||||||
|
|
||||||
|
|
||||||
class ReverseProxied(object):
|
class ReverseProxied:
|
||||||
"""Adaptateur wsgi qui nous permet d'avoir toutes les URL calculées en https
|
"""Adaptateur wsgi qui nous permet d'avoir toutes les URL calculées en https
|
||||||
sauf quand on est en dev.
|
sauf quand on est en dev.
|
||||||
La variable HTTP_X_FORWARDED_PROTO est positionnée par notre config nginx"""
|
La variable HTTP_X_FORWARDED_PROTO est positionnée par notre config nginx"""
|
||||||
@ -649,8 +649,6 @@ def scodoc_flash_status_messages():
|
|||||||
|
|
||||||
def critical_error(msg):
|
def critical_error(msg):
|
||||||
"""Handle a critical error: flush all caches, display message to the user"""
|
"""Handle a critical error: flush all caches, display message to the user"""
|
||||||
import app.scodoc.sco_utils as scu
|
|
||||||
|
|
||||||
log(f"\n*** CRITICAL ERROR: {msg}")
|
log(f"\n*** CRITICAL ERROR: {msg}")
|
||||||
subject = f"CRITICAL ERROR: {msg}".strip()[:68]
|
subject = f"CRITICAL ERROR: {msg}".strip()[:68]
|
||||||
send_scodoc_alarm(subject, msg)
|
send_scodoc_alarm(subject, msg)
|
||||||
|
@ -958,7 +958,10 @@ du programme" (menu "Semestre") si vous avez un semestre en cours);
|
|||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
H.append("<p><ul>")
|
H.append(
|
||||||
|
"""<div class="scobox formation-actions">
|
||||||
|
<ul>"""
|
||||||
|
)
|
||||||
if has_perm_change:
|
if has_perm_change:
|
||||||
H.append(
|
H.append(
|
||||||
f"""
|
f"""
|
||||||
@ -971,7 +974,7 @@ du programme" (menu "Semestre") si vous avez un semestre en cours);
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
if not len(formsemestres):
|
if formsemestres:
|
||||||
H.append(
|
H.append(
|
||||||
f"""
|
f"""
|
||||||
<li><a class="stdlink" href="{
|
<li><a class="stdlink" href="{
|
||||||
@ -1019,21 +1022,29 @@ du programme" (menu "Semestre") si vous avez un semestre en cours);
|
|||||||
}">Liste détaillée des modules de la formation</a> (debug)
|
}">Liste détaillée des modules de la formation</a> (debug)
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>"""
|
</div>
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
if has_perm_change:
|
if has_perm_change or current_user.has_permission(Permission.EditFormSemestre):
|
||||||
|
H.append("""<div class="scobox">""")
|
||||||
|
if has_perm_change and len(formsemestres):
|
||||||
H.append(
|
H.append(
|
||||||
"""
|
"""
|
||||||
<h3> <a name="sems">Semestres ou sessions de cette formation</a></h3>
|
<div class="scobox-title">
|
||||||
<p><ul>"""
|
<a name="sems">Semestres ou sessions de cette formation</a>
|
||||||
|
</div>
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
H.append("<ul>")
|
||||||
for formsemestre in formsemestres:
|
for formsemestre in formsemestres:
|
||||||
H.append(f"""<li>{formsemestre.html_link_status()}""")
|
H.append(f"""<li>{formsemestre.html_link_status()}""")
|
||||||
if not formsemestre.etat:
|
if not formsemestre.etat:
|
||||||
H.append(" [verrouillé]")
|
H.append(" [verrouillé]")
|
||||||
else:
|
else:
|
||||||
H.append(
|
H.append(
|
||||||
f""" <a class="stdlink" href="{url_for("notes.formsemestre_editwithmodules",
|
f""" <a class="stdlink"
|
||||||
|
href="{url_for("notes.formsemestre_editwithmodules",
|
||||||
scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre.id
|
scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre.id
|
||||||
)}">Modifier</a>"""
|
)}">Modifier</a>"""
|
||||||
)
|
)
|
||||||
@ -1050,7 +1061,7 @@ du programme" (menu "Semestre") si vous avez un semestre en cours);
|
|||||||
</li>
|
</li>
|
||||||
</ul>"""
|
</ul>"""
|
||||||
)
|
)
|
||||||
# <li>(debug) <a class="stdlink" href="check_form_integrity?formation_id=%(formation_id)s">Vérifier cohérence</a></li>
|
H.append("</div>")
|
||||||
|
|
||||||
warn, _ = sco_formsemestre_validation.check_formation_ues(formation)
|
warn, _ = sco_formsemestre_validation.check_formation_ues(formation)
|
||||||
H.append(warn)
|
H.append(warn)
|
||||||
@ -1128,7 +1139,9 @@ def _ue_table_ues(
|
|||||||
scodoc_dept=g.scodoc_dept,
|
scodoc_dept=g.scodoc_dept,
|
||||||
ue_id=ue["ue_id"],
|
ue_id=ue["ue_id"],
|
||||||
)
|
)
|
||||||
ue["code_apogee_str"] = f""", Apo: <span
|
ue[
|
||||||
|
"code_apogee_str"
|
||||||
|
] = f""", Apo: <span
|
||||||
class="{klass}" data-url="{edit_url}" id="{ue['ue_id']}"
|
class="{klass}" data-url="{edit_url}" id="{ue['ue_id']}"
|
||||||
data-placeholder="{scu.APO_MISSING_CODE_STR}">{
|
data-placeholder="{scu.APO_MISSING_CODE_STR}">{
|
||||||
ue["code_apogee"] or ""
|
ue["code_apogee"] or ""
|
||||||
|
@ -215,3 +215,7 @@ span.formation_module_ue {
|
|||||||
span.notes_module_list_buts {
|
span.notes_module_list_buts {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.formation-actions li {
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
@ -4,5 +4,5 @@ Architecture: amd64
|
|||||||
Maintainer: Emmanuel Viennet <emmanuel@viennet.net>
|
Maintainer: Emmanuel Viennet <emmanuel@viennet.net>
|
||||||
Description: ScoDoc 9
|
Description: ScoDoc 9
|
||||||
Un logiciel pour le suivi de la scolarité universitaire.
|
Un logiciel pour le suivi de la scolarité universitaire.
|
||||||
Depends: adduser, curl, gcc, graphviz, graphviz-dev, libpq-dev, postfix|exim4, cracklib-runtime, libcrack2-dev, libpango-1.0-0, pango1.0-tools, python3-dev, python3-venv, python3-pip, python3-wheel, nginx, postgresql, libpq-dev, redis
|
Depends: adduser, curl, gcc, graphviz, graphviz-dev, postfix|exim4, cracklib-runtime, libcrack2-dev, libpango-1.0-0, pango1.0-tools, python3-dev, python3-venv, python3-pip, python3-wheel, nginx, postgresql, libpq-dev, redis
|
||||||
Recommends: ufw
|
Recommends: ufw
|
||||||
|
Loading…
Reference in New Issue
Block a user