Commit 963465985f7da44da8761076656a5b80c4334a04
1 parent
5aabd083
Exists in
master
and in
4 other branches
Insert description in agent page
Showing
3 changed files
with
119 additions
and
12 deletions
Show diff stats
app/main/templates/agent.html
1 | 1 | {% extends "base_page.html" %} |
2 | 2 | |
3 | 3 | {% block more_heads %} |
4 | -<link href="{{ url_for('main.static', filename='css/charges.css', version=config.VERSION) }}" rel="stylesheet" type="text/css"/> | |
4 | +<link href="{{ url_for('main.static', filename='css/charges.css', version=config.VERSION) }}" rel="stylesheet" | |
5 | + type="text/css"/> | |
5 | 6 | {% endblock %} |
6 | 7 | |
7 | 8 | {% block content %} |
... | ... | @@ -9,25 +10,84 @@ |
9 | 10 | <!-- Invisible span to definte wich ul and a in the navbar are actived --> |
10 | 11 | <span id="nav_actived" style="display: none">agent,agents</span> |
11 | 12 | |
12 | -<div id="projects_chart" class="charge_chart"></div> | |
13 | +<div class="card"> | |
14 | + <div class="card-header"> | |
15 | + Fiche Agent | |
16 | + </div> | |
17 | + <div class="card-body"> | |
18 | + <dl class="row agent"> | |
19 | + <dt class="col-sm-2 text-right">ID :</dt> | |
20 | + <dd class="col-sm-10 text-left">{{agent.id}}</dd> | |
21 | + <dt class="col-sm-2 text-right">Genre :</dt> | |
22 | + <dd class="col-sm-10 text-left"></dd> | |
23 | + <dt class="col-sm-2 text-right">Date de naissance :</dt> | |
24 | + <dd class="col-sm-10 text-left"></dd> | |
25 | + <dt class="col-sm-2 text-right">E-mail :</dt> | |
26 | + <dd class="col-sm-10 text-left"></dd> | |
27 | + {# TODO: put different spacing #} | |
28 | + <dt class="col-sm-2 text-right"></dt> | |
29 | + <dd class="col-sm-10 text-left"></dd> | |
30 | + <dt class="col-sm-2 text-right">Statut :</dt> | |
31 | + <dd class="col-sm-10 text-left">{{agent.status_id}}</dd> | |
32 | + <dt class="col-sm-2 text-right">Organisme :</dt> | |
33 | + <dd class="col-sm-10 text-left">{{agent.company_id}}</dd> | |
34 | + <dt class="col-sm-2 text-right">Corps :</dt> | |
35 | + <dd class="col-sm-10 text-left"></dd> | |
36 | + <dt class="col-sm-2 text-right">BAP :</dt> | |
37 | + <dd class="col-sm-10 text-left">{{agent.bap_id}}</dd> | |
38 | + {# TODO: puth different spacing #} | |
39 | + <dt class="col-sm-2 text-right"></dt> | |
40 | + <dd class="col-sm-10 text-left"></dd> | |
41 | + <dt class="col-sm-2 text-right">Quotité :</dt> | |
42 | + <dd class="col-sm-10 text-left"></dd> | |
43 | + <dt class="col-sm-2 text-right">Date arrivée :</dt> | |
44 | + <dd class="col-sm-10 text-left"></dd> | |
45 | + <dt class="col-sm-2 text-right">Date départ :</dt> | |
46 | + <dd class="col-sm-10 text-left"></dd> | |
47 | + {# TODO: put different spacing #} | |
48 | + <dt class="col-sm-2 text-right"></dt> | |
49 | + <dd class="col-sm-10 text-left"></dd> | |
50 | + <dt class="col-sm-2 text-right">Commentaires :</dt> | |
51 | + <dd class="col-sm-10 text-left"></dd> | |
52 | + {# TODO: put different spacing #} | |
53 | + <dt class="col-sm-2 text-right"></dt> | |
54 | + <dd class="col-sm-10 text-left"></dd> | |
55 | + <dt class="col-sm-2 text-right">APPRENTI</dt> | |
56 | + <dd class="col-sm-10 text-left"></dd> | |
57 | + <dt class="col-sm-2 text-right">Fiche de poste :</dt> | |
58 | + <dd class="col-sm-10 text-left"></dd> | |
59 | + {# TODO: put different spacing #} | |
60 | + <dt class="col-sm-2 text-right"></dt> | |
61 | + <dd class="col-sm-10 text-left"></dd> | |
62 | + <dt class="col-sm-2 text-right">Compétences :</dt> | |
63 | + <dd class="col-sm-10 text-left"></dd> | |
64 | + <dt class="col-sm-2 text-right">Besoin en formation :</dt> | |
65 | + <dd class="col-sm-10 text-left"></dd> | |
66 | + </dl> | |
67 | + | |
68 | + <a class="card-link disabled" href="#">Modifier</a> | |
69 | + </div> | |
70 | +</div> | |
71 | + | |
72 | +<div class="charge_chart" id="projects_chart"></div> | |
13 | 73 | <table id="charge_table"> |
14 | 74 | <thead> |
15 | 75 | <tr> |
16 | - {% for header in charges[0] %} | |
76 | + {% for header in charges[0] %} | |
17 | 77 | <th>{{header}}</th> |
18 | - {% endfor %} | |
78 | + {% endfor %} | |
19 | 79 | </tr> |
20 | 80 | </thead> |
21 | 81 | <tbody> |
22 | 82 | {% for line in charges[1:] %} |
23 | 83 | <tr> |
24 | 84 | {% for i in range(line|length) %} |
25 | - {%if 'Charge' in charges[0][i] %} | |
26 | - {% set charge = line[i] | int %} | |
27 | - <td>{{charge / 100}}</td> | |
28 | - {%else%} | |
29 | - <td>{{line[i]}}</td> | |
30 | - {%endif%} | |
85 | + {%if 'Charge' in charges[0][i] %} | |
86 | + {% set charge = line[i] | int %} | |
87 | + <td>{{charge / 100}}</td> | |
88 | + {%else%} | |
89 | + <td>{{line[i]}}</td> | |
90 | + {%endif%} | |
31 | 91 | {% endfor %} |
32 | 92 | </tr> |
33 | 93 | {% endfor %} |
... | ... | @@ -43,7 +103,7 @@ |
43 | 103 | <script> |
44 | 104 | build_chart("#projects_chart", |
45 | 105 | "{{url_for('main.charge_agent_csv', agent_id=agent.id)}}", |
46 | - "{{agent.secondname}}"+ " {{agent.firstname}}", | |
106 | + "{{agent.secondname}}" + " {{agent.firstname}}", | |
47 | 107 | "project"); |
48 | 108 | </script> |
49 | 109 | {% endblock %} | ... | ... |
... | ... | @@ -0,0 +1,42 @@ |
1 | +{% extends "base_page.html" %} | |
2 | +{% block content %} | |
3 | +{% if agent %} | |
4 | +Modifier l'agent {{ agent.name}}. | |
5 | +{% else %} | |
6 | +Ajouter un nouvel agent. | |
7 | +{% endif %} | |
8 | +<form action="{{url_for('main.agent_edit')}}" method="post"> | |
9 | + {% if agent %} | |
10 | + <input class="form-control" id="agent_id" name="agent_id" type="hidden" value="{{agent.id}}"> | |
11 | + {% endif %} | |
12 | + <div class="form-group"> | |
13 | + <label for="firstname">Nom</label> | |
14 | + <input class="form-control" id="firstname" name="firstname" type="text" value="{{agent.firstname}}"> | |
15 | + </div> | |
16 | + <div class="form-group"> | |
17 | + <label for="secondname">Prénom</label> | |
18 | + <input class="form-control" id="secondname" name="secondname" type="text" value="{{agent.secondname}}"> | |
19 | + </div> | |
20 | + <div class="form-group"> | |
21 | + <label for="virtual">Virtuel</label> | |
22 | + <input class="form-control" id="virtual" name="virtual" type="text" value="{{agent.virtual}}"> | |
23 | + </div> | |
24 | + <div class="form-group"> | |
25 | + <label for="company">Structure</label> | |
26 | + <input class="form-control" id="company" name="company" type="text" value="{{agent.company.name}}"> | |
27 | + </div> | |
28 | + <div class="form-group"> | |
29 | + <label for="grade">Grade</label> | |
30 | + <input class="form-control" id="grade" name="grade" type="text" value="{{agent.grade.name}}"> | |
31 | + </div> | |
32 | + <div class="form-group"> | |
33 | + <label for="status">Statut</label> | |
34 | + <input class="form-control" id="status" name="status" type="text" value="{{agent.status.name}}"> | |
35 | + </div> | |
36 | + <div class="form-group"> | |
37 | + <label for="bap">Bap</label> | |
38 | + <input class="form-control" id="bap" name="bap" type="text" value="{{agent.bap.name}}"> | |
39 | + </div> | |
40 | + <input class="btn btn-dark" type="submit" value="Valider"> | |
41 | +</form> | |
42 | +{% endblock %} | ... | ... |
app/static/css/style.css
... | ... | @@ -8,8 +8,9 @@ |
8 | 8 | |
9 | 9 | @media (min-width: 1670px) { |
10 | 10 | .sidebar { |
11 | - max-width:12.499999995%; | |
11 | + max-width: 12.499999995%; | |
12 | 12 | } |
13 | +} | |
13 | 14 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ |
14 | 15 | |
15 | 16 | html { |
... | ... | @@ -106,4 +107,8 @@ nav.sidebar a.disabled { |
106 | 107 | border: solid black 1pt; |
107 | 108 | margin-bottom: 3em; |
108 | 109 | border-radius: 0; |
110 | +} | |
111 | + | |
112 | +dl.agent { | |
113 | + line-height: 1.2; | |
109 | 114 | } |
110 | 115 | \ No newline at end of file | ... | ... |