home · contact · privacy
0f0f0c5a49e5bef9db9b9eb558f7d416afedd4fa
[plomtask] / templates / process.html
1 {% extends 'base.html' %}
2
3 {% macro process_with_children(node, indent) %}
4 <tr>
5 <td>
6 <input type="checkbox" name="children" value="{{node.process.id_}}" checked />
7 </td>
8 <td>
9 {% for i in range(indent) %}+{%endfor %}
10 <a href="process?id={{node.process.id_}}">{{node.process.title.newest|e}}</a>
11 </td>
12 </tr>
13 {% for child in node.children %}
14 {{ process_with_children(child, indent+1) }}
15 {% endfor %}
16 {% endmacro %}
17
18 {% block content %}
19 <h3>Process</h3>
20 <form action="process?id={{process.id_ or ''}}" method="POST">
21 title: <input name="title" value="{{process.title.newest|e}}" />
22 description: <input name="description" value="{{process.description.newest|e}}" />
23 default effort: <input name="effort" type="number" step=0.1 value={{process.effort.newest}} />
24 <table>
25 {% for child in children %}
26 {{ process_with_children(child, 0) }}
27 {% endfor %}
28 </table>
29 add child: <input name="children" list="candidates" autocomplete="off" />
30 <datalist id="candidates">
31 {% for candidate in candidates %}
32 <option value="{{candidate.id_}}">{{candidate.title.newest|e}}</option>
33 {% endfor %}
34 </datalist>
35 <input type="submit" value="OK" />
36 </form>
37 {% endblock %}
38
39