2016-04-11 09:58:36 +01:00
|
|
|
|
{% from "components/table.html" import list_table, field, hidden_field_heading, right_aligned_field_heading %}
|
2016-04-05 11:16:29 +01:00
|
|
|
|
{% call(item, row_number) list_table(
|
2016-04-05 11:40:13 +01:00
|
|
|
|
template_statistics,
|
2016-04-19 12:57:55 +01:00
|
|
|
|
caption="By template",
|
|
|
|
|
|
caption_visible=False,
|
2016-04-20 14:09:38 +01:00
|
|
|
|
empty_message='You haven’t used any templates {}'.format(period),
|
2016-04-20 14:25:05 +01:00
|
|
|
|
field_headings=['Template', hidden_field_heading('Type'), right_aligned_field_heading('Messages sent')]
|
2016-04-05 11:40:13 +01:00
|
|
|
|
) %}
|
|
|
|
|
|
{% call field() %}
|
2016-04-12 09:55:51 +01:00
|
|
|
|
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template.id) }}">
|
2016-04-05 11:40:13 +01:00
|
|
|
|
{{ item.template.name }}
|
|
|
|
|
|
</a>
|
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
{% call field() %}
|
2016-04-11 09:58:36 +01:00
|
|
|
|
{{'Text message' if 'sms' == item.template.template_type else 'Email'}}
|
2016-04-05 11:40:13 +01:00
|
|
|
|
{% endcall %}
|
2016-04-06 15:06:02 +01:00
|
|
|
|
{% call field(align='right') %}
|
2016-04-05 11:40:13 +01:00
|
|
|
|
{{ item.usage_count }}
|
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
|