home · contact · privacy
Nest Todo creation by adopting and making children as needed.
[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 sub-step: <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>blockers</th>
70 <td>{{ macros.simple_checkbox_table("blocker", process.blockers, "condition", "condition_candidates") }}</td>
71 </tr>
72
73 <tr>
74 <th>enables</th>
75 <td>{{ macros.simple_checkbox_table("enables", process.enables, "condition", "condition_candidates") }}</td>
76 </tr>
77
78 <tr>
79 <th>disables</th>
80 <td>{{ macros.simple_checkbox_table("disables", process.disables, "condition", "condition_candidates") }}</td>
81 </tr>
82
83 <tr>
84 <th>steps</th>
85 <td>
86 <table>
87 {% for step_id, step_node in steps.items() %}
88 {{ step_with_steps(step_id, step_node, 0) }}
89 {% endfor %}
90 </table>
91 add: <input name="new_top_step" list="step_candidates" autocomplete="off" />
92 </td>
93 <tr>
94
95 <tr>
96 <th>step of</th>
97 <td>
98 {% for owner in owners %}
99 <a href="process?id={{owner.id_}}">{{owner.title.newest|e}}</a><br />
100 {% endfor %}
101 </td>
102 <tr>
103
104 </table>
105 {{ macros.edit_buttons() }}
106 </form>
107
108 {{ macros.datalist_of_titles("condition_candidates", condition_candidates) }}
109 {{ macros.datalist_of_titles("step_candidates", step_candidates) }}
110 {% endblock %}