mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Restyle template statistics
This makes the template statistics section of the dashboard look less like its own weird thing and more like: - the templates page - the upcoming changes to the styling of the received text messages banner on the dashboard
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
{% macro show_more(url=None, label=None) %}
|
||||
{% macro show_more(url=None, label=None, with_border=True) %}
|
||||
{% if url and label %}
|
||||
<a href="{{ url }}" class="show-more"><span>{{ label }}</span></a>
|
||||
<a
|
||||
href="{{ url }}"
|
||||
class="show-more{% if not with_border %}-no-border{% endif %}"
|
||||
><span>{{ label }}</span></a>
|
||||
{% else %}
|
||||
<span class="show-more-empty"></span>
|
||||
{% endif %}
|
||||
|
||||
@@ -188,11 +188,8 @@
|
||||
) %}
|
||||
{% call field(align='right') %}
|
||||
<span {% if id %}id="{{ id }}"{% endif %} class="spark-bar">
|
||||
<span style="width: {{ count / max_count * 100 }}%">
|
||||
{{ big_number(
|
||||
count,
|
||||
smallest=True
|
||||
) }}
|
||||
<span class="spark-bar-bar" style="width: {{ count / max_count * 100 }}%">
|
||||
{{ '{:,.0f}'.format(count) }}
|
||||
</span>
|
||||
</span>
|
||||
{% endcall %}
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
) }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
{{ show_more() }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
No messages sent
|
||||
</p>
|
||||
{% else %}
|
||||
<div class='dashboard-table template-usage-table'>
|
||||
<div class='template-statistics-table'>
|
||||
{% call(item, row_number) list_table(
|
||||
month.templates_used,
|
||||
caption=month.name,
|
||||
@@ -41,8 +41,8 @@
|
||||
field_headings_visible=False
|
||||
) %}
|
||||
{% call row_heading() %}
|
||||
<a class="file-list-filename" href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.id) }}">{{ item.name }}</a>
|
||||
<span class="file-list-hint">
|
||||
<a class="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 %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<div class="ajax-block-container">
|
||||
{% if template_statistics|length > 1 %}
|
||||
<div class='dashboard-table'>
|
||||
<div class='template-statistics-table'>
|
||||
{% call(item, row_number) list_table(
|
||||
template_statistics,
|
||||
caption="Templates used",
|
||||
@@ -21,24 +21,26 @@
|
||||
|
||||
{% call row_heading() %}
|
||||
{% if item.is_precompiled_letter %}
|
||||
<span class="file-list-filename">
|
||||
<span class="template-statistics-table-template-name">
|
||||
Provided as PDF
|
||||
</span>
|
||||
<span class="file-list-hint">
|
||||
<span class="template-statistics-table-hint">
|
||||
Letter
|
||||
</span>
|
||||
{% else %}
|
||||
<a class="file-list-filename" href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template_id) }}">{{ item.template_name }}</a>
|
||||
<span class="file-list-hint">
|
||||
<a class="template-statistics-table-template-name" href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template_id) }}">{{ item.template_name }}</a>
|
||||
<span class="template-statistics-table-hint">
|
||||
{{ message_count_label(1, item.template_type, suffix='template')|capitalize }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
|
||||
{{ spark_bar_field(item.count, most_used_template_count, id=item.template_id) }}
|
||||
{% endcall %}
|
||||
{{ show_more(
|
||||
url_for('.template_usage', service_id=current_service.id),
|
||||
'See templates used by month'
|
||||
'See templates used by month',
|
||||
with_border=False
|
||||
) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user