home · contact · privacy
Minor template improvements.
[plomtask] / templates / process.html
1 {% extends '_base.html' %}
2 {% import '_macros.html' as macros %}
3
4
5
6 {% macro step_with_steps(step_id, step_node, indent) %}
7 <tr>
8 <td>
9 <input type="hidden" name="steps" value="{{step_id}}" />
10 {% if step_node.is_explicit %}
11 <input type="checkbox" name="keep_step" value="{{step_id}}" checked />
12 <input type="hidden" name="step_{{step_id}}_process_id" value="{{step_node.process.id_}}" />
13 <input type="hidden" name="step_{{step_id}}_parent_id" value="{{step_node.parent_id or ''}}" />
14 {% endif %}
15 </td>
16 <td>{% for i in range(indent) %}+{%endfor %}
17 {% if (not step_node.is_explicit) and step_node.seen %}
18 <a href="process?id={{step_node.process.id_}}">({{step_node.process.title.newest|e}})</a>
19 {% else %}
20 <a href="process?id={{step_node.process.id_}}">{{step_node.process.title.newest|e}}</a>
21 {% endif %}
22 </td>
23 <td>
24 {% if step_node.is_explicit %}
25 add: <input name="new_step_to_{{step_id}}" list="candidates" autocomplete="off" />
26 {% endif %}
27 </td>
28 </tr>
29 {% if step_node.is_explicit or not step_node.seen %}
30 {% for substep_id, substep in step_node.steps.items() %}
31 {{ step_with_steps(substep_id, substep, indent+1) }}
32 {% endfor %}
33 {% endif %}
34 {% endmacro %}
35
36
37
38 {% block content %}
39 <h3>process</h3>
40 <form action="process?id={{process.id_ or ''}}" method="POST">
41 <table>
42
43 <tr>
44 <th>title</th>
45 <td><input name="title" value="{{process.title.newest|e}}" />{% if process.id_ %} [<a href="process_titles?id={{process.id_}}">history</a>]{% endif %}</td>
46 </tr>
47
48 <tr>
49 <th>default effort</th>
50 <td><input name="effort" type="number" step=0.1 value={{process.effort.newest}} />{% if process.id_ %} [<a href="process_efforts?id={{process.id_}}">history</a>]{% endif %}</td>
51 </tr>
52
53 <tr>
54 <th>description</th>
55 <td><textarea name="description">{{process.description.newest|e}}</textarea><br />{% if process.id_ %} [<a href="process_descriptions?id={{process.id_}}">history</a>]{% endif %}</td>
56 </tr>
57
58 <tr>
59 <th>calendarize</th>
60 <td><input type="checkbox" name="calendarize" {% if process.calendarize %}checked {% endif %}</td>
61 </tr>
62
63 <tr>
64 <th>conditions</th>
65 <td>{{ macros.simple_checkbox_table("condition", process.conditions, "condition", "condition_candidates") }}</td>
66 </tr>
67
68 <tr>
69 <th>enables</th>
70 <td>{{ macros.simple_checkbox_table("enables", process.enables, "condition", "condition_candidates") }}</td>
71 </tr>
72
73 <tr>
74 <th>disables</th>
75 <td>{{ macros.simple_checkbox_table("disables", process.disables, "condition", "condition_candidates") }}</td>
76 </tr>
77
78 <tr>
79 <th>steps</th>
80 <td>
81 <table>
82 {% for step_id, step_node in steps.items() %}
83 {{ step_with_steps(step_id, step_node, 0) }}
84 {% endfor %}
85 </table>
86 add: <input name="new_top_step" list="step_candidates" autocomplete="off" />
87 </td>
88 <tr>
89
90 <tr>
91 <th>step of</th>
92 <td>
93 {% for owner in owners %}
94 <a href="process?id={{owner.id_}}">{{owner.title.newest|e}}</a><br />
95 {% endfor %}
96 </td>
97 <tr>
98
99 </table>
100 {{ macros.edit_buttons() }}
101 </form>
102
103 {{ macros.datalist_of_titles("condition_candidates", condition_candidates) }}
104 {{ macros.datalist_of_titles("step_candidates", step_candidates) }}
105 {% endblock %}