mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-29 17:08:31 -04:00
Standardise appearance of missing data
This makes the rendering the same as for "created_by_name" when the data isn't present. It's a bit more complicated for "updated_at" so I checked that it's implicitly covered by the tests, which fail if I remove the "if" conditional for any of these fields.
This commit is contained in:
@@ -31,11 +31,10 @@ Providers
|
||||
|
||||
{{ text_field(item.active) }}
|
||||
|
||||
{% if item.updated_at %}
|
||||
{{ text_field(item.updated_at|format_datetime_short) }}
|
||||
{% else %}
|
||||
{{ text_field('None') }}
|
||||
{% endif %}
|
||||
{{ optional_text_field(
|
||||
item.updated_at|format_datetime_short if item.updated_at,
|
||||
default='None'
|
||||
) }}
|
||||
|
||||
{{ optional_text_field(item.created_by_name, default='None') }}
|
||||
|
||||
@@ -56,11 +55,10 @@ Providers
|
||||
|
||||
{{ text_field(item.active) }}
|
||||
|
||||
{% if item.updated_at %}
|
||||
{{ text_field(item.updated_at|format_datetime_short) }}
|
||||
{% else %}
|
||||
{{ text_field('None') }}
|
||||
{% endif %}
|
||||
{{ optional_text_field(
|
||||
item.updated_at|format_datetime_short if item.updated_at,
|
||||
default='None'
|
||||
) }}
|
||||
|
||||
{{ optional_text_field(item.created_by_name, default='None') }}
|
||||
{% endcall %}
|
||||
@@ -80,11 +78,10 @@ Providers
|
||||
|
||||
{{ text_field(item.active) }}
|
||||
|
||||
{% if item.updated_at %}
|
||||
{{ text_field(item.updated_at|format_datetime_short) }}
|
||||
{% else %}
|
||||
{{ text_field('None') }}
|
||||
{% endif %}
|
||||
{{ optional_text_field(
|
||||
item.updated_at|format_datetime_short if item.updated_at,
|
||||
default='None'
|
||||
) }}
|
||||
|
||||
{{ optional_text_field(item.created_by_name, default='None') }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user