home · contact · privacy
When opening new Process from ProcessStep add field, pre-set as owned by previous...
[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 step_node.is_suppressed %}<del>{% endif %}
18 {% if step_node.seen %}
19 <a href="process?id={{step_node.process.id_}}">({{step_node.process.title.newest|e}})</a>
20 {% else %}
21 <a href="process?id={{step_node.process.id_}}">{{step_node.process.title.newest|e}}</a>
22 {% endif %}
23 {% if step_node.is_suppressed %}<del>{% endif %}
24 </td>
25 <td>
26 {% if step_node.is_explicit %}
27 add sub-step: <input name="new_step_to_{{step_id}}" list="process_candidates" autocomplete="off" />
28 {% elif not step_node.seen %}
29 <input type="checkbox" name="suppresses" value="{{step_id}}" {% if step_node.is_suppressed %}checked{% endif %}> suppress
30 {% endif %}
31 </td>
32 </tr>
33 {% if step_node.is_explicit or not step_node.seen %}
34 {% for substep_id, substep in step_node.steps.items() %}
35 {{ step_with_steps(substep_id, substep, indent+1) }}
36 {% endfor %}
37 {% endif %}
38 {% endmacro %}
39
40
41
42 {% block content %}
43 <h3>{% if is_new %}NEW {% endif %}process</h3>
44 <form action="process?id={{process.id_ or ''}}" method="POST">
45 <table>
46
47 <tr>
48 <th>title</th>
49 <td><input name="title" value="{{process.title.newest|e}}" />{% if process.id_ %} [<a href="process_titles?id={{process.id_}}">history</a>]{% endif %}</td>
50 </tr>
51
52 <tr>
53 <th>default effort</th>
54 <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>
55 </tr>
56
57 <tr>
58 <th>description</th>
59 <td><textarea name="description">{{process.description.newest|e}}</textarea><br />{% if process.id_ %} [<a href="process_descriptions?id={{process.id_}}">history</a>]{% endif %}</td>
60 </tr>
61
62 <tr>
63 <th>calendarize</th>
64 <td><input type="checkbox" name="calendarize" {% if process.calendarize %}checked {% endif %}</td>
65 </tr>
66
67 <tr>
68 <th>conditions</th>
69 <td>{{ macros.simple_checkbox_table("condition", process.conditions, "condition", "condition_candidates") }}</td>
70 </tr>
71
72 <tr>
73 <th>blockers</th>
74 <td>{{ macros.simple_checkbox_table("blocker", process.blockers, "condition", "condition_candidates") }}</td>
75 </tr>
76
77 <tr>
78 <th>enables</th>
79 <td>{{ macros.simple_checkbox_table("enables", process.enables, "condition", "condition_candidates") }}</td>
80 </tr>
81
82 <tr>
83 <th>disables</th>
84 <td>{{ macros.simple_checkbox_table("disables", process.disables, "condition", "condition_candidates") }}</td>
85 </tr>
86
87 <tr>
88 <th>steps</th>
89 <td>
90 <table>
91 {% for step_id, step_node in steps.items() %}
92 {{ step_with_steps(step_id, step_node, 0) }}
93 {% endfor %}
94 </table>
95 add: <input name="new_top_step" list="process_candidates" autocomplete="off" />
96 </td>
97 </tr>
98
99 <tr>
100 <th>step of</th>
101 <td>{{ macros.simple_checkbox_table("step_of", owners, "process", "process_candidates") }}</td>
102 </tr>
103
104 <tr>
105 <th>todos</th>
106 <td>
107 <a href="todos?process_id={{process.id_}}">{{n_todos}}</a><br />
108 </td>
109 </tr>
110
111 </table>
112 {{ macros.edit_buttons() }}
113 </form>
114
115 {{ macros.datalist_of_titles("condition_candidates", condition_candidates) }}
116 {{ macros.datalist_of_titles("process_candidates", process_candidates) }}
117 {% endblock %}