Blame view

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

{% block more_heads %}
b3cb00e4   Anais Amato   Make tables expor...
4
5
6
7
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css"/>
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.7.0/css/buttons.dataTables.min.css"/>
    <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:...
8
9
10
{% endblock %}

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

5aabd083   hitier   Insert descriptio...
14
15
16
17
18
19
20
<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...
21
      <dd class="col-sm-10 text-left">{{project['id']}}</dd>
9b43874a   hitier   Change project_st...
22
      {% for category, labels in project['category_labels'].items() %}
40126f91   hitier   Update project ro...
23
24
        <dt class="col-sm-2 text-right">{{category}} :</dt>
        <dd class="col-sm-10 text-left">{{labels|join(",")}}</dd>
5aabd083   hitier   Insert descriptio...
25
26
27
28
29
30
31
32
33
34
35
36
      {% 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 ...
37
    <a class="card-link" href="{{url_for('main.project_edit', project_id=project.id)}}">Modifier</a>
09551925   hitier   New charge add pa...
38
    <a class="card-link" href="{{url_for('main.charge_add', project_id=project.id)}}">Charger</a>
5aabd083   hitier   Insert descriptio...
39
40
41
  </div>
</div>

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

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

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