From 478bf80c6bf3fc7a5793d32de956f69a52aff6b1 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 23 Aug 2024 08:39:53 +0200 Subject: [PATCH] =?UTF-8?q?Cosmetic:=20derni=C3=A8res=20op=C3=A9rations,?= =?UTF-8?q?=20sidebar,=20...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/events.py | 19 ++++++------- app/scodoc/sco_formations.py | 2 +- app/scodoc/sco_users.py | 4 +-- app/static/css/scodoc97.css | 29 +++++++++++++++----- app/templates/assiduites/pages/bilan_dept.j2 | 2 +- app/templates/dept_news.j2 | 2 +- app/templates/sco_page.j2 | 3 ++ app/templates/sco_page_dept.j2 | 16 +++++++++++ app/templates/sidebar.j2 | 16 +++++++---- app/views/notes.py | 2 +- 10 files changed, 66 insertions(+), 29 deletions(-) diff --git a/app/models/events.py b/app/models/events.py index 3bc853e1..2773a7ec 100644 --- a/app/models/events.py +++ b/app/models/events.py @@ -271,10 +271,10 @@ class ScolarNews(db.Model): return "" dept_news_url = url_for("scolar.dept_news", scodoc_dept=g.scodoc_dept) H = [ - f"""
- -
+ + + + """ ) diff --git a/app/scodoc/sco_formations.py b/app/scodoc/sco_formations.py index 2ac67a98..b05a1b2f 100644 --- a/app/scodoc/sco_formations.py +++ b/app/scodoc/sco_formations.py @@ -657,7 +657,7 @@ def formation_list_table(detail: bool) -> GenTable: "version": "Version", "formation_code": "Code", "sems_list_txt": "Semestres", - "referentiel": "Réf.", + "referentiel": "Réf. Comp.", "date_fin_dernier_sem": "Fin dernier sem.", "annee_dernier_sem": "Année dernier sem.", "semestres_ues": "Semestres avec UEs", diff --git a/app/scodoc/sco_users.py b/app/scodoc/sco_users.py index 90d1688e..c1399dd5 100644 --- a/app/scodoc/sco_users.py +++ b/app/scodoc/sco_users.py @@ -54,7 +54,7 @@ def index_html( all_depts = int(all_depts) with_inactives = int(with_inactives) - H = ["

Gestion des utilisateurs

"] + H = ["

Gestion des utilisateurs

"] if current_user.has_permission(Permission.UsersAdmin, g.scodoc_dept): H.append( @@ -127,7 +127,7 @@ def index_html( H.append(content) return render_template( - "sco_page.j2", content="\n".join(H), title="Gestion des utilisateurs" + "sco_page_dept.j2", content="\n".join(H), title="Gestion des utilisateurs" ) diff --git a/app/static/css/scodoc97.css b/app/static/css/scodoc97.css index 38bfe85b..0e5f1ac5 100644 --- a/app/static/css/scodoc97.css +++ b/app/static/css/scodoc97.css @@ -13,6 +13,7 @@ display: flex; flex-direction: column; justify-content: space-between; + padding-left: 4px; } .formsemestre-page-header { @@ -78,15 +79,25 @@ margin-right: 8px; } -.app-corner .scodoc-index, -.app-corner .scodoc-index a { +.scodoc-index, +.scodoc-index a { font-size: 14pt; display: flex; color: rgb(4, 16, 159); - justify-content: center; width: 100%; } +div.scodoc-index[mobile="true"] a { + justify-content: center; +} + +.scodoc-index a:any-link { + text-decoration: none; +} + +.scodoc-index.collapsed { + display: none; +} .hamburger-menu { display: none; @@ -210,20 +221,24 @@ print { text-decoration: none; } -#sidebar h2 { +#sidebar .sidebar-link-dept { color: rgb(102, 102, 102); font-weight: bold; font-size: large; margin-bottom: 0; + margin-top: 12px; } +#sidebar .sidebar-link-dept a:any-link { + text-decoration: none; +} + + #sidebar div.sidebar-item { margin-left: 4px; } -#sidebar div.sidebar-item a:link, -#sidebar div.sidebar-item a:link, -#sidebar div.sidebar-item a:visited { +#sidebar div.sidebar-item a:any-link { color: rgb(4, 16, 159); text-decoration: none; } diff --git a/app/templates/assiduites/pages/bilan_dept.j2 b/app/templates/assiduites/pages/bilan_dept.j2 index 1407067c..6c180cea 100644 --- a/app/templates/assiduites/pages/bilan_dept.j2 +++ b/app/templates/assiduites/pages/bilan_dept.j2 @@ -1,4 +1,4 @@ -{% extends "sco_page.j2" %} +{% extends "sco_page_dept.j2" %} {% block styles %} {{super()}} diff --git a/app/templates/dept_news.j2 b/app/templates/dept_news.j2 index 23b0ae51..5e132bc7 100644 --- a/app/templates/dept_news.j2 +++ b/app/templates/dept_news.j2 @@ -1,5 +1,5 @@ {# -*- mode: jinja-html -*- #} -{% extends "sco_page.j2" %} +{% extends "sco_page_dept.j2" %} {% block styles %} {{super()}} {% endblock %} diff --git a/app/templates/sco_page.j2 b/app/templates/sco_page.j2 index 43d73a6a..75abae69 100644 --- a/app/templates/sco_page.j2 +++ b/app/templates/sco_page.j2 @@ -100,6 +100,9 @@ document.getElementById('sidebar').classList.toggle('collapsed'); document.getElementById('app-content').classList.toggle('collapsed'); document.getElementById('toggle-sidebar-img').classList.toggle('collapsed'); + document.querySelectorAll('.scodoc-index').forEach(element => { + element.classList.toggle('collapsed'); + }); } diff --git a/app/templates/sco_page_dept.j2 b/app/templates/sco_page_dept.j2 index 84a2293f..3dec68ea 100644 --- a/app/templates/sco_page_dept.j2 +++ b/app/templates/sco_page_dept.j2 @@ -8,5 +8,21 @@ .formsemestre-page-header { display: none; } + +div.scodoc-container > div#app-content { + grid-row-start: 1; + grid-row-end: span 2; +} + +@media (min-width: 769px) { + /* On desktop, we need to adjust the margin to make room for the button << */ + div.scodoc-container > div#app-content.collapsed { + margin-left: 16px; + } + div.scodoc-container > div#app-content { + margin-top: 8px; + } +} + {% endblock %} diff --git a/app/templates/sidebar.j2 b/app/templates/sidebar.j2 index 5621ca4e..eecc6924 100755 --- a/app/templates/sidebar.j2 +++ b/app/templates/sidebar.j2 @@ -2,9 +2,9 @@ {# -*- mode: jinja-html -*- #} {# sidebar_common #} -

+
ScoDoc -

+
Dépt. {{ sco.prefs["DeptName"] }} + {% if sco.prefs["DeptIntranetURL"] %} {% endif %} + + {# /sidebar_common #}
Chercher étudiant: @@ -138,7 +144,7 @@ const sidebarExpanded = sidebar ? sidebar.getAttribute('aria-expanded') === 'true' : false; const formSemestreMenuExpanded = formSemestreMenu ? formSemestreMenu.classList.contains("active") : false; - + let isScrollToggled = document.body.classList.contains("no-scroll"); if (isScrollToggled && !sidebarExpanded && !formSemestreMenuExpanded) { diff --git a/app/views/notes.py b/app/views/notes.py index 3d8746a1..e97bfcdf 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -676,7 +676,7 @@ def index_html(): return table.make_page(fmt=fmt, filename=f"Formations-{g.scodoc_dept}") H = [ - f"""

Formations (programmes pédagogiques)

+ f"""

Formations (programmes pédagogiques)