Commit 63ac6a6e64d81351600d54ecc579ff7d7c6a9648

Authored by hitier
1 parent c7737881

Auto collapse vertical menus

Showing 1 changed file with 20 additions and 15 deletions   Show diff stats
app/templates/base_page.html
... ... @@ -9,7 +9,7 @@
9 9 <body>
10 10 <nav class="navbar navbar-dark sticky-top bg-dark navbar-expand-lg p-1">
11 11 <a class="navbar-brand col-sm-3 col-md-2 " href="{{url_for('main.index')}}">
12   - <img class="m-0 mr-1" src="{{ url_for('static', filename='img/pdc-ico.png') }}" height="30" width="30"/>
  12 + <img class="m-0 mr-1" height="30" src="{{ url_for('static', filename='img/pdc-ico.png') }}" width="30"/>
13 13 Plan de Charges</a>
14 14 <ul class="navbar-nav ml-auto">
15 15 {% if not current_user.is_anonymous %}
... ... @@ -19,11 +19,11 @@
19 19 <li class="nav-item text-nowrap">
20 20 <a class="nav-link" href="{{ url_for('auth.logout') }}">Déconnection</a>
21 21 </li>
22   - {% else %}
  22 + {% else %}
23 23 <li class="nav-item text-nowrap">
24 24 <a class="nav-link" href="{{ url_for('auth.login') }}">Connection</a>
25 25 </li>
26   - {% endif %}
  26 + {% endif %}
27 27 </ul>
28 28 </nav>
29 29  
... ... @@ -31,9 +31,9 @@
31 31 <div class="row">
32 32 <nav class="col-md-2 d-none d-md-block bg-light sidebar mt-3">
33 33 <div class="sidebar-sticky">
34   - <ul class="nav flex-column">
  34 + <ul class="nav flex-column" id="v_menu">
35 35 <li class="nav-item">
36   - <a class="nav-link active" href="#">
  36 + <a class="nav-link" href="#">
37 37 <span data-feather="home"></span>
38 38 accueil
39 39 </a>
... ... @@ -43,11 +43,13 @@
43 43 <span data-feather="user"></span>
44 44 Agent
45 45 </a>
46   - <ul aria-expanded="false" class="collapse" id="agent" class="nav">
47   - <li class="nav-item"><a class="nav-link " href="{{url_for('main.agents')}}">Liste des agents</a></li>
  46 + <ul aria-expanded="false" class="collapse" class="nav" data-parent="#v_menu" id="agent">
  47 + <li class="nav-item"><a class="nav-link " href="{{url_for('main.agents')}}">Liste des agents</a>
  48 + </li>
48 49 <li class="nav-item"><a class="nav-link disabled" href="#">Statistiques</a></li>
49 50 <li class="nav-item"><a class="nav-link disabled" href="#">Liste des responsabilités</a></li>
50   - <li class="nav-item"><a class="nav-link " href="{{url_for('main.capacities')}}">Liste des fonctions</a></li>
  51 + <li class="nav-item"><a class="nav-link " href="{{url_for('main.capacities')}}">Liste des fonctions</a>
  52 + </li>
51 53 <li class="nav-item"><a class="nav-link disabled" href="#">Liste des compétences</a></li>
52 54 <li class="nav-item"><a class="nav-link disabled" href="#">Liste des pôles</a></li>
53 55 <li class="nav-item"><a class="nav-link disabled" href="#">Liste des emplois types</a></li>
... ... @@ -58,7 +60,7 @@
58 60 <span data-feather="file"></span>
59 61 Projet
60 62 </a>
61   - <ul aria-expanded="false" class="collapse" id="projet">
  63 + <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="projet">
62 64 <li class="nav-item"><a class="nav-link " href="{{url_for('main.projects')}}">Liste des projets</a></li>
63 65 <li class="nav-item"><a class="nav-link disabled" href="#">Statistiques</a></li>
64 66 <li class="nav-item"><a class="nav-link disabled" href="#">Listes des domaines</a></li>
... ... @@ -70,8 +72,9 @@
70 72 <span data-feather="home"></span>
71 73 Service
72 74 </a>
73   - <ul aria-expanded="false" class="collapse" id="service">
74   - <li class="nav-item"><a class="nav-link " href="{{url_for('main.services')}}">Liste des services</a></li>
  75 + <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="service">
  76 + <li class="nav-item"><a class="nav-link " href="{{url_for('main.services')}}">Liste des services</a>
  77 + </li>
75 78 <li class="nav-item"><a class="nav-link disabled" href="#">Statistiques</a></li>
76 79 </ul>
77 80 </li>
... ... @@ -80,9 +83,11 @@
80 83 <span data-feather="users"></span>
81 84 Chef de service
82 85 </a>
83   - <ul aria-expanded="false" class="collapse" id="cds">
84   - <li class="nav-item"><a class="nav-link disabled" href="#">Renseigner le statut d'un agent pour un semestre</a></li>
85   - <li class="nav-item"><a class="nav-link " href="{{url_for('main.charge_add')}}">Affecter un agent à un projet/service</a></li>
  86 + <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="cds">
  87 + <li class="nav-item"><a class="nav-link disabled" href="#">Renseigner le statut d'un agent pour un
  88 + semestre</a></li>
  89 + <li class="nav-item"><a class="nav-link " href="{{url_for('main.charge_add')}}">Affecter un agent à un
  90 + projet/service</a></li>
86 91 <li class="nav-item"><a class="nav-link disabled" href="#">Création agent virtuel</a></li>
87 92 <li class="nav-item"><a class="nav-link disabled" href="#">Charge totale des agents</a></li>
88 93 <li class="nav-item"><a class="nav-link disabled" href="#">Détails des charges</a></li>
... ... @@ -94,7 +99,7 @@
94 99 <span data-feather="settings"></span>
95 100 Administrateur
96 101 </a>
97   - <ul aria-expanded="false" class="collapse" id="admin">
  102 + <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="admin">
98 103  
99 104 <li class="nav-item"><a class="nav-link disabled" href="#">Nouveau projet</a></li>
100 105 <li class="nav-item"><a class="nav-link disabled" href="#">Nouveau service</a></li>
... ...