forked from ScoDoc/ScoDoc
322 lines
9.0 KiB
Django/Jinja
322 lines
9.0 KiB
Django/Jinja
{# page accueil département #}
|
|
|
|
{% extends "sco_page_dept.j2" %}
|
|
|
|
{% block app_content %}
|
|
<style>
|
|
|
|
table.listesems tr td.datesem {
|
|
white-space: nowrap;
|
|
padding-left: 8px;
|
|
}
|
|
table.listesems tr td.titresem {
|
|
padding-left: 6px;
|
|
}
|
|
.table-formsemestres-titre {
|
|
font-weight: bold;
|
|
font-size: 110%;
|
|
}
|
|
div.semlist {
|
|
padding-right: 8px;
|
|
}
|
|
|
|
table.semlist tr td.datesem {
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
table.semlist tr td.semestre_id_n {
|
|
text-align: center;
|
|
}
|
|
table.semlist tr td.nb_inscrits {
|
|
text-align: center;
|
|
}
|
|
|
|
|
|
div#gtrcontent table.semlist tbody tr.css_S-1 td {
|
|
background-color:rgb(176, 214, 226);
|
|
}
|
|
|
|
div#gtrcontent table.semlist tbody tr.css_S1 td {
|
|
background-color:#e9efef;
|
|
}
|
|
|
|
div#gtrcontent table.semlist tbody tr.css_S2 td {
|
|
background-color: #d4ebd7;
|
|
}
|
|
|
|
div#gtrcontent table.semlist tbody tr.css_S3 td {
|
|
background-color: #bedebe;
|
|
}
|
|
|
|
div#gtrcontent table.semlist tbody tr.css_S4 td {
|
|
background-color: #afd7ad;
|
|
}
|
|
div#gtrcontent table.semlist tbody tr.css_S5 td {
|
|
background-color: #a0cd9a;
|
|
}
|
|
div#gtrcontent table.semlist tbody tr.css_S6 td {
|
|
background-color: #7dcf78;
|
|
}
|
|
|
|
div#gtrcontent table.semlist tbody tr.css_MEXT td {
|
|
color: #fefcdf;
|
|
}
|
|
|
|
table.semlist tr td {
|
|
border: none;
|
|
}
|
|
|
|
table.semlist tbody tr a.stdlink,
|
|
table.semlist tbody tr a.stdlink:visited {
|
|
color: navy;
|
|
text-decoration: none;
|
|
}
|
|
|
|
div#gtrcontent table.semlist tr a.stdlink:hover {
|
|
color: red;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
table.semlist tbody tr td.modalite {
|
|
text-align: left;
|
|
padding-right: 1em;
|
|
}
|
|
|
|
div.modalite {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
}
|
|
div.effectif {
|
|
display: inline-block;
|
|
min-width: 24px;
|
|
text-align: right;
|
|
}
|
|
|
|
.cur-formsemestres {
|
|
width: max-content; /* Fits content, but respects max-width */
|
|
max-width: 1024px; /* Maximum width */
|
|
margin: 0 auto 0 0; /* Centers divs if they are narrower than 1024px */
|
|
}
|
|
|
|
@media screen and (max-width: 768px) {
|
|
/*Fix for mobile*/
|
|
.cur-formsemestres {
|
|
width: auto;
|
|
}
|
|
}
|
|
|
|
.cur-formsemestre {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
border-bottom: 1px solid #ddd;
|
|
border-left: 1px solid #ddd;
|
|
border-right: 1px solid #ddd;;
|
|
background-color: rgb(246, 255, 254);
|
|
padding: 0px 8px 0px 8px;
|
|
margin: 0px;
|
|
}
|
|
|
|
.cur-formsemestre.new-sem {
|
|
margin-top: 8px;
|
|
border-top: 1px solid #ddd;;
|
|
}
|
|
|
|
.left-section {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
.left-section img:nth-child(2) {
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.date {
|
|
display: flex;
|
|
flex-direction: column;
|
|
margin-left: 10px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.cur-formsemestre .title {
|
|
flex-grow: 1;
|
|
text-align: left;
|
|
margin: 0 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.right-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-size: 14px;
|
|
white-space: nowrap;
|
|
}
|
|
.responsable {
|
|
font-weight: bold;
|
|
color: navy;
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
{# News #}
|
|
{{scolar_news_summary|safe}}
|
|
|
|
{# Avertissement de mise à jour: #}
|
|
<div id="update_warning" class="scobox update_warning"></div>
|
|
|
|
{% if nb_user_accounts == 0 %}
|
|
<h2>Aucun utilisateur défini !</h2>
|
|
<p>Pour définir des utilisateurs <a href="{{
|
|
url_for('users.index_html', scodoc_dept=g.scodoc_dept)
|
|
}}">passez par la page Utilisateurs</a>.<br>
|
|
Définissez au moins un utilisateur avec le rôle <tt>AdminXXX</tt>
|
|
(le responsable du département <tt>XXX</tt>).
|
|
</p>
|
|
{% endif %}
|
|
|
|
{# Les semestres courants (cad non verrouillés) #}
|
|
<div class="scobox">
|
|
{% if current_formsemestres.count() == 0 %}
|
|
<div class="scobox-title">Aucune session en cours !</div>
|
|
<p>Pour ajouter une session, aller dans <a href="Notes" id="link-programmes">Formations</a>,
|
|
choisissez une formation, puis suivez le lien "<em>UE, modules, semestres</em>".
|
|
</p>
|
|
<p>Là, en bas de page, suivez le lien
|
|
"<em>Mettre en place un nouveau semestre de formation...</em>"
|
|
</p>
|
|
{% else %}
|
|
<div class="scobox-title">Sessions en cours</div>
|
|
<div class="cur-formsemestres">
|
|
{% for modalite in modalites %}
|
|
{% if modalites|length > 1 %}
|
|
<div class="modalite">{{modalite.titre}}</div>
|
|
{% endif %}
|
|
{% for formsemestre in current_formsemestres_by_modalite[modalite.modalite] %}
|
|
<div class="cur-formsemestre {{'new-sem' if loop.first or formsemestre.semestre_id != loop.previtem.semestre_id}}">
|
|
<div class="left-section">
|
|
{{groupicon|safe if formsemestre.inscriptions|length else emptygroupicon|safe}}
|
|
{{icon_hidden|safe if formsemestre.bul_hide_xml else icon_published|safe }}
|
|
<div class="date">
|
|
<div class="date-begin"><a title="{{formsemestre.session_id()}}">{{formsemestre.mois_debut()}}</a></div>
|
|
<div class="date-end">{{formsemestre.mois_fin()}}</div>
|
|
</div>
|
|
</div>
|
|
<div class="title">
|
|
<a class="stdlink" href="{{ url_for("notes.formsemestre_status",
|
|
scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre.id)}}">{{formsemestre.titre_num()}}</a>
|
|
</div>
|
|
<div class="right-section">
|
|
<div class="responsable">{{formsemestre.responsables_str()}}</div>
|
|
<div class="effectif">{{formsemestre.inscriptions|length}} étuds</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{# Table de tous les semestres #}
|
|
|
|
{% if html_table_formsemestres %}
|
|
<details open>
|
|
<summary class="table-formsemestres-titre">
|
|
Les {{formsemestres.count()}} semestres de {{dept_name}}
|
|
|
|
<a href="{{
|
|
url_for('scolar.export_table_dept_formsemestres', scodoc_dept=g.scodoc_dept)
|
|
}}">{{scu.ICON_XLS|safe}}</a>
|
|
</summary>
|
|
<div class="semlist">
|
|
{{ html_table_formsemestres|safe }}
|
|
</div>
|
|
</details>
|
|
{% else %}
|
|
<p><a class="stdlink" href="{{
|
|
url_for('scolar.index_html', scodoc_dept=g.scodoc_dept, showsemtable=1)
|
|
}}">Voir table des {{formsemestres.count()}} semestres
|
|
{% if nb_locked %}
|
|
(dont {{nb_locked}} verrouillé{{'s' if nb_locked > 1 else ''}})
|
|
{%endif%}
|
|
</a>
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{# Recherche d'un semestre par code Apogée #}
|
|
<form action="{{
|
|
url_for('notes.view_formsemestre_by_etape', scodoc_dept=g.scodoc_dept)
|
|
}}">
|
|
Chercher étape courante:
|
|
<input name="etape_apo" type="text" size="8" spellcheck="false"></input>
|
|
</form>
|
|
|
|
{# Gestion des étudiants #}
|
|
<div class="scobox">
|
|
<div class="scobox-title">Gestion des étudiants</div>
|
|
<ul>
|
|
{% if current_user.has_permission(Permission.EtudInscrit) %}
|
|
<li><a class="stdlink" href="{{
|
|
url_for('scolar.etudident_create_form', scodoc_dept=g.scodoc_dept)
|
|
}}">créer <em>un</em> nouvel étudiant</a>
|
|
</li>
|
|
<li><a class="stdlink" href="{{
|
|
url_for('scolar.form_students_import_excel', scodoc_dept=g.scodoc_dept)
|
|
}}">importer de nouveaux étudiants</a>
|
|
(<em>ne pas utiliser</em> sauf cas particulier : utilisez plutôt le lien dans
|
|
le tableau de bord semestre si vous souhaitez inscrire les
|
|
étudiants importés à un semestre)
|
|
</li>
|
|
{% endif %}
|
|
<li><a class="stdlink" href="{{
|
|
url_for('scolar.export_etudiants_courants', scodoc_dept=g.scodoc_dept)
|
|
}}">exporter tableau des étudiants des semestres en cours</a>
|
|
</li>
|
|
{% if current_user.has_permission(Permission.EtudInscrit) and sco.prefs["portal_url"] %}
|
|
<li><a class="stdlink" href="{{
|
|
url_for('scolar.formsemestre_import_etud_admission', scodoc_dept=g.scodoc_dept, tous_courants=1)
|
|
}}">resynchroniser les données étudiants des semestres en cours depuis le portail</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
|
|
{# Apogée #}
|
|
{% if current_user.has_permission(Permission.EditApogee) %}
|
|
<div class="scobox">
|
|
<div class="scobox-title">Exports Apogée</div>
|
|
<ul>
|
|
<li><a class="stdlink" href="{{
|
|
url_for('notes.semset_page', scodoc_dept=g.scodoc_dept)
|
|
}}">Années scolaires / exports Apogée</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{# Assistance #}
|
|
<div class="scobox">
|
|
<div class="scobox-title">Assistance</div>
|
|
<ul>
|
|
<li>
|
|
<a class="stdlink" href="https://scodoc.org/Contact" target="_blank"
|
|
rel="noopener noreferrer">Contact (Discord)</a>
|
|
</li>
|
|
<li>
|
|
<a class="stdlink" href="sco_dump_and_send_db">Envoyer données</a>
|
|
</li>
|
|
<li>
|
|
<a class="stdlink" href="sco_bug_report">Signaler une erreur ou suggérer une amélioration</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
{% endblock app_content %}
|
|
|
|
{% block scripts %}
|
|
{{ super() }}
|
|
<script src="{{scu.STATIC_DIR}}/js/scolar_index.js"></script>
|
|
{% endblock scripts %} |