Files
notifications-admin/app/templates/views/dashboard/all-template-statistics.html
Tom Byers ee9f348ce4 Update all links to use GOVUK Frontend style
Includes:
- turning off :visited styles to match existing
  design
- swapping heading classes used to make links bold
  for the GOVUK Frontend bold override class
- adding visually hidden text to some links to
  make them work when isolated from their context

We may need to revisit whether some links, such as
those for documentation and features, may benefit
from having some indication that their target has
been visited.
2020-02-25 10:47:24 +00:00

57 lines
1.8 KiB
HTML

{% from "components/message-count-label.html" import message_count_label %}
{% from "components/pill.html" import pill %}
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading, spark_bar_field %}
{% extends "withnav_template.html" %}
{% block service_page_title %}
Templates used
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-large">Templates used</h1>
<div class="bottom-gutter-3-2">
{{ pill(
items=years,
current_value=selected_year,
big_number_args={'smallest': True},
) }}
</div>
<div class="dashboard">
{% for month in months %}
<h2>{{ month.name }}</h2>
{% if not month.templates_used %}
<p class="table-no-data">
No messages sent
</p>
{% else %}
<div class='template-statistics-table'>
{% call(item, row_number) list_table(
month.templates_used,
caption=month.name,
caption_visible=False,
empty_message='',
field_headings=[
'Template',
'Messages sent'
],
field_headings_visible=False
) %}
{% call row_heading() %}
<a class="govuk-link govuk-link--no-visited-state template-statistics-table-template-name" href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.id) }}">{{ item.name }}</a>
<span class="template-statistics-table-hint">
{{ message_count_label(1, item.type, suffix='template')|capitalize }}
</span>
{% endcall %}
{{ spark_bar_field(item.requested_count, most_used_template_count) }}
{% endcall %}
</div>
{% endif %}
{% endfor %}
</div>
{% endblock %}