home · contact · privacy
Slightly improve and re-organize Condition tests.
[plomtask] / templates / condition.html
index 324c8f8a0efe9c6c05dba0307fd682807983bcdf..7142363b3f2e24b45ed2d250d2e4144bf8406ef0 100644 (file)
@@ -4,62 +4,62 @@
 
 
 {% block content %}
-<h3>condition</h3>
+<h3>
+{% if is_new %}
+add NEW condition
+{% else %}
+edit condition of ID {{condition.id_}}
+{% endif %}
+</h3>
 <form action="condition?id={{condition.id_ or ''}}" method="POST">
-<table>
 
+<table class="edit_table">
 <tr>
 <th>title</th>
-<td><input name="title" value="{{condition.title.newest|e}}" />{% if condition.id_ %} [<a href="condition_titles?id={{condition.id_}}">history</a>]{% endif %}</td>
+<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>
 <tr/>
-
 <tr>
 <th>is active</th>
 <td><input name="is_active" type="checkbox" {% if condition.is_active %}checked{% endif %} /></td>
 <tr/>
-
 <tr>
 <th>description</th>
 <td><textarea name="description">{{condition.description.newest|e}}</textarea>{% if condition.id_ %} [<a href="condition_descriptions?id={{condition.id_}}">history</a>]{% endif %}</td>
 <tr/>
-
 <tr>
 <th>enables</th>
 <td>
 {% for process in enabled_processes %}
-<a href="process?id=process.id_">{{process.title.newest|e}}</a><br />
+<a href="process?id={{process.id_}}">{{process.title.newest|e}}</a><br />
 {% endfor %}
 </td>
 </tr>
-
 <tr>
 <th>disables</th>
 <td>
 {% for process in disabled_processes %}
-<a href="process?id=process.id_">{{process.title.newest|e}}</a><br />
+<a href="process?id={{process.id_}}">{{process.title.newest|e}}</a><br />
 {% endfor %}
 </td>
 </tr>
-
 <tr>
 <th>enabled by</th>
 <td>
 {% for process in enabling_processes %}
-<a href="process?id=process.id_">{{process.title.newest|e}}</a><br />
+<a href="process?id={{process.id_}}">{{process.title.newest|e}}</a><br />
 {% endfor %}
 </td>
 </tr>
-
 <tr>
 <th>disabled by</th>
 <td>
 {% for process in disabling_processes %}
-<a href="process?id=process.id_">{{process.title.newest|e}}</a><br />
+<a href="process?id={{process.id_}}">{{process.title.newest|e}}</a><br />
 {% endfor %}
 </td>
 </tr>
-
 </table>
+
 {{ macros.edit_buttons() }}
 {% endblock %}