From fba6e57cf51ca9ee9d3d96cc95ed2699fd3efb42 Mon Sep 17 00:00:00 2001 From: Dharshana Vanderbona Date: Tue, 10 Sep 2024 14:57:40 +0100 Subject: [PATCH] UI changes Updated the UI to make it more user-friendly. --- .../simple_history/_application_object_history_list.html | 4 ++-- .../templates/simple_history/_review_object_history_list.html | 4 ++-- request_a_govuk_domain/request/templatetags/admin_tags.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/request_a_govuk_domain/request/templates/simple_history/_application_object_history_list.html b/request_a_govuk_domain/request/templates/simple_history/_application_object_history_list.html index 38e81e06..46a51510 100644 --- a/request_a_govuk_domain/request/templates/simple_history/_application_object_history_list.html +++ b/request_a_govuk_domain/request/templates/simple_history/_application_object_history_list.html @@ -25,7 +25,7 @@

Full event history

{% trans 'Date/time' %} {% trans 'User' %} - {% trans 'Change fields' %} + {% trans 'Changed Fields' %} @@ -47,7 +47,7 @@

Full event history

{% endif %} - {{ action | changed_fields }} + {{ action | changed_fields }} {% endfor %} diff --git a/request_a_govuk_domain/request/templates/simple_history/_review_object_history_list.html b/request_a_govuk_domain/request/templates/simple_history/_review_object_history_list.html index 38e94293..370c58bd 100644 --- a/request_a_govuk_domain/request/templates/simple_history/_review_object_history_list.html +++ b/request_a_govuk_domain/request/templates/simple_history/_review_object_history_list.html @@ -18,7 +18,7 @@ } -

{% blocktrans %} Status change history{% endblocktrans %}

+

Status change history

@@ -65,7 +65,7 @@

Full event history

- + diff --git a/request_a_govuk_domain/request/templatetags/admin_tags.py b/request_a_govuk_domain/request/templatetags/admin_tags.py index f5b1fe21..655cac72 100644 --- a/request_a_govuk_domain/request/templatetags/admin_tags.py +++ b/request_a_govuk_domain/request/templatetags/admin_tags.py @@ -17,8 +17,8 @@ def changed_fields(obj): if obj.prev_record: delta = obj.diff_against(obj.prev_record) changes = list(filter(lambda x: x != "last_updated_by", delta.changed_fields)) - return changes if changes else "--" - return "-" + return ", ".join(changes) if changes else "No Changes" + return "Initial Data" @register.filter
{% trans 'Date/time' %} {% trans 'User' %}{% trans 'Change fields' %}{% trans 'Changed Fields' %}