From 20c8f22c7b55127367a61440fc82ce0cd689c330 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 5 Jan 2022 21:44:22 +0100 Subject: [PATCH] =?UTF-8?q?cosm=C3=A9tique=20accueil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_preferences.py | 3 ++- app/static/css/scodoc.css | 11 +++++++++++ app/templates/scodoc.html | 8 +++++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_preferences.py b/app/scodoc/sco_preferences.py index cc99be082..da3e1a4ef 100644 --- a/app/scodoc/sco_preferences.py +++ b/app/scodoc/sco_preferences.py @@ -279,6 +279,7 @@ class BasePreferences(object): { "initvalue": "Dept", "title": "Nom abrégé du département", + "explanation": "acronyme: par exemple R&T, ORTF, HAL", "size": 12, "category": "general", "only_global": True, @@ -289,7 +290,7 @@ class BasePreferences(object): { "initvalue": "nom du département", "title": "Nom complet du département", - "explanation": "inutilisé par défaut", + "explanation": "apparaît sur la page d'accueil", "size": 40, "category": "general", "only_global": True, diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index 58f819c5b..72a918a69 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -239,6 +239,17 @@ div.box-chercheetud { margin-top: 12px; } +/* Page accueil général */ +span.dept_full_name { + font-style: italic; +} +span.dept_visible { + color: rgb(6, 158, 6); +} +span.dept_cache { + color: rgb(194, 5, 5); +} + div.table_etud_in_accessible_depts { margin-left: 3em; margin-bottom: 2em; diff --git a/app/templates/scodoc.html b/app/templates/scodoc.html index d5e453009..d48e7f5ad 100644 --- a/app/templates/scodoc.html +++ b/app/templates/scodoc.html @@ -17,11 +17,13 @@ Département {{dept.preferences.filter_by(name="DeptName").first().value}} - {{ dept.preferences.filter_by( name="DeptFullName" ).first().value or "" }} + + {{ dept.preferences.filter_by( name="DeptFullName" ).first().value or "" }} + {% if current_user.is_administrator() %} - - {% if dept.visible %}visible{% else %}caché aux utilisateurs{% endif %} + visible{% else %}class="dept_cache">caché aux utilisateurs{% endif %} + {% if dept.visible %}cacher{% else %}rendre visible{% endif %}