{% extends 'base.html' %}
+
+
{% block content %}
<h3>Todo: {{todo.process.title.newest|e}}</h3>
<form action="todo?id={{todo.id_}}" method="POST">
-<p>
-id: {{todo.id_}}<br />
-day: <a href="day?date={{todo.date}}">{{todo.date}}</a><br />
-process: <a href="process?id={{todo.process.id_}}">{{todo.process.title.newest|e}}</a><br />
-done: <input type="checkbox" name="done" {% if todo.is_done %}checked {% endif %} {% if not todo.is_doable %}disabled {% endif %}/><br />
-comment: <input name="comment" value="{{todo.comment|e}}"/>
-</p>
-<h4>conditions</h4>
+<table>
+
+<tr>
+<th>day</th>
+<td><a href="day?date={{todo.date}}">{{todo.date}}</a></td>
+</tr>
+
+<tr>
+<th>process</th>
+<td><a href="process?id={{todo.process.id_}}">{{todo.process.title.newest|e}}</a></td>
+</tr>
+
+<tr>
+<th>done</th>
+<td><input type="checkbox" name="done" {% if todo.is_done %}checked {% endif %} {% if not todo.is_doable %}disabled {% endif %}/><br /></td>
+</tr>
+
+<tr>
+<th>comment</th>
+<td><input name="comment" value="{{todo.comment|e}}"/></td>
+</tr>
+
+<tr>
+<th>conditions</th>
+<td>
<table>
{% for condition in todo.conditions %}
<tr>
</tr>
{% endfor %}
</table>
-add condition: <input name="condition" list="condition_candidates" autocomplete="off" />
-<datalist id="condition_candidates">
-{% for condition_candidate in condition_candidates %}
-<option value="{{condition_candidate.id_}}">{{condition_candidate.title.newest|e}}</option>
-{% endfor %}
-</datalist>
-<h4>enables</h4>
+add: <input name="condition" list="condition_candidates" autocomplete="off" />
+</td>
+</tr>
+
+<tr>
+<th>enables</th>
+<td>
<table>
{% for condition in todo.enables %}
<tr>
</tr>
{% endfor %}
</table>
-add enables: <input name="enables" list="condition_candidates" autocomplete="off" />
-<h4>disables</h4>
+add: <input name="enables" list="condition_candidates" autocomplete="off" />
+</td>
+</tr>
+
+<tr>
+<th>disables</th>
+<td>
<table>
{% for condition in todo.disables%}
<tr>
</tr>
{% endfor %}
</table>
-add disables: <input name="disables" list="condition_candidates" autocomplete="off" />
-<h4>parents</h4>
-<ul>
+add: <input name="disables" list="condition_candidates" autocomplete="off" />
+</td>
+</tr>
+
+<tr>
+<th>parents</th>
+<td>
{% for parent in todo.parents %}
-<li><a href="todo?id={{parent.id_}}">{{parent.process.title.newest|e}}</a>
+<a href="todo?id={{parent.id_}}">{{parent.process.title.newest|e}}</a><br />
{% endfor %}
-</ul>
-<h4>children</h4>
-<ul>
+</td>
+</tr>
+
+<tr>
+<th>children</th>
+<td>
+<table>
{% for child in todo.children %}
-<li><input type="checkbox" name="adopt" value="{{child.id_}}" checked />
-<a href="todo?id={{child.id_}}">{{child.process.title.newest|e}}</a>
+<tr>
+<td><input type="checkbox" name="adopt" value="{{child.id_}}" checked /></td>
+<td><a href="todo?id={{child.id_}}">{{child.process.title.newest|e}}</a></td>
+</tr>
{% endfor %}
-</ul>
+</table>
adopt: <input name="adopt" list="todo_candidates" autocomplete="off" />
-<datalist id="todo_candidates">
-{% for candidate in todo_candidates %}
-<option value="{{candidate.id_}}">{{candidate.process.title.newest|e}} ({{candidate.id_}})</option>
-{% endfor %}
-</datalist>
+</td>
+</tr>
+</table>
<input class="btn-harmless" type="submit" name="update" value="update" />
<div class="btn-to-right">
<input class="btn-dangerous" type="submit" name="delete" value="delete" />
</div>
+</form>
-</form
+<datalist id="condition_candidates">
+{% for condition_candidate in condition_candidates %}
+<option value="{{condition_candidate.id_}}">{{condition_candidate.title.newest|e}}</option>
+{% endfor %}
+</datalist>
+<datalist id="todo_candidates">
+{% for candidate in todo_candidates %}
+<option value="{{candidate.id_}}">{{candidate.process.title.newest|e}} ({{candidate.id_}})</option>
+{% endfor %}
+</datalist>
{% endblock %}