forked from ScoDoc/ScoDoc
ne présente plus le lien 'ajouter semestre' si on n'a pas le droit
This commit is contained in:
parent
b841b2f708
commit
0ed2455028
@ -507,6 +507,7 @@ def formation_list_table() -> GenTable:
|
|||||||
)
|
)
|
||||||
|
|
||||||
editable = current_user.has_permission(Permission.EditFormation)
|
editable = current_user.has_permission(Permission.EditFormation)
|
||||||
|
can_implement = current_user.has_permission(Permission.EditFormSemestre)
|
||||||
|
|
||||||
# Traduit/ajoute des champs à afficher:
|
# Traduit/ajoute des champs à afficher:
|
||||||
rows = []
|
rows = []
|
||||||
@ -547,15 +548,18 @@ def formation_list_table() -> GenTable:
|
|||||||
)}">{s.session_id()}</a>"""
|
)}">{s.session_id()}</a>"""
|
||||||
for s in row["formsemestres"]
|
for s in row["formsemestres"]
|
||||||
]
|
]
|
||||||
+ [
|
+ (
|
||||||
f"""<a class="stdlink" id="add-semestre-{
|
[
|
||||||
formation.acronyme.lower().replace(" ", "-")}"
|
f"""<a class="stdlink"
|
||||||
href="{ url_for("notes.formsemestre_createwithmodules",
|
href="{ url_for("notes.formsemestre_createwithmodules",
|
||||||
scodoc_dept=g.scodoc_dept, formation_id=formation.id, semestre_id=1
|
scodoc_dept=g.scodoc_dept, formation_id=formation.id, semestre_id=1
|
||||||
)
|
)
|
||||||
}">ajouter</a>
|
}">ajouter</a>
|
||||||
"""
|
"""
|
||||||
]
|
]
|
||||||
|
if can_implement
|
||||||
|
else []
|
||||||
|
)
|
||||||
)
|
)
|
||||||
if row["formsemestres"]:
|
if row["formsemestres"]:
|
||||||
row["date_fin_dernier_sem"] = (
|
row["date_fin_dernier_sem"] = (
|
||||||
|
Loading…
Reference in New Issue
Block a user