From: Christian Heller <c.heller@plomlompom.de> Date: Sat, 18 May 2024 02:54:14 +0000 (+0200) Subject: Refactor VersionedAttribute history pages templates. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/error?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 %} -<h3>process description history</h3> -<table> - -<tr> -<th>process</th> -<td><a href="process?id={{process.id_}}">{{process.title.newest|e}}</a></td> -</tr> - -{% for date in process.description.history.keys() | sort(reverse=True) %} -<tr> -<th>{{date | truncate(19, True, '') }}</th> -<td><pre>{{process.description.history[date]}}</pre></td> -</tr> -{% endfor %} - -</table> +{{ 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 %} -<h3>process default effort history</h3> -<table> - -<tr> -<th>process</th> -<td><a href="process?id={{process.id_}}">{{process.title.newest|e}}</a></td> -</tr> - -{% for date in process.effort.history.keys() | sort(reverse=True) %} -<tr> -<th>{{date | truncate(19, True, '') }}</th> -<td>{{process.effort.history[date]}}</td> -</tr> -{% endfor %} - -</table> +{{ 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 %} -<h3>process title history</h3> -<table> - -<tr> -<th>process</th> -<td><a href="process?id={{process.id_}}">{{process.title.newest|e}}</a></td> -</tr> - -{% for date in process.title.history.keys() | sort(reverse=True) %} -<tr> -<th>{{date | truncate(19, True, '') }}</th> -<td>{{process.title.history[date]}}</td> -</tr> -{% endfor %} - -</table> +{{ macros.history_page("process", process, "title", process.title) }} {% endblock %}