home · contact · privacy
Add erroneously uncommited template macros file.
[plomtask] / templates / day.html
index b816f35c3ddbc5057ccf3f2fe28f20ba7045db6d..ac0a64a704cce415cfdc4977597b9de21b2c5dc4 100644 (file)
@@ -1,4 +1,5 @@
-{% extends 'base.html' %}
+{% extends '_base.html' %}
+{% import '_macros.html' as macros %}
 
 
 
@@ -40,6 +41,7 @@ td.todo_line {
 
 <td class="todo_line">-&gt;</td>
 <td class="todo_line"><input name="done" type="checkbox" value="{{node.todo.id_}}" {% if node.todo.is_done %}checked disabled{% endif %} {% if not node.todo.is_doable %}disabled{% endif %}/></td>
+<td class="todo_line"><input name="effort" type="number" step=0.1 size=5 placeholder={{node.todo.process.effort.newest }} value={{node.todo.effort}} /></td>
 <td class="todo_line">
 {% for i in range(indent) %}&nbsp; {% endfor %} +
 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.process.title.newest|e}}</a>{% if node.seen %}){% endif %}
@@ -106,11 +108,6 @@ td.todo_line {
 comment: <input name="day_comment" value="{{day.comment|e}}" />
 <input type="submit" value="OK" /><br />
 add todo: <input name="new_todo" list="processes" autocomplete="off" />
-<datalist id="processes">
-{% for process in processes %}
-<option value="{{process.id_}}">{{process.title.newest|e}}</option>
-{% endfor %}
-</datalist>
 
 <h4>todo</h4>
 
@@ -148,13 +145,9 @@ add todo: <input name="new_todo" list="processes" autocomplete="off" />
 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">
 {% endif %}
 {% endfor %}
-
-<td><input list="todos_for_{{condition.id_}}" /></td>
-<datalist name="new_todo" id="todos_for_{{condition.id_}}" />
-{% for process in enablers_for[condition.id_] %}
-<option value="{{process.id_}}">{{process.title.newest|e}}</option>
-{% endfor %}
-</datalist />
+{% set list_name = "todos_for_%s"|format(condition.id_) %}
+<td><input name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
+{{ macros.datalist_of_titles(list_name, enablers_for[condition.id_]) }}
 </td>
 </tr>
 {% endfor %}
@@ -184,5 +177,6 @@ add todo: <input name="new_todo" list="processes" autocomplete="off" />
 </table>
 
 </form>
-{% endblock %}
 
+{{ macros.datalist_of_titles("processes", processes) }}
+{% endblock %}