1 {% extends 'base.html' %}
3 {% macro process_with_steps(step_id, step_node, indent) %}
6 <input type="hidden" name="steps" value="{{step_id}}" />
7 {% if step_node.is_explicit %}
8 <input type="checkbox" name="keep_step" value="{{step_id}}" checked />
9 <input type="hidden" name="step_{{step_id}}_process_id" value="{{step_node.process.id_}}" />
10 <input type="hidden" name="step_{{step_id}}_parent_id" value="{{step_node.parent_id or ''}}" />
13 <td>{% for i in range(indent) %}+{%endfor %}
14 <a href="process?id={{step_node.process.id_}}">{{step_node.process.title.newest|e}}</a>
17 {% if step_node.is_explicit %}
18 add step: <input name="new_step_to_{{step_id}}" list="candidates" autocomplete="off" />
23 {% for substep_id, substep in step_node.steps.items() %}
24 {{ process_with_steps(substep_id, substep, indent+1) }}
31 <form action="process?id={{process.id_ or ''}}" method="POST">
32 title: <input name="title" value="{{process.title.newest|e}}" />
33 description: <input name="description" value="{{process.description.newest|e}}" />
34 default effort: <input name="effort" type="number" step=0.1 value={{process.effort.newest}} />
36 {% for step_id, step_node in steps.items() %}
37 {{ process_with_steps(step_id, step_node, 0) }}
40 add step: <input name="new_top_step" list="candidates" autocomplete="off" />
41 <datalist id="candidates">
42 {% for candidate in candidates %}
43 <option value="{{candidate.id_}}">{{candidate.title.newest|e}}</option>
46 <input type="submit" value="OK" />