Files
notifications-admin/app/templates/views/dashboard/template-statistics.html
Chris Hill-Scott e5d2514846 Make template graphs look consistent with page
The graphs of template usage feel a bit weird to me now.

1. They are counts of messages, but the numbers are very small
   not big like we do everywhere else (eg the counts on a job)

2. There’s a lot of blue, especially for something that you can’t
   click

This commit makes the numbers bigger and the bar chart grey.
2016-06-14 11:00:56 +01:00

41 lines
1.3 KiB
HTML

{% from "components/message-count-label.html" import message_count_label %}
{% from "components/big-number.html" import big_number %}
<dl>
{% for item in template_statistics %}
<div class="grid-row">
<dt class="column-half">
<span class="spark-bar-label">
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template.id) }}">{{ item.template.name }}</a>
<span class="file-list-hint">
{{ message_count_label(1, item.template.template_type, suffix='template')|capitalize }}
</span>
</span>
</dt>
<dd class="column-half">
{% if template_statistics|length > 1 %}
<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>
{% else %}
<span class="heading-small">
{{ item.usage_count }}
{{ message_count_label(item.usage_count, item.template.template_type) }}
</span>
{% endif %}
</dd>
</div>
{% endfor %}
</dl>