home · contact · privacy
Simplify JSON-ification of VersionedAttributes.
[plomtask] / templates / condition.html
1 {% extends '_base.html' %}
2 {% import '_macros.html' as macros %}
3
4
5
6 {% block content %}
7 <h3>
8 {% if is_new %}
9 add NEW condition
10 {% else %}
11 edit condition of ID {{condition.id_}}
12 {% endif %}
13 </h3>
14 <form action="condition?id={{condition.id_ or ''}}" method="POST">
15
16 <table class="edit_table">
17 <tr>
18 <th>title</th>
19 <td><input name="title" type="text" value="{{condition.title.newest|e}}" />{% if condition.id_ %} [<a href="condition_titles?id={{condition.id_}}">history</a>]{% endif %}</td>
20 <tr/>
21 <tr>
22 <th>is active</th>
23 <td><input name="is_active" type="checkbox" {% if condition.is_active %}checked{% endif %} /></td>
24 <tr/>
25 <tr>
26 <th>description</th>
27 <td><textarea name="description">{{condition.description.newest|e}}</textarea>{% if condition.id_ %} [<a href="condition_descriptions?id={{condition.id_}}">history</a>]{% endif %}</td>
28 <tr/>
29 <tr>
30 <th>enables</th>
31 <td>
32 {% for process in enabled_processes %}
33 <a href="process?id={{process.id_}}">{{process.title.newest|e}}</a><br />
34 {% endfor %}
35 </td>
36 </tr>
37 <tr>
38 <th>disables</th>
39 <td>
40 {% for process in disabled_processes %}
41 <a href="process?id={{process.id_}}">{{process.title.newest|e}}</a><br />
42 {% endfor %}
43 </td>
44 </tr>
45 <tr>
46 <th>enabled by</th>
47 <td>
48 {% for process in enabling_processes %}
49 <a href="process?id={{process.id_}}">{{process.title.newest|e}}</a><br />
50 {% endfor %}
51 </td>
52 </tr>
53 <tr>
54 <th>disabled by</th>
55 <td>
56 {% for process in disabling_processes %}
57 <a href="process?id={{process.id_}}">{{process.title.newest|e}}</a><br />
58 {% endfor %}
59 </td>
60 </tr>
61 </table>
62
63 {{ macros.edit_buttons() }}
64 {% endblock %}
65