home · contact · privacy
Improve template layouts.
[plomtask] / templates / todo.html
index 1fa2922c7c7912b67b1d77a42db6d816b9534ccc..44cdfa7eec24de0db04dd1eaa3984fa3abea41d4 100644 (file)
@@ -1,15 +1,35 @@
 {% 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 /> 
-</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>
@@ -22,18 +42,18 @@ done: <input type="checkbox" name="done" {% if todo.is_done %}checked {% endif %
 </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>fulfills</h4>
+add: <input name="condition" list="condition_candidates" autocomplete="off" />
+</td>
+</tr>
+
+<tr>
+<th>enables</th>
+<td>
 <table>
-{% for condition in todo.fulfills %}
+{% for condition in todo.enables %}
 <tr>
 <td>
-<input type="checkbox" name="fulfills" value="{{condition.id_}}" checked />
+<input type="checkbox" name="enables" value="{{condition.id_}}" checked />
 </td>
 <td>
 <a href="condition?id={{condition.id_}}">{{condition.title.newest|e}}</a>
@@ -41,13 +61,18 @@ add condition: <input name="condition" list="condition_candidates" autocomplete=
 </tr>
 {% endfor %}
 </table>
-add fulfills: <input name="fulfills" list="condition_candidates" autocomplete="off" />
-<h4>undoes</h4>
+add: <input name="enables" list="condition_candidates" autocomplete="off" />
+</td>
+</tr>
+
+<tr>
+<th>disables</th>
+<td>
 <table>
-{% for condition in todo.undoes%}
+{% for condition in todo.disables%}
 <tr>
 <td>
-<input type="checkbox" name="undoes" value="{{condition.id_}}" checked />
+<input type="checkbox" name="disables" value="{{condition.id_}}" checked />
 </td>
 <td>
 <a href="condition?id={{condition.id_}}">{{condition.title.newest|e}}</a>
@@ -55,25 +80,49 @@ add fulfills: <input name="fulfills" list="condition_candidates" autocomplete="o
 </tr>
 {% endfor %}
 </table>
-add undoes: <input name="undoes" 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><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" />
+</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>
+
+<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>
-<input type="submit" value="OK" />
-</form
 {% endblock %}