2021-12-04 21:06:32 +01:00
|
|
|
{# Barre marge gauche ScoDoc #}
|
2021-12-28 16:17:07 +01:00
|
|
|
{# -*- mode: jinja-html -*- #}
|
2021-12-04 21:06:32 +01:00
|
|
|
<!-- sidebar -->
|
|
|
|
{# sidebar_common #}
|
2024-08-14 14:44:19 +02:00
|
|
|
<h1 mobile="true">
|
2024-08-23 16:24:23 +02:00
|
|
|
<a href="{{url_for('scodoc.index', scodoc_dept=g.scodoc_dept)}}">ScoDoc</a>
|
2024-08-14 14:44:19 +02:00
|
|
|
</h1>
|
|
|
|
|
2021-12-04 21:06:32 +01:00
|
|
|
<div id="authuser"><a id="authuserlink" href="{{
|
2022-01-05 23:57:33 +01:00
|
|
|
url_for('users.user_info_page', scodoc_dept=g.scodoc_dept, user_name=current_user.user_name)
|
2021-12-26 19:15:47 +01:00
|
|
|
}}">{{current_user.user_name}}</a>
|
2022-01-05 23:57:33 +01:00
|
|
|
<br /><a id="deconnectlink" href="{{url_for('auth.logout')}}">déconnexion</a>
|
2021-12-04 21:06:32 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% block sidebar_dept %}
|
2024-07-22 16:53:50 +02:00
|
|
|
<h2><a href="{{ url_for('scolar.index_html', scodoc_dept=g.scodoc_dept) }}"
|
|
|
|
>Dépt. {{ sco.prefs["DeptName"] }}</a></h2>
|
|
|
|
|
|
|
|
{% if sco.prefs["DeptIntranetURL"] %}
|
|
|
|
<div class="sidebar-item">
|
|
|
|
<a href="{{ sco.prefs['DeptIntranetURL'] }}">{{ sco.prefs["DeptIntranetTitle"] }}</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-12-04 21:06:32 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
2024-07-22 16:53:50 +02:00
|
|
|
<div class="sidebar-item">
|
|
|
|
<a href="{{url_for('scolar.index_html', scodoc_dept=g.scodoc_dept)}}">Semestres</a>
|
|
|
|
</div>
|
|
|
|
<div class="sidebar-item">
|
|
|
|
<a href="{{url_for('notes.index_html', scodoc_dept=g.scodoc_dept)}}">Formations</a>
|
|
|
|
</div>
|
2021-12-04 21:06:32 +01:00
|
|
|
|
2023-09-29 21:17:31 +02:00
|
|
|
{% if current_user.has_permission(sco.Permission.AbsChange)%}
|
2024-07-22 16:53:50 +02:00
|
|
|
<div class="sidebar-item">
|
|
|
|
<a href="{{url_for('assiduites.bilan_dept', scodoc_dept=g.scodoc_dept)}}">Assiduité</a>
|
|
|
|
</div>
|
2023-07-25 19:59:47 +02:00
|
|
|
{% endif %}
|
2023-09-29 21:17:31 +02:00
|
|
|
{% if current_user.has_permission(sco.Permission.UsersAdmin)
|
|
|
|
or current_user.has_permission(sco.Permission.UsersView)
|
2021-12-04 21:06:32 +01:00
|
|
|
%}
|
2024-07-22 16:53:50 +02:00
|
|
|
<div class="sidebar-item">
|
|
|
|
<a href="{{url_for('users.index_html', scodoc_dept=g.scodoc_dept)}}">Utilisateurs</a>
|
|
|
|
</div>
|
2021-12-04 21:06:32 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2023-09-29 21:17:31 +02:00
|
|
|
{% if current_user.has_permission(sco.Permission.EditPreferences) %}
|
2024-07-22 16:53:50 +02:00
|
|
|
<div class="sidebar-item">
|
|
|
|
<a href="{{url_for('scolar.edit_preferences', scodoc_dept=g.scodoc_dept)}}">Paramétrage</a>
|
|
|
|
</div>
|
2021-12-04 21:06:32 +01:00
|
|
|
{% endif %}
|
|
|
|
{# /sidebar_common #}
|
|
|
|
|
2024-07-22 16:53:50 +02:00
|
|
|
<div class="box-chercheetud">Chercher étudiant:
|
2021-12-26 19:15:47 +01:00
|
|
|
<form method="get" id="form-chercheetud"
|
|
|
|
action="{{ url_for('scolar.search_etud_in_dept', scodoc_dept=g.scodoc_dept) }}">
|
|
|
|
<div>
|
2022-04-08 16:36:56 +02:00
|
|
|
<input type="text" size="12" class="in-expnom" name="expnom" spellcheck="false" />
|
2021-12-26 19:15:47 +01:00
|
|
|
</div>
|
|
|
|
</form>
|
2021-12-04 21:06:32 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="etud-insidebar">
|
2021-12-26 19:15:47 +01:00
|
|
|
{% if sco.etud %}
|
|
|
|
<h2 id="insidebar-etud"><a href="{{url_for(
|
2024-01-20 14:49:36 +01:00
|
|
|
'scolar.fiche_etud', scodoc_dept=g.scodoc_dept, etudid=sco.etud.id )}}" class="sidebar">
|
2021-12-26 19:15:47 +01:00
|
|
|
<span class="fontred">{{sco.etud.nomprenom}}</span></a>
|
|
|
|
</h2>
|
|
|
|
<b>Absences</b>
|
2021-12-04 21:06:32 +01:00
|
|
|
{% if sco.etud_cur_sem %}
|
2024-03-01 12:35:13 +01:00
|
|
|
<span title="absences du {{ sco.etud_cur_sem['date_debut'].strftime('%d/%m/%Y') }}
|
2024-05-24 10:26:47 +02:00
|
|
|
au {{ sco.etud_cur_sem['date_fin'].strftime('%d/%m/%Y') }}" data-tooltip>({{sco.prefs["assi_metrique"]}})
|
2024-04-06 12:16:53 +02:00
|
|
|
<br />{{'%1g'|format(sco.nb_abs_just)}} J., {{'%1g'|format(sco.nb_abs_nj)}} N.J.</span>
|
2021-12-04 21:06:32 +01:00
|
|
|
{% endif %}
|
2021-12-26 19:15:47 +01:00
|
|
|
<ul>
|
2023-09-29 21:17:31 +02:00
|
|
|
{% if current_user.has_permission(sco.Permission.AbsChange) %}
|
2023-12-05 21:04:38 +01:00
|
|
|
<li><a href="{{ url_for('assiduites.ajout_assiduite_etud', scodoc_dept=g.scodoc_dept,
|
2021-12-04 21:06:32 +01:00
|
|
|
etudid=sco.etud.id) }}">Ajouter</a></li>
|
2023-06-20 15:50:56 +02:00
|
|
|
<li><a href="{{ url_for('assiduites.ajout_justificatif_etud', scodoc_dept=g.scodoc_dept,
|
2021-12-04 21:06:32 +01:00
|
|
|
etudid=sco.etud.id) }}">Justifier</a></li>
|
2021-12-26 19:15:47 +01:00
|
|
|
{% if sco.prefs["handle_billets_abs"] %}
|
2023-12-05 21:04:38 +01:00
|
|
|
<li><a href="{{ url_for('absences.billets_etud', scodoc_dept=g.scodoc_dept,
|
2021-12-04 21:06:32 +01:00
|
|
|
etudid=sco.etud.id) }}">Billets</a></li>
|
2021-12-26 19:15:47 +01:00
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2023-12-12 03:05:31 +01:00
|
|
|
<li><a href="{{ url_for('assiduites.calendrier_assi_etud', scodoc_dept=g.scodoc_dept,
|
2021-12-04 21:06:32 +01:00
|
|
|
etudid=sco.etud.id) }}">Calendrier</a></li>
|
2023-12-05 21:04:38 +01:00
|
|
|
<li><a href="{{ url_for('assiduites.bilan_etud', scodoc_dept=g.scodoc_dept,
|
2024-05-24 10:26:47 +02:00
|
|
|
etudid=sco.etud.id) }}" title="Les pages bilan et liste ont été fusionnées">Liste/Bilan</a></li>
|
2021-12-26 19:15:47 +01:00
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
</div> {# /etud-insidebar #}
|
2021-12-04 21:06:32 +01:00
|
|
|
|
|
|
|
{# LOGO #}
|
|
|
|
<div class="logo-insidebar">
|
2024-07-22 16:53:50 +02:00
|
|
|
<div class="sidebar-bottom">
|
|
|
|
<div class="sidebar-item">
|
|
|
|
<a href="{{ url_for( 'scodoc.about', scodoc_dept=g.scodoc_dept ) }}">À propos</a>
|
|
|
|
</div>
|
|
|
|
<div class="sidebar-item">
|
|
|
|
<a href="{{ scu.SCO_USER_MANUAL }}" target="_blank" rel="noopener">Aide</a>
|
|
|
|
</div>
|
2021-12-04 21:06:32 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="logo-logo">
|
|
|
|
<a href="{{ url_for( 'scodoc.about', scodoc_dept=g.scodoc_dept ) }}">
|
2023-04-14 23:36:36 +02:00
|
|
|
{{ scu.icontag("scologo_img", no_size=True) | safe}}</a>
|
2024-07-22 16:53:50 +02:00
|
|
|
<div class="sidebar-item version">
|
|
|
|
{{ sco.SCOVERSION }}
|
|
|
|
</div>
|
2024-07-21 07:49:58 +02:00
|
|
|
{% if DEBUG %}
|
2024-07-22 16:53:50 +02:00
|
|
|
<div style="color:gold; background-color:navy; margin-top: 8px;">DEBUG</div>
|
2024-07-21 07:49:58 +02:00
|
|
|
{% endif %}
|
2021-12-04 21:06:32 +01:00
|
|
|
</div>
|
2024-08-14 14:44:19 +02:00
|
|
|
<!-- end of sidebar -->
|
|
|
|
|
|
|
|
<script>
|
|
|
|
// Mobile Sidebar Toggle
|
|
|
|
|
|
|
|
function toggleSidebarOffCanvas() {
|
|
|
|
// vérification de la taille de l'écran, si faux ne fait rien
|
|
|
|
if (window.innerWidth > 768) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
const sidebar = document.querySelector('#sidebar');
|
|
|
|
const expanded = sidebar.getAttribute('aria-expanded') === 'true';
|
|
|
|
sidebar.setAttribute('aria-expanded', !expanded);
|
2024-08-19 18:22:40 +02:00
|
|
|
toggleScroll();
|
|
|
|
}
|
|
|
|
|
|
|
|
function toggleScroll(){
|
|
|
|
|
|
|
|
const changeScroll = (b) => {
|
|
|
|
document.querySelectorAll("body, html").forEach(el => el.classList.toggle("no-scroll", b));
|
|
|
|
}
|
|
|
|
|
|
|
|
const sidebar = document.querySelector('#sidebar');
|
|
|
|
const formSemestreMenu = document.querySelector('.sco-formsemestre-menu-menu');
|
|
|
|
|
|
|
|
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) {
|
|
|
|
changeScroll(false);
|
|
|
|
}
|
|
|
|
else if (!isScrollToggled && (sidebarExpanded || formSemestreMenuExpanded)) {
|
|
|
|
changeScroll(true);
|
|
|
|
}
|
2024-08-14 14:44:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|