2016-06-08 15:41:02 +01:00
|
|
|
{% from "components/big-number.html" import big_number %}
|
2016-05-13 09:58:07 +01:00
|
|
|
{% from "components/message-count-label.html" import message_count_label %}
|
2016-06-07 16:35:03 +01:00
|
|
|
{% from "components/big-number.html" import big_number %}
|
2016-05-03 13:25:22 +01:00
|
|
|
|
2016-05-11 15:05:40 +01:00
|
|
|
<dl>
|
|
|
|
|
{% for item in template_statistics %}
|
|
|
|
|
<div class="grid-row">
|
2016-06-07 16:35:03 +01:00
|
|
|
|
2016-05-11 15:05:40 +01:00
|
|
|
<dt class="column-half">
|
|
|
|
|
<span class="spark-bar-label">
|
2016-05-12 21:31:47 +01:00
|
|
|
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template.id) }}">{{ item.template.name }}</a>
|
2016-06-07 16:35:03 +01:00
|
|
|
<span class="file-list-hint">
|
|
|
|
|
{{ message_count_label(1, item.template.template_type, suffix='template')|capitalize }}
|
|
|
|
|
</span>
|
2016-05-11 15:05:40 +01:00
|
|
|
</span>
|
|
|
|
|
</dt>
|
2016-04-05 11:40:13 +01:00
|
|
|
|
2016-05-11 15:05:40 +01:00
|
|
|
<dd class="column-half">
|
2016-05-13 10:11:56 +01:00
|
|
|
{% if template_statistics|length > 1 %}
|
2016-06-07 16:35:03 +01:00
|
|
|
<span class="spark-bar">
|
|
|
|
|
<span style="width: {{ item.usage_count / most_used_template_count * 100 }}%">
|
|
|
|
|
{{ big_number(
|
|
|
|
|
item.usage_count,
|
|
|
|
|
smallest=True
|
|
|
|
|
) }}
|
|
|
|
|
<span class="visually-hidden">
|
|
|
|
|
{{ message_count_label(item.usage_count, item.template.template_type) }}
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
2016-05-13 10:11:56 +01:00
|
|
|
{% else %}
|
2016-06-07 16:35:03 +01:00
|
|
|
<span class="heading-small">
|
|
|
|
|
{{ item.usage_count }}
|
|
|
|
|
{{ message_count_label(item.usage_count, item.template.template_type) }}
|
|
|
|
|
</span>
|
2016-05-13 10:11:56 +01:00
|
|
|
{% endif %}
|
2016-05-11 15:05:40 +01:00
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
2016-06-07 16:35:03 +01:00
|
|
|
</dl>
|