From: Christian Heller Date: Sat, 18 May 2024 02:54:14 +0000 (+0200) Subject: Refactor VersionedAttribute history pages templates. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/%7B%7Bprefix%7D%7D/static/todos?a=commitdiff_plain;h=9d71377b8a808bbe96f15768fe79ee02c61f15bc;p=plomtask Refactor VersionedAttribute history pages templates. --- diff --git a/templates/process_descriptions.html b/templates/process_descriptions.html index f1b93cb..15899b1 100644 --- a/templates/process_descriptions.html +++ b/templates/process_descriptions.html @@ -1,23 +1,9 @@ {% extends '_base.html' %} +{% import '_macros.html' as macros %} {% block content %} -

process description history

- - - - - - - -{% for date in process.description.history.keys() | sort(reverse=True) %} - - - - -{% endfor %} - -
process{{process.title.newest|e}}
{{date | truncate(19, True, '') }}
{{process.description.history[date]}}
+{{ macros.history_page("process", process, "description", process.description, as_pre=true) }} {% endblock %} diff --git a/templates/process_efforts.html b/templates/process_efforts.html index 31efcc3..bdfa7dd 100644 --- a/templates/process_efforts.html +++ b/templates/process_efforts.html @@ -1,23 +1,9 @@ {% extends '_base.html' %} +{% import '_macros.html' as macros %} {% block content %} -

process default effort history

- - - - - - - -{% for date in process.effort.history.keys() | sort(reverse=True) %} - - - - -{% endfor %} - -
process{{process.title.newest|e}}
{{date | truncate(19, True, '') }}{{process.effort.history[date]}}
+{{ macros.history_page("process", process, "effort", process.effort) }} {% endblock %} diff --git a/templates/process_titles.html b/templates/process_titles.html index 574ef1c..dd53a62 100644 --- a/templates/process_titles.html +++ b/templates/process_titles.html @@ -1,22 +1,8 @@ {% extends '_base.html' %} +{% import '_macros.html' as macros %} {% block content %} -

process title history

- - - - - - - -{% for date in process.title.history.keys() | sort(reverse=True) %} - - - - -{% endfor %} - -
process{{process.title.newest|e}}
{{date | truncate(19, True, '') }}{{process.title.history[date]}}
+{{ macros.history_page("process", process, "title", process.title) }} {% endblock %}