ScoDoc/app/templates/sidebar.j2

110 lines
4.7 KiB
Plaintext
Raw Normal View History

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 #}
<div id="authuser"><a id="authuserlink" href="{{
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>
<br /><a id="deconnectlink" href="{{url_for('auth.logout')}}">déconnexion</a>
2021-12-04 21:06:32 +01:00
</div>
{% block sidebar_dept %}
<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 %}
<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
{% if current_user.has_permission(sco.Permission.AbsChange)%}
<div class="sidebar-item">
<a href="{{url_for('assiduites.bilan_dept', scodoc_dept=g.scodoc_dept)}}">Assiduité</a>
</div>
{% endif %}
{% if current_user.has_permission(sco.Permission.UsersAdmin)
or current_user.has_permission(sco.Permission.UsersView)
2021-12-04 21:06:32 +01: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 %}
{% if current_user.has_permission(sco.Permission.EditPreferences) %}
<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 #}
<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>
<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(
'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 %}
<span title="absences du {{ sco.etud_cur_sem['date_debut'].strftime('%d/%m/%Y') }}
au {{ sco.etud_cur_sem['date_fin'].strftime('%d/%m/%Y') }}" data-tooltip>({{sco.prefs["assi_metrique"]}})
<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>
{% 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,
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">
<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>
<div class="sidebar-item version">
{{ sco.SCOVERSION }}
</div>
{% if DEBUG %}
<div style="color:gold; background-color:navy; margin-top: 8px;">DEBUG</div>
{% endif %}
2021-12-04 21:06:32 +01:00
</div>
2024-03-01 16:04:16 +01:00
<!-- end of sidebar -->