From: Christian Heller Date: Sat, 18 May 2024 05:02:41 +0000 (+0200) Subject: Add erroneously uncommited template macros file. X-Git-Url: https://plomlompom.com/repos/te"st.html?a=commitdiff_plain;h=f59afccd32d45e60c48d451e6b8304a817627c62;p=plomtask Add erroneously uncommited template macros file. --- 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 %}