mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Merge pull request #1074 from alphagov/show-last-updated-on-view-providers
Add last updated column (formatted) in view providers table
This commit is contained in:
@@ -18,7 +18,11 @@ def view_providers():
|
||||
providers = provider_client.get_all_providers()['provider_details']
|
||||
email_providers = [email for email in providers if email['notification_type'] == 'email']
|
||||
sms_providers = [sms for sms in providers if sms['notification_type'] == 'sms']
|
||||
return render_template('views/providers.html', email_providers=email_providers, sms_providers=sms_providers)
|
||||
return render_template(
|
||||
'views/providers.html',
|
||||
email_providers=email_providers,
|
||||
sms_providers=sms_providers
|
||||
)
|
||||
|
||||
|
||||
@main.route("/provider/<provider_id>", methods=['GET', 'POST'])
|
||||
|
||||
@@ -11,10 +11,6 @@ Providers – GOV.UK Notify
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-large">Providers</h1>
|
||||
|
||||
<p>
|
||||
Providers on Notify
|
||||
</p>
|
||||
|
||||
<h2 class="heading-medium">SMS</h2>
|
||||
|
||||
{% call(item, row_number) list_table(
|
||||
@@ -22,7 +18,7 @@ Providers – GOV.UK Notify
|
||||
caption="SMS providers",
|
||||
caption_visible=False,
|
||||
empty_message='No email providers',
|
||||
field_headings=['Provider', 'Priority', 'Active', ''],
|
||||
field_headings=['Provider', 'Priority', 'Active', 'Last Updated', ''],
|
||||
field_headings_visible=True
|
||||
) %}
|
||||
|
||||
@@ -32,8 +28,15 @@ Providers – GOV.UK Notify
|
||||
|
||||
{{ text_field(item.active) }}
|
||||
|
||||
{% if item.updated_at %}
|
||||
{{ text_field(item.updated_at|format_datetime_short) }}
|
||||
{% else %}
|
||||
{{ text_field('None') }}
|
||||
{% endif %}
|
||||
|
||||
{{ link_field('change', url_for('main.view_provider', provider_id=item.id)) }}
|
||||
|
||||
|
||||
{% endcall %}
|
||||
|
||||
<h2 class="heading-medium">Email</h2>
|
||||
|
||||
Reference in New Issue
Block a user