X-Git-Url: https://plomlompom.com/repos/?p=misc;a=blobdiff_plain;f=todo_templates%2Fday_todos.html;fp=todo_templates%2Fday_todos.html;h=8cf87fbd8c9d00c44d53eda35a89cb521331003e;hp=0000000000000000000000000000000000000000;hb=2ad9f7785539c0cd9f119d1f22b8057fab348114;hpb=59056f396c4761f9cd7ffbc569e3ddf8994d5e83
diff --git a/todo_templates/day_todos.html b/todo_templates/day_todos.html
new file mode 100644
index 0000000..8cf87fb
--- /dev/null
+++ b/todo_templates/day_todos.html
@@ -0,0 +1,240 @@
+{% extends 'base.html' %}
+
+
+
+{% block css %}
+td.checkbox { text-align: center; }
+td { vertical-align: middle; }
+td button { padding: 0em; }
+th.centered { text-align: center; }
+ul { padding-left: 1.5em; margin: 0; }
+details > summary.todo {
+ list-style-type: ' ';
+}
+details > summary.has_dependers {
+ list-style-type: '[+]:';
+}
+details[open] > summary.has_dependers {
+ list-style-type: '[â¼]:';
+}
+details > summary.has_deps::after {
+ content: ':[+]';
+}
+details[open] > summary.has_deps::after {
+ content: ':[â¼]';
+}
+table.undone_todos tr.deps_undone {
+ background-color: #cccccc;
+}
+details.adoptables {
+ margin-bottom: 1em;
+}
+details.adoptables summary span {
+ background-color: #cccccc;
+}
+table.undone_todos tr td {
+ border-bottom: 1px dotted black;
+}
+td.left { text-align: left; }
+td.unbreakable { white-space: nowrap; }
+{% endblock %}
+
+
+
+{% macro todo_title_expandable(todo, show_deps_doneness, ignore=0) %}
+{% if todo.has_dependers or todo.has_deps %}
+
+
+{% else %}
+
+{% endif %}
+{{todo.title|e}}
+{% if todo.has_dependers or todo.has_deps %}
+
+{% if todo.has_dependers %}
+dependers:
+
+{% for path in todo.depender_paths %}
+- {% for depender_todo in path %}{{ depender_todo.title|e }}{% if not loop.last %}:{% endif %}{% endfor %}
+{% endfor %}
+
+{% endif %}
+{% if todo.has_deps %}
+depends on:
+
+{% for dep_todo in todo.deps %}
+-
+{% if show_deps_doneness == true %}{{ macros.doneness_string(dep_todo) }}{% endif %}
+{{ dep_todo.title|e }}{% if dep_todo.has_deps %}:+{% endif %}
+{% endfor %}
+
+{% endif %}
+
+{% endif %}
+{% endmacro %}
+
+
+
+{% macro todo_title_as_tree_node(todo, indent) %}
+{% for i in range(indent-1) %} {% endfor %}
+{% if indent>0 %} +{% endif %}
+{% if todo.been_observed %}({% endif %}{{todo.title}}{% if todo.been_observed %}){% endif %}
+{% endmacro %}
+
+
+
+{% macro draw_undone_todo_row(todo, title_drawer, indent_or_doneness) %}
+
+{% if todo.already_listed %}
+ |
+ |
+ |
+
+{{ title_drawer(todo, indent_or_doneness ) }}
+ |
+ |
+{% else %}
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+{{ title_drawer(todo, indent_or_doneness) }}
+ |
+
+
+ |
+{% endif %}
+
+{% endmacro %}
+
+
+
+{% macro draw_done_todo_row(todo, title_drawer, indent) %}
+
+{{ '{:4.1f}'.format(todo.effort_at_selected_date) }} |
+{{ '{:4.1f}'.format(todo.effort_at_selected_date + todo.dep_efforts) }} |
+
+{{ title_drawer(todo, indent) }}
+ |
+
+
+{{ todo.comment }} |
+
+{% endmacro %}
+
+
+
+{% macro draw_todo_rows(todos, is_tree_shaped, todo_row_drawer, indent, show_deps_doneness=false) %}
+{% for todo in todos %}
+{% if is_tree_shaped %}
+{{ todo_row_drawer(todo, todo_title_as_tree_node, indent) }}
+{% if not todo.been_observed and todo.deps %}
+{{ draw_todo_rows(todo.deps, is_tree_shaped, todo_row_drawer, indent+1) }}
+{% endif %}
+{% else %}
+{{ todo_row_drawer(todo, todo_title_expandable, show_deps_doneness) }}
+{% endif %}
+{{ todo.observe() }}
+{% endfor %}
+{% endmacro %}
+
+
+
+{% block content %}
+day todos
+
+
+
+{% if done_todos %}
+done
+
+
+{{ macros.sort_head(done_sort, "effort_at_selected_date", "single
effort", "done_sort") }}
+{{ macros.sort_head(done_sort, "family_effort", "family
effort", "done_sort") }}
+{{ macros.sort_head(done_sort, "title", "todo", "done_sort") }}
+comment |
+
+{{ draw_todo_rows(done_todos, is_tree_shaped, draw_done_todo_row, 0) }}
+
+{% endif %}
+
+{% include 'watch_form.html' %}
+
+{% endblock %}