mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 00:48:25 -04:00
Reword ‘recent templates’ section of dashboard
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
{% from "components/table.html" import list_table, field, right_aligned_field_heading %}
|
{% from "components/table.html" import list_table, field, hidden_field_heading, right_aligned_field_heading %}
|
||||||
{% call(item, row_number) list_table(
|
{% call(item, row_number) list_table(
|
||||||
template_statistics,
|
template_statistics,
|
||||||
caption="Recent templates – last 7 days",
|
caption="In the last 7 days",
|
||||||
empty_message='You haven’t sent any batch messages yet',
|
empty_message='You haven’t set up any templates yet',
|
||||||
field_headings=['Template', 'Type', right_aligned_field_heading('Usage')]
|
field_headings=['Template', hidden_field_heading('Type'), right_aligned_field_heading('Messages sent')]
|
||||||
) %}
|
) %}
|
||||||
{% call field() %}
|
{% call field() %}
|
||||||
<a href="{{ url_for('.edit_service_template', service_id=current_service.id, template_id=item.template.id) }}">
|
<a href="{{ url_for('.edit_service_template', service_id=current_service.id, template_id=item.template.id) }}">
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
</a>
|
</a>
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% call field() %}
|
{% call field() %}
|
||||||
{{item.template.template_type}}
|
{{'Text message' if 'sms' == item.template.template_type else 'Email'}}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% call field(align='right') %}
|
{% call field(align='right') %}
|
||||||
{{ item.usage_count }}
|
{{ item.usage_count }}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ def test_should_show_recent_templates_on_dashboard(app_,
|
|||||||
assert 'Test Service' in headers
|
assert 'Test Service' in headers
|
||||||
assert 'Sent today' in headers
|
assert 'Sent today' in headers
|
||||||
template_usage_headers = [th.text.strip() for th in page.thead.find_all('th')]
|
template_usage_headers = [th.text.strip() for th in page.thead.find_all('th')]
|
||||||
for th in ['Template', 'Type', 'Usage']:
|
for th in ['Template', 'Type', 'Messages sent']:
|
||||||
assert th in template_usage_headers
|
assert th in template_usage_headers
|
||||||
table_rows = page.tbody.find_all('tr')
|
table_rows = page.tbody.find_all('tr')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user