home · contact · privacy
Fix.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 23 Feb 2024 04:18:52 +0000 (05:18 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 23 Feb 2024 04:18:52 +0000 (05:18 +0100)
todo_templates/macros.html [new file with mode: 0644]
todo_templates/message.html [new file with mode: 0644]

diff --git a/todo_templates/macros.html b/todo_templates/macros.html
new file mode 100644 (file)
index 0000000..66751ac
--- /dev/null
@@ -0,0 +1,41 @@
+
+
+
+{% macro tagselection(submit_name, selected_tags, all_tags) %}
+<input name="{{submit_name}}" value="" size=15 list="tags" autocomplete="off" />
+{% for selected_tag in selected_tags | sort %}
+<select name="{{submit_name}}">
+<option></option>
+{% for tag in all_tags | sort %}<option value="{{tag|e}}" {% if selected_tag == tag %}selected{% endif %}>{{tag|e}}</option>
+{% endfor %}
+</select>
+{% endfor %}
+<datalist id="tags">
+{% for tag in all_tags %}<option value="{{tag}}">{{tag}}</option>
+{% endfor %}
+</datalist>
+{% endmacro %}
+
+
+
+{% macro sort_head(sort, name_internal, display_name, sort_key="sort") %}
+<th {% if sort == name_internal %}class="desc"{% elif sort == '-' + name_internal %}class="asc"{% endif %}>
+<a href="?{{sort_key}}={% if sort == name_internal %}-{% endif %}{{name_internal}}">{{display_name}}</a>
+</th>
+{% endmacro %}
+
+
+
+{% macro doneness_string(todo, respect_cancelled=false, datalist_hack=false) %}
+[{% if todo.done and not (respect_cancelled and "cancelled" in todo.tags) %}✓{% else %}{% if datalist_hack %}&nbsp;&nbsp;{% else %} {% endif %}{% endif %}]
+{% endmacro %}
+
+
+
+{% macro datalist_tasks(tasks, with_weight=false) %}
+<datalist id="tasks">
+{% for task in tasks %}
+<option value="{{task.id_}}">{% if with_weight %}({{task.deps_weight}}) {% endif %}{{task.title.now}}</option>
+{% endfor %}
+</datalist>
+{% endmacro %}
diff --git a/todo_templates/message.html b/todo_templates/message.html
new file mode 100644 (file)
index 0000000..7d07bfa
--- /dev/null
@@ -0,0 +1,8 @@
+{% extends 'base.html' %}
+
+{% block content %}
+<p>
+{{ message|e }}
+</p>
+{% endblock %}
+