Blame view

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

{% block more_heads %}
715c0527   Anais Amato   Make tables sorta...
4
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='lib/datatables-1.10.24/css/datatables.min.css') }}"/>
76739351   hitier   Versionize any cu...
5
<link href="{{ url_for('main.static', filename='css/charges.css', version=config.VERSION) }}" rel="stylesheet" type="text/css"/>
d7a4e41b   hitier   New project page:...
6
7
8
{% endblock %}

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

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

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

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

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