home · contact · privacy
Fix Processes listing sorting bug.
[plomtask] / templates / process.html
1 {% extends '_base.html' %}
2 {% import '_macros.html' as macros %}
3
4
5
6 {% block css %}
7 input[name="title"] {
8   width: 100em;
9 }
10 {% endblock %}
11
12
13
14 {% macro step_with_steps(step_id, step_node, indent) %}
15 <tr>
16 <td>
17 <input type="hidden" name="steps" value="{{step_id}}" />
18 {% if step_node.is_explicit %}
19 <input type="checkbox" name="keep_step" value="{{step_id}}" checked />
20 <input type="hidden" name="step_{{step_id}}_process_id" value="{{step_node.process.id_}}" />
21 <input type="hidden" name="step_{{step_id}}_parent_id" value="{{step_node.parent_id or ''}}" />
22 {% endif %}
23 </td>
24 <td>{% for i in range(indent) %}+{%endfor %}
25 {% if step_node.is_suppressed %}<del>{% endif %}
26 {% if step_node.seen %}
27 <a href="process?id={{step_node.process.id_}}">({{step_node.process.title.newest|e}})</a>
28 {% else %}
29 <a href="process?id={{step_node.process.id_}}">{{step_node.process.title.newest|e}}</a>
30 {% endif %}
31 {% if step_node.is_suppressed %}<del>{% endif %}
32 </td>
33 <td>
34 {% if step_node.is_explicit %}
35 add sub-step: <input name="new_step_to_{{step_id}}" list="process_candidates" autocomplete="off" />
36 {% elif not step_node.seen %}
37 <input type="checkbox" name="suppresses" value="{{step_id}}" {% if step_node.is_suppressed %}checked{% endif %}> suppress
38 {% endif %}
39 </td>
40 </tr>
41 {% if step_node.is_explicit or not step_node.seen %}
42 {% for substep_id, substep in step_node.steps.items() %}
43 {{ step_with_steps(substep_id, substep, indent+1) }}
44 {% endfor %}
45 {% endif %}
46 {% endmacro %}
47
48
49
50 {% block content %}
51 <h3>{% if is_new %}NEW {% endif %}process</h3>
52 <form action="process?id={{process.id_ or ''}}" method="POST">
53 <table>
54
55 <tr>
56 <th>title</th>
57 <td><input name="title" value="{{process.title.newest|e}}" />{% if process.id_ %} [<a href="process_titles?id={{process.id_}}">history</a>]{% endif %}</td>
58 </tr>
59
60 <tr>
61 <th>default effort</th>
62 <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>
63 </tr>
64
65 <tr>
66 <th>description</th>
67 <td><textarea name="description">{{process.description.newest|e}}</textarea><br />{% if process.id_ %} [<a href="process_descriptions?id={{process.id_}}">history</a>]{% endif %}</td>
68 </tr>
69
70 <tr>
71 <th>calendarize</th>
72 <td><input type="checkbox" name="calendarize" {% if process.calendarize %}checked {% endif %}</td>
73 </tr>
74
75 <tr>
76 <th>conditions</th>
77 <td>{{ macros.simple_checkbox_table("condition", process.conditions, "condition", "condition_candidates") }}</td>
78 </tr>
79
80 <tr>
81 <th>blockers</th>
82 <td>{{ macros.simple_checkbox_table("blocker", process.blockers, "condition", "condition_candidates") }}</td>
83 </tr>
84
85 <tr>
86 <th>enables</th>
87 <td>{{ macros.simple_checkbox_table("enables", process.enables, "condition", "condition_candidates") }}</td>
88 </tr>
89
90 <tr>
91 <th>disables</th>
92 <td>{{ macros.simple_checkbox_table("disables", process.disables, "condition", "condition_candidates") }}</td>
93 </tr>
94
95 <tr>
96 <th>steps</th>
97 <td>
98 <table>
99 {% for step_id, step_node in steps.items() %}
100 {{ step_with_steps(step_id, step_node, 0) }}
101 {% endfor %}
102 </table>
103 add: <input name="new_top_step" list="process_candidates" autocomplete="off" value="{{preset_top_step or ''}}" />
104 </td>
105 </tr>
106
107 <tr>
108 <th>step of</th>
109 <td>{{ macros.simple_checkbox_table("step_of", owners, "process", "process_candidates") }}</td>
110 </tr>
111
112 <tr>
113 <th>todos</th>
114 <td>
115 <a href="todos?process_id={{process.id_}}">{{n_todos}}</a><br />
116 </td>
117 </tr>
118
119 </table>
120 {{ macros.edit_buttons() }}
121 </form>
122
123 {{ macros.datalist_of_titles("condition_candidates", condition_candidates) }}
124 {{ macros.datalist_of_titles("process_candidates", process_candidates) }}
125 {% endblock %}