Cosmetic: dernières opérations, sidebar, ...

This commit is contained in:
Emmanuel Viennet 2024-08-23 08:39:53 +02:00
parent bdc6c90bfc
commit 478bf80c6b
10 changed files with 66 additions and 29 deletions

View File

@ -271,10 +271,10 @@ class ScolarNews(db.Model):
return "" return ""
dept_news_url = url_for("scolar.dept_news", scodoc_dept=g.scodoc_dept) dept_news_url = url_for("scolar.dept_news", scodoc_dept=g.scodoc_dept)
H = [ H = [
f"""<div class="scobox news"><div class="scobox-title" desktop="true"><a href="{ f"""<div class="scobox news" desktop="true"><div class="scobox-title" desktop="true"><a href="{
dept_news_url dept_news_url
}">Dernières opérations</a> }">Dernières opérations</a>
</div><ul class="newslist" desktop="true">""" </div><ul class="newslist">"""
] ]
for news in news_list: for news in news_list:
@ -286,15 +286,12 @@ class ScolarNews(db.Model):
f"""<li class="newslist"> f"""<li class="newslist">
<span class="newstext"><a href="{dept_news_url}" class="stdlink">...</a> <span class="newstext"><a href="{dept_news_url}" class="stdlink">...</a>
</span> </span>
</li>""" </li>
) </ul>
<ul class="newslist" mobile="true" style="margin-bottom: 0px;">
H.append( <li><a href="{dept_news_url}" class="stdlink">Dernières opérations</a></li>
"""</ul> </ul>
<ul class="newslist" mobile="true" style="margin-bottom: 0px;"> </div>
<li><a href="{dept_news_url}" class="stdlink">Dernières opérations</a></li>
</ul>
</div>
""" """
) )

View File

@ -657,7 +657,7 @@ def formation_list_table(detail: bool) -> GenTable:
"version": "Version", "version": "Version",
"formation_code": "Code", "formation_code": "Code",
"sems_list_txt": "Semestres", "sems_list_txt": "Semestres",
"referentiel": "Réf.", "referentiel": "Réf. Comp.",
"date_fin_dernier_sem": "Fin dernier sem.", "date_fin_dernier_sem": "Fin dernier sem.",
"annee_dernier_sem": "Année dernier sem.", "annee_dernier_sem": "Année dernier sem.",
"semestres_ues": "Semestres avec UEs", "semestres_ues": "Semestres avec UEs",

View File

@ -54,7 +54,7 @@ def index_html(
all_depts = int(all_depts) all_depts = int(all_depts)
with_inactives = int(with_inactives) with_inactives = int(with_inactives)
H = ["<h2>Gestion des utilisateurs</h2>"] H = ["<h1>Gestion des utilisateurs</h1>"]
if current_user.has_permission(Permission.UsersAdmin, g.scodoc_dept): if current_user.has_permission(Permission.UsersAdmin, g.scodoc_dept):
H.append( H.append(
@ -127,7 +127,7 @@ def index_html(
H.append(content) H.append(content)
return render_template( 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"
) )

View File

@ -13,6 +13,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
padding-left: 4px;
} }
.formsemestre-page-header { .formsemestre-page-header {
@ -78,15 +79,25 @@
margin-right: 8px; margin-right: 8px;
} }
.app-corner .scodoc-index, .scodoc-index,
.app-corner .scodoc-index a { .scodoc-index a {
font-size: 14pt; font-size: 14pt;
display: flex; display: flex;
color: rgb(4, 16, 159); color: rgb(4, 16, 159);
justify-content: center;
width: 100%; 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 { .hamburger-menu {
display: none; display: none;
@ -210,20 +221,24 @@ print {
text-decoration: none; text-decoration: none;
} }
#sidebar h2 { #sidebar .sidebar-link-dept {
color: rgb(102, 102, 102); color: rgb(102, 102, 102);
font-weight: bold; font-weight: bold;
font-size: large; font-size: large;
margin-bottom: 0; margin-bottom: 0;
margin-top: 12px;
} }
#sidebar .sidebar-link-dept a:any-link {
text-decoration: none;
}
#sidebar div.sidebar-item { #sidebar div.sidebar-item {
margin-left: 4px; margin-left: 4px;
} }
#sidebar div.sidebar-item a:link, #sidebar div.sidebar-item a:any-link {
#sidebar div.sidebar-item a:link,
#sidebar div.sidebar-item a:visited {
color: rgb(4, 16, 159); color: rgb(4, 16, 159);
text-decoration: none; text-decoration: none;
} }

View File

@ -1,4 +1,4 @@
{% extends "sco_page.j2" %} {% extends "sco_page_dept.j2" %}
{% block styles %} {% block styles %}
{{super()}} {{super()}}
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/css/assiduites.css"> <link rel="stylesheet" href="{{scu.STATIC_DIR}}/css/assiduites.css">

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #} {# -*- mode: jinja-html -*- #}
{% extends "sco_page.j2" %} {% extends "sco_page_dept.j2" %}
{% block styles %} {% block styles %}
{{super()}} {{super()}}
{% endblock %} {% endblock %}

View File

@ -100,6 +100,9 @@
document.getElementById('sidebar').classList.toggle('collapsed'); document.getElementById('sidebar').classList.toggle('collapsed');
document.getElementById('app-content').classList.toggle('collapsed'); document.getElementById('app-content').classList.toggle('collapsed');
document.getElementById('toggle-sidebar-img').classList.toggle('collapsed'); document.getElementById('toggle-sidebar-img').classList.toggle('collapsed');
document.querySelectorAll('.scodoc-index').forEach(element => {
element.classList.toggle('collapsed');
});
} }
</script> </script>

View File

@ -8,5 +8,21 @@
.formsemestre-page-header { .formsemestre-page-header {
display: none; 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;
}
}
</style> </style>
{% endblock %} {% endblock %}

View File

@ -2,9 +2,9 @@
{# -*- mode: jinja-html -*- #} {# -*- mode: jinja-html -*- #}
<!-- sidebar --> <!-- sidebar -->
{# sidebar_common #} {# sidebar_common #}
<h1 mobile="true"> <div class="scodoc-index" mobile="true">
<a href="{{url_for('scodoc.index', scodoc_dept=g.scodoc_dept)}}">ScoDoc</a> <a href="{{url_for('scodoc.index', scodoc_dept=g.scodoc_dept)}}">ScoDoc</a>
</h1> </div>
<div id="authuser"><a id="authuserlink" href="{{ <div id="authuser"><a id="authuserlink" href="{{
url_for('users.user_info_page', scodoc_dept=g.scodoc_dept, user_name=current_user.user_name) url_for('users.user_info_page', scodoc_dept=g.scodoc_dept, user_name=current_user.user_name)
@ -13,8 +13,10 @@
</div> </div>
{% block sidebar_dept %} {% block sidebar_dept %}
<h2><a href="{{ url_for('scolar.index_html', scodoc_dept=g.scodoc_dept) }}" <div class="sidebar-link-dept">
>Dépt. {{ sco.prefs["DeptName"] }}</a></h2> <a href="{{ url_for('scolar.index_html', scodoc_dept=g.scodoc_dept) }}"
>Dépt. {{ sco.prefs["DeptName"] }}</a>
</div>
{% if sco.prefs["DeptIntranetURL"] %} {% if sco.prefs["DeptIntranetURL"] %}
<div class="sidebar-item"> <div class="sidebar-item">
@ -48,6 +50,10 @@
<a href="{{url_for('scolar.edit_preferences', scodoc_dept=g.scodoc_dept)}}">Paramétrage</a> <a href="{{url_for('scolar.edit_preferences', scodoc_dept=g.scodoc_dept)}}">Paramétrage</a>
</div> </div>
{% endif %} {% endif %}
<div class="sidebar-item" mobile="true">
<a href="{{url_for('scolar.dept_news', scodoc_dept=g.scodoc_dept)}}">Dernières Opérations</a>
</div>
{# /sidebar_common #} {# /sidebar_common #}
<div class="box-chercheetud">Chercher étudiant: <div class="box-chercheetud">Chercher étudiant:

View File

@ -676,7 +676,7 @@ def index_html():
return table.make_page(fmt=fmt, filename=f"Formations-{g.scodoc_dept}") return table.make_page(fmt=fmt, filename=f"Formations-{g.scodoc_dept}")
H = [ H = [
f"""<h2>Formations (programmes pédagogiques)</h2> f"""<h1>Formations (programmes pédagogiques)</h1>
<form> <form>
<input type="checkbox" id="detailCheckbox" name="detail" <input type="checkbox" id="detailCheckbox" name="detail"
onchange="this.form.submit();" onchange="this.form.submit();"