update index navbar

This commit is contained in:
Iziram 2024-07-30 10:59:01 +02:00
parent d9d8d8d7fe
commit 5e066d13f0
2 changed files with 28 additions and 37 deletions

View File

@ -285,7 +285,7 @@ tr.bandeaugtr {
text-decoration: underline; text-decoration: underline;
} }
.navbar-default .navbar-nav>li.logout a { nav li.logout a {
color: rgb(255, 0, 0); color: rgb(255, 0, 0);
} }

View File

@ -12,61 +12,52 @@
{% endblock %} {% endblock %}
{% block navbar %} {% block navbar %}
<nav class="navbar navbar-default"> <nav class="navbar navbar-expand-md bg-light">
<div class="container"> <div class="container container-fluid">
<div class="navbar-header"> <a class="navbar-brand me-auto d-flex" href="{{ url_for('scodoc.index') }}">ScoDoc</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" <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">
data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="navbar-toggler-icon"></span>
<span class="sr-only">Toggle navigation</span> </button>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ url_for('scodoc.index') }}">ScoDoc</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> {# NAVBAR CONTENT #}
<div class="collapse navbar-collapse justify-content-center align-items-center" id="index-nav">
<ul class="nav navbar-nav"> <ul class="navbar-nav justify-content-center">
{% if current_user.is_administrator() %} {% if current_user.is_administrator() %}
<li><a href="{{ url_for('scodoc.configuration') }}">Configuration</a></li> <li class="nav-item"><a class="nav-link" href="{{ url_for('scodoc.configuration') }}">Configuration</a></li>
{% endif %} {% endif %}
{% if g.scodoc_dept %} {% if g.scodoc_dept %}
<li><a href="{{ <li class="nav-item"><a class="nav-link" href="{{
url_for('scolar.index_html', scodoc_dept=g.scodoc_dept) url_for('scolar.index_html', scodoc_dept=g.scodoc_dept)
}}">Dept. {{ g.scodoc_dept }}</a></li> }}">Dept. {{ g.scodoc_dept }}</a></li>
{% endif %} {% endif %}
{% if not current_user.is_anonymous and {% if not current_user.is_anonymous %}
current_user.has_permission(current_user.Permission.RelationsEntrepView, None) and scu and <li class="nav-item">
scu.is_entreprises_enabled() %} <a class="nav-link" href="{{
<li><a href="{{ url_for('entreprises.index') }}">Entreprises</a></li> 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 %}
{% endif %} {% endif %}
</ul> </ul>
{% if not current_user.is_anonymous %} <ul class="navbar-nav ms-auto justify-content-end gap-3">
<ul class="nav navbar-nav">
<li>
<a href="{{
url_for('scodoc.user_board', user_name=current_user.user_name)
}}">Tableau de bord</a>
</li>
</ul>
{% endif %}
<ul class="nav navbar-nav navbar-right">
{% if current_user.is_anonymous %} {% if current_user.is_anonymous %}
<li><a href="{{ url_for('auth.login') }}">connexion</a></li> <li class="nav-item"><a class="nav-link" href="{{ url_for('auth.login') }}">connexion</a></li>
{% else %} {% else %}
<li>{% if current_user.dept %} <li class="nav-item">{% if current_user.dept %}
<a href="{{ url_for('users.user_info_page', scodoc_dept=current_user.dept, user_name=current_user.user_name ) <a class="nav-link" href="{{ url_for('users.user_info_page', scodoc_dept=current_user.dept, user_name=current_user.user_name )
}}">{{current_user.user_name}} ({{current_user.dept}})</a> }}">{{current_user.user_name}} ({{current_user.dept}})</a>
{% else %} {% else %}
<a href="">{{current_user.user_name}}</a> <a class="nav-link" href="">{{current_user.user_name}}</a>
{% endif %} {% endif %}
</li> </li>
<li class="logout"><a href="{{ url_for('auth.logout') }}">déconnexion</a></li> <li class="nav-item logout"><a class="nav-link" href="{{ url_for('auth.logout') }}">déconnexion</a></li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>
</div> </div>
</nav> </nav>
{% endblock %} {% endblock %}