mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 18:37:33 -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) }}
|
{{ text_field(item.active) }}
|
||||||
|
|
||||||
{% if item.updated_at %}
|
{{ optional_text_field(
|
||||||
{{ text_field(item.updated_at|format_datetime_short) }}
|
item.updated_at|format_datetime_short if item.updated_at,
|
||||||
{% else %}
|
default='None'
|
||||||
{{ text_field('None') }}
|
) }}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ optional_text_field(item.created_by_name, default='None') }}
|
{{ optional_text_field(item.created_by_name, default='None') }}
|
||||||
|
|
||||||
@@ -56,11 +55,10 @@ Providers
|
|||||||
|
|
||||||
{{ text_field(item.active) }}
|
{{ text_field(item.active) }}
|
||||||
|
|
||||||
{% if item.updated_at %}
|
{{ optional_text_field(
|
||||||
{{ text_field(item.updated_at|format_datetime_short) }}
|
item.updated_at|format_datetime_short if item.updated_at,
|
||||||
{% else %}
|
default='None'
|
||||||
{{ text_field('None') }}
|
) }}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ optional_text_field(item.created_by_name, default='None') }}
|
{{ optional_text_field(item.created_by_name, default='None') }}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
@@ -80,11 +78,10 @@ Providers
|
|||||||
|
|
||||||
{{ text_field(item.active) }}
|
{{ text_field(item.active) }}
|
||||||
|
|
||||||
{% if item.updated_at %}
|
{{ optional_text_field(
|
||||||
{{ text_field(item.updated_at|format_datetime_short) }}
|
item.updated_at|format_datetime_short if item.updated_at,
|
||||||
{% else %}
|
default='None'
|
||||||
{{ text_field('None') }}
|
) }}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ optional_text_field(item.created_by_name, default='None') }}
|
{{ optional_text_field(item.created_by_name, default='None') }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user