diff --git a/app/scodoc/html_sidebar.py b/app/scodoc/html_sidebar.py index 8edd0dda6..70efb1605 100644 --- a/app/scodoc/html_sidebar.py +++ b/app/scodoc/html_sidebar.py @@ -28,9 +28,8 @@ """ Génération de la "sidebar" (marge gauche des pages HTML) """ -from flask import url_for -from flask import g -from flask import request +from flask import render_template, url_for +from flask import g, request from flask_login import current_user import app.scodoc.sco_utils as scu @@ -168,19 +167,7 @@ def sidebar(): def sidebar_dept(): """Partie supérieure de la marge de gauche""" - H = [ - f"""

Dépt. {sco_preferences.get_preference("DeptName")}

-Accueil
""" - ] - dept_intranet_url = sco_preferences.get_preference("DeptIntranetURL") - if dept_intranet_url: - H.append( - f"""{ - sco_preferences.get_preference("DeptIntranetTitle")}
""" - ) - # Entreprises pas encore supporté en ScoDoc8 - # H.append( - # """
Entreprises
""" - # % infos - # ) - return "\n".join(H) + return render_template( + "sidebar_dept.html", + prefs=sco_preferences.SemPreferences(), + ) diff --git a/app/templates/sidebar_dept.html b/app/templates/sidebar_dept.html new file mode 100644 index 000000000..e54cce792 --- /dev/null +++ b/app/templates/sidebar_dept.html @@ -0,0 +1,12 @@ +

Dépt. {{ prefs["DeptName"] }}

+Accueil
+ {% if prefs["DeptIntranetURL"] %} + + {{ prefs["DeptIntranetTitle"] }} + {% endif %} +
+ +{# +# Entreprises pas encore supporté en ScoDoc8 +#
Entreprises
+#} \ No newline at end of file