From 9d71377b8a808bbe96f15768fe79ee02c61f15bc Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 18 May 2024 04:54:14 +0200 Subject: [PATCH] Refactor VersionedAttribute history pages templates. --- templates/process_descriptions.html | 18 ++---------------- templates/process_efforts.html | 18 ++---------------- templates/process_titles.html | 18 ++---------------- 3 files changed, 6 insertions(+), 48 deletions(-) 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 %} -- 2.30.2