Merge pull request #426 from alphagov/reword-recent-templates

Reword ‘recent templates’ section of dashboard
This commit is contained in:
Chris Hill-Scott
2016-04-12 10:06:27 +01:00
2 changed files with 6 additions and 6 deletions

View File

@@ -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(
template_statistics,
caption="Recent templates last 7 days",
empty_message='You havent sent any batch messages yet',
field_headings=['Template', 'Type', right_aligned_field_heading('Usage')]
caption="In the last 7 days",
empty_message='You havent set up any templates yet',
field_headings=['Template', hidden_field_heading('Type'), right_aligned_field_heading('Messages sent')]
) %}
{% call field() %}
<a href="{{ url_for('.edit_service_template', service_id=current_service.id, template_id=item.template.id) }}">
@@ -11,7 +11,7 @@
</a>
{% endcall %}
{% call field() %}
{{item.template.template_type}}
{{'Text message' if 'sms' == item.template.template_type else 'Email'}}
{% endcall %}
{% call field(align='right') %}
{{ item.usage_count }}

View File

@@ -85,7 +85,7 @@ def test_should_show_recent_templates_on_dashboard(app_,
assert 'Test Service' in headers
assert 'Sent today' in headers
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
table_rows = page.tbody.find_all('tr')