Blame view

app/main/templates/project.html 2.74 KB
d7a4e41b   hitier   New project page:...
1
2
3
{% extends "base_page.html" %}

{% block more_heads %}
6845708c   Anais Amato   delete useless cd...
4
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='lib/datatables-1.10.24/css/buttons.dataTables.min.css') }}"/>
b3cb00e4   Anais Amato   Make tables expor...
5
6
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='lib/datatables-1.10.24/css/datatables.min.css') }}"/>
    <link href="{{ url_for('main.static', filename='css/charges.css', version=config.VERSION) }}" rel="stylesheet" type="text/css"/>
d7a4e41b   hitier   New project page:...
7
8
9
{% endblock %}

{% block content %}
9f86aeea   Anais Amato   Change navbar act...
10
<!-- Invisible span to definte wich ul and a in the navbar are actived -->
fd63e06e   Anais Amato   update coloration...
11
<span id="nav_actived" style="display: none">projet,liste_projets</span>
9f86aeea   Anais Amato   Change navbar act...
12

5aabd083   hitier   Insert descriptio...
13
14
15
16
17
18
19
<div class="card">
  <div class="card-header">
    Fiche Projet
  </div>
  <div class="card-body">
    <dl class="row">
      <dt class="col-sm-2 text-right">ID :</dt>
40126f91   hitier   Update project ro...
20
      <dd class="col-sm-10 text-left">{{project['id']}}</dd>
9b43874a   hitier   Change project_st...
21
      {% for category, labels in project['category_labels'].items() %}
40126f91   hitier   Update project ro...
22
23
        <dt class="col-sm-2 text-right">{{category}} :</dt>
        <dd class="col-sm-10 text-left">{{labels|join(",")}}</dd>
5aabd083   hitier   Insert descriptio...
24
25
26
27
28
29
30
31
32
33
34
35
      {% endfor %}
      <dt class="col-sm-2 text-right">Etat :</dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Date RSP :</dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Fiche projet :</dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Date MAJ de la fiche :</dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Commentaire :</dt>
      <dd class="col-sm-10 text-left"></dd>
    </dl>
a540c9b1   hitier   New project form ...
36
    <a class="card-link" href="{{url_for('main.project_edit', project_id=project.id)}}">Modifier</a>
09551925   hitier   New charge add pa...
37
    <a class="card-link" href="{{url_for('main.charge_add', project_id=project.id)}}">Charger</a>
5aabd083   hitier   Insert descriptio...
38
39
40
  </div>
</div>

de63cb72   hitier   Add title to proj...
41
<div class="charge_chart" id="project_services_chart"></div>
54e2baa6   hitier   Add charge charts...
42
<hr/>
de63cb72   hitier   Add title to proj...
43
<div class="charge_chart" id="project_capacities_chart"></div>
54e2baa6   hitier   Add charge charts...
44
<hr/>
0d6506cb   hitier   New project_charg...
45
46
47
48
<table id="charge_table">
  <thead>
  <tr>
    {% for header in charges[0] %}
b9d90810   hitier   Tweak charges tab...
49
    <th>{{header}}</th>
0d6506cb   hitier   New project_charg...
50
51
52
53
54
55
56
57
58
59
60
61
62
    {% endfor %}
  </tr>
  </thead>
  <tbody>
  {% for line in charges[1:] %}
  <tr>
    {% for cell in line %}
    <td>{{cell}}</td>
    {% endfor %}
  </tr>
  {% endfor %}
  </tbody>
</table>
d7a4e41b   hitier   New project page:...
63
64
65
{% endblock %}

{% block more_scripts %}
54e2baa6   hitier   Add charge charts...
66
{% include 'd3js-includes.html' %}
5e6f4e07   hitier   Set Rokotyan Solu...
67
{% include 'charges-includes.html' %}
715c0527   Anais Amato   Make tables sorta...
68
69
{% include 'datatables-includes.html' %}

54e2baa6   hitier   Add charge charts...
70
71
<script>
  build_chart("#project_services_chart",
de63cb72   hitier   Add title to proj...
72
73
74
      "{{url_for('main.charge_project_csv', project_id=project.id, category='service')}}",
      "{{project.name}}",
      "service");
54e2baa6   hitier   Add charge charts...
75
  build_chart("#project_capacities_chart",
de63cb72   hitier   Add title to proj...
76
77
78
      "{{url_for('main.charge_project_csv', project_id=project.id, category='capacity')}}",
      "{{project.name}}",
      "capacity");
54e2baa6   hitier   Add charge charts...
79
</script>
d7a4e41b   hitier   New project page:...
80
{% endblock %}