Commit 9b93cc2d23437d5f52c3912dadd3505ac424a9e5
1 parent
ac2fa9fd
Exists in
master
and in
4 other branches
Add new create agent menu
Showing
2 changed files
with
55 additions
and
31 deletions
Show diff stats
app/main/templates/agent_edit.html
1 | {% extends "base_page.html" %} | 1 | {% extends "base_page.html" %} |
2 | + | ||
2 | {# Set the title that will be used in base_page #} | 3 | {# Set the title that will be used in base_page #} |
3 | {% if agent['agent_id'] != '' %} | 4 | {% if agent['agent_id'] != '' %} |
4 | {% set subtitle = "Modifier l'agent "+ agent['fullname'] +":" %} | 5 | {% set subtitle = "Modifier l'agent "+ agent['fullname'] +":" %} |
5 | {% else %} | 6 | {% else %} |
6 | {% set subtitle = "Ajouter un nouvel agent:" %} | 7 | {% set subtitle = "Ajouter un nouvel agent:" %} |
7 | {% endif %} | 8 | {% endif %} |
9 | + | ||
8 | {% block content %} | 10 | {% block content %} |
11 | + | ||
12 | + <!-- Invisible span to define wich ul and a in the navbar are actived --> | ||
13 | + <span id="nav_actived" style="display: none">cds,agent/create</span> | ||
14 | + | ||
9 | <form action="{{ url_for('main.agent_edit') }}" method="post"> | 15 | <form action="{{ url_for('main.agent_edit') }}" method="post"> |
10 | {% if agent %} | 16 | {% if agent %} |
11 | <input class="form-control" id="agent_id" name="agent_id" type="hidden" value="{{ agent['agent_id'] }}"> | 17 | <input class="form-control" id="agent_id" name="agent_id" type="hidden" value="{{ agent['agent_id'] }}"> |
app/templates/base_page.html
@@ -2,28 +2,30 @@ | @@ -2,28 +2,30 @@ | ||
2 | <html lang="fr"> | 2 | <html lang="fr"> |
3 | <head> | 3 | <head> |
4 | {% include 'heads.html' %} | 4 | {% include 'heads.html' %} |
5 | - <link href="{{ url_for('static', filename='css/style.css', version=config.VERSION) }}" rel="stylesheet" type="text/css"/> | 5 | + <link href="{{ url_for('static', filename='css/style.css', version=config.VERSION) }}" rel="stylesheet" |
6 | + type="text/css"/> | ||
6 | {% block more_heads %} | 7 | {% block more_heads %} |
7 | {% endblock %} | 8 | {% endblock %} |
8 | </head> | 9 | </head> |
9 | <body> | 10 | <body> |
10 | <nav class="navbar navbar-dark sticky-top bg-dark navbar-expand-lg p-1"> | 11 | <nav class="navbar navbar-dark sticky-top bg-dark navbar-expand-lg p-1"> |
11 | - <a id="accueil" class="navbar-brand col-sm-3 col-md-2 " href="{{url_for('main.index')}}"> | ||
12 | - <img class="m-0 mr-1 {{config.PDC_SITE_CLASS}}" src="{{ url_for('static', filename='img/pdc-ico.png', version=config.VERSION) }}" height="30" width="30"/> | 12 | + <a id="accueil" class="navbar-brand col-sm-3 col-md-2 " href="{{ url_for('main.index') }}"> |
13 | + <img class="m-0 mr-1 {{ config.PDC_SITE_CLASS }}" | ||
14 | + src="{{ url_for('static', filename='img/pdc-ico.png', version=config.VERSION) }}" height="30" width="30"/> | ||
13 | 15 | ||
14 | - {{config.PDC_APP_NAME}} - {{config.PDC_SITE_NAME}}</a> | 16 | + {{ config.PDC_APP_NAME }} - {{ config.PDC_SITE_NAME }}</a> |
15 | <ul class="navbar-nav flex-row ml-auto"> | 17 | <ul class="navbar-nav flex-row ml-auto"> |
16 | {% if not current_user.is_anonymous %} | 18 | {% if not current_user.is_anonymous %} |
17 | - <li class="nav-item"> | ||
18 | - <span class="navbar-brand">{{current_user.name}}</span> | ||
19 | - </li> | ||
20 | - <li class="nav-item text-nowrap"> | ||
21 | - <a class="nav-link link_connect" href="{{ url_for('auth.logout') }}">Déconnexion</a> | ||
22 | - </li> | 19 | + <li class="nav-item"> |
20 | + <span class="navbar-brand">{{ current_user.name }}</span> | ||
21 | + </li> | ||
22 | + <li class="nav-item text-nowrap"> | ||
23 | + <a class="nav-link link_connect" href="{{ url_for('auth.logout') }}">Déconnexion</a> | ||
24 | + </li> | ||
23 | {% else %} | 25 | {% else %} |
24 | - <li class="nav-item text-nowrap"> | ||
25 | - <a class="nav-link link_connect" href="{{ url_for('auth.login') }}">Connexion</a> | ||
26 | - </li> | 26 | + <li class="nav-item text-nowrap"> |
27 | + <a class="nav-link link_connect" href="{{ url_for('auth.login') }}">Connexion</a> | ||
28 | + </li> | ||
27 | {% endif %} | 29 | {% endif %} |
28 | </ul> | 30 | </ul> |
29 | </nav> | 31 | </nav> |
@@ -31,22 +33,27 @@ | @@ -31,22 +33,27 @@ | ||
31 | <div class="container-fluid"> | 33 | <div class="container-fluid"> |
32 | <div class="row"> | 34 | <div class="row"> |
33 | <nav class="col-md-half col-lg-2 col-md-2 navbar-light bg-light navbar-expand-md sidebar mt-5"> | 35 | <nav class="col-md-half col-lg-2 col-md-2 navbar-light bg-light navbar-expand-md sidebar mt-5"> |
34 | - <button id="test" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
35 | - <span class="navbar-toggler-icon"></span> | ||
36 | - </button> | ||
37 | - <div class="sidebar-sticky collapse navbar-collapse" id="navbarSupportedContent"> | 36 | + <button id="test" class="navbar-toggler" type="button" data-toggle="collapse" |
37 | + data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" | ||
38 | + aria-label="Toggle navigation"> | ||
39 | + <span class="navbar-toggler-icon"></span> | ||
40 | + </button> | ||
41 | + <div class="sidebar-sticky collapse navbar-collapse" id="navbarSupportedContent"> | ||
38 | <ul class="nav flex-column" id="v_menu"> | 42 | <ul class="nav flex-column" id="v_menu"> |
39 | <li class="nav-item"> | 43 | <li class="nav-item"> |
40 | - <a aria-expanded="false" id="agents" class="main-nav nav-link" data-target="#agent" data-toggle="collapse" href="#"> | 44 | + <a aria-expanded="false" id="agents" class="main-nav nav-link" data-target="#agent" data-toggle="collapse" |
45 | + href="#"> | ||
41 | <span data-feather="user"></span> | 46 | <span data-feather="user"></span> |
42 | Agent | 47 | Agent |
43 | </a> | 48 | </a> |
44 | <ul aria-expanded="false" class="collapse" class="nav" data-parent="#v_menu" id="agent"> | 49 | <ul aria-expanded="false" class="collapse" class="nav" data-parent="#v_menu" id="agent"> |
45 | - <li class="nav-item"><a class="sub_link nav-link " href="{{url_for('main.agents')}}">Liste des agents</a> | 50 | + <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.agents') }}">Liste des |
51 | + agents</a> | ||
46 | </li> | 52 | </li> |
47 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> | 53 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> |
48 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Liste des responsabilités</a></li> | 54 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Liste des responsabilités</a></li> |
49 | - <li class="nav-item"><a class="sub_link nav-link " href="{{url_for('main.capacities')}}">Liste des fonctions</a> | 55 | + <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.capacities') }}">Liste des |
56 | + fonctions</a> | ||
50 | </li> | 57 | </li> |
51 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Liste des compétences</a></li> | 58 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Liste des compétences</a></li> |
52 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Liste des pôles</a></li> | 59 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Liste des pôles</a></li> |
@@ -59,10 +66,12 @@ | @@ -59,10 +66,12 @@ | ||
59 | Projet | 66 | Projet |
60 | </a> | 67 | </a> |
61 | <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="projet"> | 68 | <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="projet"> |
62 | - <li class="nav-item"><a class="sub_link nav-link " href="{{url_for('main.projects')}}">Liste des projets</a></li> | 69 | + <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.projects') }}">Liste des |
70 | + projets</a></li> | ||
63 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> | 71 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> |
64 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Listes des domaines</a></li> | 72 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Listes des domaines</a></li> |
65 | - <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Listes des statuts de projets</a></li> | 73 | + <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Listes des statuts de projets</a> |
74 | + </li> | ||
66 | </ul> | 75 | </ul> |
67 | </li> | 76 | </li> |
68 | <li class="nav-item"> | 77 | <li class="nav-item"> |
@@ -71,7 +80,8 @@ | @@ -71,7 +80,8 @@ | ||
71 | Service | 80 | Service |
72 | </a> | 81 | </a> |
73 | <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="service"> | 82 | <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="service"> |
74 | - <li class="nav-item"><a class="sub_link nav-link " href="{{url_for('main.services')}}">Liste des services</a> | 83 | + <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.services') }}">Liste des |
84 | + services</a> | ||
75 | </li> | 85 | </li> |
76 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> | 86 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> |
77 | </ul> | 87 | </ul> |
@@ -82,9 +92,13 @@ | @@ -82,9 +92,13 @@ | ||
82 | Chef de service | 92 | Chef de service |
83 | </a> | 93 | </a> |
84 | <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="cds"> | 94 | <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="cds"> |
85 | - <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Renseigner le statut d'un agent pour un | 95 | + <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.agent_edit') }}">Ajouter un |
96 | + Agent</a></li> | ||
97 | + <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Renseigner le statut d'un agent pour | ||
98 | + un | ||
86 | semestre</a></li> | 99 | semestre</a></li> |
87 | - <li class="nav-item"><a class="sub_link nav-link " href="{{url_for('main.charge_add')}}">Affecter un agent à un | 100 | + <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.charge_add') }}">Affecter un |
101 | + agent à un | ||
88 | projet/service</a></li> | 102 | projet/service</a></li> |
89 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Création agent virtuel</a></li> | 103 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Création agent virtuel</a></li> |
90 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Charge totale des agents</a></li> | 104 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Charge totale des agents</a></li> |
@@ -105,9 +119,12 @@ | @@ -105,9 +119,12 @@ | ||
105 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouvelle fonction</a></li> | 119 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouvelle fonction</a></li> |
106 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouveau domaine</a></li> | 120 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouveau domaine</a></li> |
107 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouvelle responsabilité</a></li> | 121 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouvelle responsabilité</a></li> |
108 | - <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Affecter un responsable de projet</a></li> | ||
109 | - <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Affecter un responsable de service</a></li> | ||
110 | - <li class="nav-item"><a class="sub_link nav-link " href="{{url_for('main.periods')}}">Liste des périodes</a></li> | 122 | + <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Affecter un responsable de |
123 | + projet</a></li> | ||
124 | + <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Affecter un responsable de | ||
125 | + service</a></li> | ||
126 | + <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.periods') }}">Liste des | ||
127 | + périodes</a></li> | ||
111 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouveau semestre</a></li> | 128 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouveau semestre</a></li> |
112 | 129 | ||
113 | </ul> | 130 | </ul> |
@@ -120,7 +137,7 @@ | @@ -120,7 +137,7 @@ | ||
120 | </nav> | 137 | </nav> |
121 | 138 | ||
122 | <main id="main" class="ml-md-auto ml-sm-5 ml-xs-8 col-xs-4 col-sm-11 col-md-9 col-lg-10 pt-3 px-4" role="main"> | 139 | <main id="main" class="ml-md-auto ml-sm-5 ml-xs-8 col-xs-4 col-sm-11 col-md-9 col-lg-10 pt-3 px-4" role="main"> |
123 | - <h2 class="sub-header">{{subtitle}}</h2> | 140 | + <h2 class="sub-header">{{ subtitle }}</h2> |
124 | {% include 'flash-messages.html' %} | 141 | {% include 'flash-messages.html' %} |
125 | {% block content %} | 142 | {% block content %} |
126 | {% endblock %} | 143 | {% endblock %} |
@@ -134,10 +151,11 @@ | @@ -134,10 +151,11 @@ | ||
134 | <!-- Icons --> | 151 | <!-- Icons --> |
135 | <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> | 152 | <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> |
136 | <script> | 153 | <script> |
137 | - feather.replace() | 154 | + feather.replace() |
138 | </script> | 155 | </script> |
139 | 156 | ||
140 | - <script type="text/javascript" src="{{ url_for('static', filename='js/navbar.js', version=config.VERSION) }}"></script> | 157 | + <script type="text/javascript" |
158 | + src="{{ url_for('static', filename='js/navbar.js', version=config.VERSION) }}"></script> | ||
141 | 159 | ||
142 | {% block more_scripts %} | 160 | {% block more_scripts %} |
143 | {% endblock %} | 161 | {% endblock %} |