X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=templates%2F_macros.html;h=a19c06381320461baf7b1622b475d7d0d244440b;hb=6c3fca10aa663422abc48b96b38628dc2771701a;hp=25d94c58ce72a0a52f483c3251a30f9c3496ab51;hpb=f59afccd32d45e60c48d451e6b8304a817627c62;p=plomtask diff --git a/templates/_macros.html b/templates/_macros.html index 25d94c5..a19c063 100644 --- a/templates/_macros.html +++ b/templates/_macros.html @@ -17,7 +17,8 @@ -{% macro simple_checkbox_table(title, items, type_name, list_name, add_string="add") %} +{% macro simple_checkbox_table(title, items, type_name, list_name, add_string="add", historical=false) %} +{% if items|length > 0 %} {% for item in items %} @@ -25,18 +26,20 @@ {% endfor %}
-{{item.title.newest|e}} +{% if historical is true %}{{item.title_then}}{% else %}{{item.title.newest|e}}{% endif %}
-{{add_string}}: +{% endif %} +{{add_string}}: {% endmacro %} {% macro history_page(item_name, item, attribute_name, attribute, as_pre=false) %}

{{item_name}} {{attribute_name}} history

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