From c215d56461b9adfe96506240974f4b8d9211f969 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 23 Jan 2023 18:11:24 -0300 Subject: [PATCH] =?UTF-8?q?Fix=20#570=20liens=20PREV/NEXT=20si=20un=20seul?= =?UTF-8?q?=20=C3=A9tudiant=20dans=20le=20semestre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/notes.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/views/notes.py b/app/views/notes.py index 743dee2cc..2e20e2830 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -2350,7 +2350,7 @@ def formsemestre_validation_but( etud: Identite = Identite.query.filter_by( id=etudid, dept_id=g.scodoc_dept_id ).first_or_404() - + nb_etuds = formsemestre.etuds.count() # la route ne donne pas le type d'etudid pour pouvoir construire des URLs # provisoires avec NEXT et PREV try: @@ -2360,16 +2360,24 @@ def formsemestre_validation_but( read_only = not sco_permissions_check.can_validate_sem(formsemestre_id) # --- Navigation - prev_lnk = f"""{scu.EMO_PREV_ARROW} précédent """ - next_lnk = f"""suivant {scu.EMO_NEXT_ARROW} """ + if nb_etuds > 1 + else "" + ) navigation_div = f"""