From f59afccd32d45e60c48d451e6b8304a817627c62 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 18 May 2024 07:02:41 +0200 Subject: [PATCH] Add erroneously uncommited template macros file. --- templates/_macros.html | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 templates/_macros.html diff --git a/templates/_macros.html b/templates/_macros.html new file mode 100644 index 0000000..25d94c5 --- /dev/null +++ b/templates/_macros.html @@ -0,0 +1,55 @@ +{% macro edit_buttons() %} + +
+ +
+{% endmacro %} + + + +{% macro datalist_of_titles(title, candidates) %} + +{% for candidate in candidates %} + +{% endfor %} + +{% endmacro %} + + + +{% macro simple_checkbox_table(title, items, type_name, list_name, add_string="add") %} + +{% for item in items %} + + + + +{% endfor %} +
+ + +{{item.title.newest|e}} +
+{{add_string}}: +{% endmacro %} + + + +{% macro history_page(item_name, item, attribute_name, attribute, as_pre=false) %} +

{{item_name}} {{attribute_name}} history

+ + + + + + + +{% for date in attribute.history.keys() | sort(reverse=True) %} + + + + +{% endfor %} + +
{{item_name}}{{item.title.newest|e}}
{{date | truncate(19, True, '') }}{% if as_pre %}
{% endif %}{{attribute.history[date]}}{% if as_pre %}
{% endif %}
+{% endmacro %} -- 2.30.2