2024-01-21 22:21:10 +01:00
|
|
|
{# base des pages hors départements (accueil, configuration, ...) #}
|
2023-11-15 20:38:51 +01:00
|
|
|
{% extends 'babase.j2' %}
|
2021-05-29 18:22:51 +02:00
|
|
|
|
2021-07-04 12:32:13 +02:00
|
|
|
{% block styles %}
|
|
|
|
{{super()}}
|
2023-04-14 15:15:54 +02:00
|
|
|
<link rel="stylesheet" href="{{ scu.STATIC_DIR }}/css/scodoc.css">
|
|
|
|
<link rel="stylesheet" href="{{ scu.STATIC_DIR }}/css/entreprises.css">
|
2021-07-04 12:32:13 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
2021-05-29 18:22:51 +02:00
|
|
|
{% block title %}
|
2022-03-22 22:14:45 +01:00
|
|
|
{% if title %}{{ title }} - ScoDoc{% else %}ScoDoc{% endif %}
|
2021-05-29 18:22:51 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block navbar %}
|
2024-07-30 10:59:01 +02:00
|
|
|
<nav class="navbar navbar-expand-md bg-light">
|
|
|
|
<div class="container container-fluid">
|
|
|
|
<a class="navbar-brand me-auto d-flex" href="{{ url_for('scodoc.index') }}">ScoDoc</a>
|
|
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#index-nav" aria-controls="index-nav" aria-expanded="false" aria-label="Toggle navigation">
|
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
2023-01-30 22:25:17 +01:00
|
|
|
|
2024-07-30 10:59:01 +02:00
|
|
|
{# NAVBAR CONTENT #}
|
|
|
|
<div class="collapse navbar-collapse justify-content-center align-items-center" id="index-nav">
|
|
|
|
<ul class="navbar-nav justify-content-center">
|
2023-01-30 22:25:17 +01:00
|
|
|
{% if current_user.is_administrator() %}
|
2024-07-30 10:59:01 +02:00
|
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('scodoc.configuration') }}">Configuration</a></li>
|
2023-01-30 22:25:17 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if g.scodoc_dept %}
|
2024-07-30 10:59:01 +02:00
|
|
|
<li class="nav-item"><a class="nav-link" href="{{
|
2023-11-15 20:38:51 +01:00
|
|
|
url_for('scolar.index_html', scodoc_dept=g.scodoc_dept)
|
2021-10-17 11:19:01 +02:00
|
|
|
}}">Dept. {{ g.scodoc_dept }}</a></li>
|
2023-01-30 22:25:17 +01:00
|
|
|
{% endif %}
|
2024-07-30 10:59:01 +02:00
|
|
|
{% if not current_user.is_anonymous %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="{{
|
|
|
|
url_for('scodoc.user_board', user_name=current_user.user_name)
|
|
|
|
}}">Tableau de bord</a>
|
|
|
|
</li>
|
|
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntrepView, None) and scu and scu.is_entreprises_enabled() %}
|
|
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('entreprises.index') }}">Entreprises</a></li>
|
|
|
|
{% endif %}
|
2023-01-30 22:25:17 +01:00
|
|
|
{% endif %}
|
2021-10-17 11:19:01 +02:00
|
|
|
</ul>
|
2024-07-30 10:59:01 +02:00
|
|
|
<ul class="navbar-nav ms-auto justify-content-end gap-3">
|
2021-05-29 18:22:51 +02:00
|
|
|
{% if current_user.is_anonymous %}
|
2024-07-30 10:59:01 +02:00
|
|
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('auth.login') }}">connexion</a></li>
|
2021-05-29 18:22:51 +02:00
|
|
|
{% else %}
|
2024-07-30 10:59:01 +02:00
|
|
|
<li class="nav-item">{% if current_user.dept %}
|
|
|
|
<a class="nav-link" href="{{ url_for('users.user_info_page', scodoc_dept=current_user.dept, user_name=current_user.user_name )
|
2021-09-10 23:18:27 +02:00
|
|
|
}}">{{current_user.user_name}} ({{current_user.dept}})</a>
|
|
|
|
{% else %}
|
2024-07-30 10:59:01 +02:00
|
|
|
<a class="nav-link" href="">{{current_user.user_name}}</a>
|
2021-09-10 23:18:27 +02:00
|
|
|
{% endif %}
|
|
|
|
</li>
|
2024-07-30 10:59:01 +02:00
|
|
|
<li class="nav-item logout"><a class="nav-link" href="{{ url_for('auth.logout') }}">déconnexion</a></li>
|
2021-05-29 18:22:51 +02:00
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-08-18 18:40:11 +02:00
|
|
|
|
2021-05-29 18:22:51 +02:00
|
|
|
</nav>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2024-08-15 00:04:35 +02:00
|
|
|
|
|
|
|
{% include "flashed_messages.j2" %}
|
2023-05-13 18:35:10 +02:00
|
|
|
|
|
|
|
{# application content needs to be provided in the app_content block #}
|
|
|
|
<div class="container">
|
2024-08-18 18:40:11 +02:00
|
|
|
{% block app_content %}{{ content | safe }}{% endblock %}
|
2021-05-29 18:22:51 +02:00
|
|
|
</div>
|
2023-05-13 18:35:10 +02:00
|
|
|
|
2023-04-14 16:35:24 +02:00
|
|
|
<script>
|
2023-11-20 16:55:26 +01:00
|
|
|
setTimeout(function () {
|
2023-04-14 16:35:24 +02:00
|
|
|
var flashes = document.getElementsByClassName("flashes")[0];
|
|
|
|
if (flashes) {
|
|
|
|
flashes.style.display = "none";
|
|
|
|
}
|
|
|
|
}, 5000);
|
|
|
|
</script>
|
2021-05-29 18:22:51 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block scripts %}
|
|
|
|
{{ super() }}
|
2023-06-01 17:58:30 +02:00
|
|
|
<script src="{{scu.STATIC_DIR}}/libjs/menu.js"></script>
|
|
|
|
<script src="{{scu.STATIC_DIR}}/libjs/bubble.js"></script>
|
|
|
|
<script src="{{scu.STATIC_DIR}}/js/scodoc.js"></script>
|
2021-05-29 18:22:51 +02:00
|
|
|
<script>
|
2023-12-31 22:59:09 +01:00
|
|
|
const SCO_URL = "{% if g.scodoc_dept %}{{
|
2024-04-10 18:40:32 +02:00
|
|
|
url_for('scolar.index_html', scodoc_dept=g.scodoc_dept)}}{% endif %}";
|
2021-05-29 18:22:51 +02:00
|
|
|
</script>
|
2023-11-20 16:55:26 +01:00
|
|
|
{% endblock %}
|