edit_base.html
5.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{% extends "base.html" %}
{% load url_view_to_edit %}
{% block title %}
Routine Manager
{% endblock %}
{% block content %}
<div class="row text-center" style="margin-top: 20px;">
<ul class="nav nav-tabs col-lg-4" style="margin-bottom: 15px;">
{% if depth_level > 0 %}
<li {% if depth_level == 1 %}class="active"{% endif %}><a href="{% url "action_request" req_id action%}" >Request Info</a></li>
{% endif %}
{% if depth_level > 1 %}
<li {% if depth_level == 2 %}class="active"{% endif %}><a href="{% url "action_sequence" seq_id action%}" >Sequence Info</a></li>
{% endif %}
{% if depth_level > 2 %}
<li {% if depth_level == 3 %}class="active"{% endif %}><a href="{% url "action_album" alb_id action%}" >Album Info</a></li>
{% endif %}
{% if depth_level > 3 %}
<li {% if depth_level == 4 %}class="active"{% endif %}><a href="{% url "action_plan" plan_id action%}" >Plan Info</a></li>
{% endif %}
</ul>
<div class="nav-tabs col-lg-6 text-left" style="margin-top:1px">
<div class="row col-lg-4">
{% if req.submitted == False %}
{% if req.complete == True %}
<a href="{% url "submit_request" req.id "action_request" %}" class="btn btn-info" onclick="return confirm('The request will be validated, and the sequences scheduled')"
title="The request will be validated, and the sequences scheduled">Submit request for scheduling</a>
{% else %}
<a class="btn btn-info" onclick="return confirm('The request must be complete to be submitted')"
title="The request must be complete to be submitted">Submit request for scheduling</a>
{% endif %}
{% else %}
<a href="{% url "unsubmit_request" req.id %}" class="btn btn-warning" onclick="return confirm('The request will be unvalidated, and the unexecuted sequences, unscheduled')"
title="The request will be unvalidated, and the unexecuted sequences, unscheduled">Unsubmit request</a>
{% endif %}
</div>
<div class="row col-lg-4">
<a href="{% url "export_request" req.id %}" class="btn btn-info">Export request as XML file</a>
</div>
<div class="row col-lg-4">
TODO : ajouter checkbox pour choisir en dynamique JD / GD
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<h3>
{% block section_title %}
{% endblock %}
</h3>
{% block fields %}
{% endblock %}
{% if action == "view" %}
<a href="{{request.path|url_view_to_edit }}" class="btn btn-primary">Move to edition mode</a>
{% endif %}
</div>
<div class="col-lg-6">
<div class="row col-lg-12">
<div class="panel-heading"><h3>Summary</h3></div>
<div class="well" style="overflow:scroll; height:350px;">
<div>
<a class="btn btn-sm {% if req.complete %}btn-success{% else %}btn-danger{% endif %}" href="{% url "action_request" req_id action%}" >Request: {{ req.name }}</a>
{% if depth_level == 1 %}<span class="label label-info">{{action}}ing ...</span>{% endif %}
</div>
{% for seq in req.sequences.all %}
<div>
<a class="btn btn-sm {% if seq.status != "INCPL" %}btn-success{% else %}btn-danger{% endif %}" href="{% url "action_sequence" seq.id action%}" style="margin-left: 60px" >Sequence: {{ seq.name }}</a>
{% if depth_level == 2 and seq_id == seq.id %}<span class="label label-info">{{action}}ing ...</span>{% endif %}
</div>
{% for album in seq.albums.all %}
<div>
<a class="btn btn-sm {% if album.complete %}btn-success{% else %}btn-danger{% endif %}" href="{% url "action_album" album.id action%}" style="margin-left: 120px" >Album: {{ album.name }}</a>
{% if depth_level == 3 and alb_id == album.id %}<span class="label label-info">{{action}}ing ...</span>{% endif %}
</div>
{% for plan in album.plans.all %}
<div>
<a class="btn btn-sm {% if plan.complete %}btn-success{% else %}btn-danger{% endif %}" href="{% url "action_plan" plan.id action%}" style="margin-left: 180px" >Plan: {{ plan.name }}</a>
{% if depth_level == 4 and plan_id == plan.id %}<span class="label label-info">{{action}}ing ...</span>{% endif %}
</div>
{% endfor %}
{% endfor %}
{% endfor %}
</div>
</div>
{% block children %}
{% endblock %}
</div>
</div>
{% endblock %}