Files
notifications-admin/app/templates/views/service_dashboard.html
T

79 lines
2.3 KiB
HTML
Raw Normal View History

2015-12-14 16:37:15 +00:00
{% extends "withnav_template.html" %}
2016-02-03 14:43:16 +00:00
{% from "components/table.html" import list_table, field, right_aligned_field_heading %}
2015-12-18 16:36:24 +00:00
{% from "components/big-number.html" import big_number %}
{% block page_title %}
2016-02-08 09:23:51 +00:00
{{ session.get('service_name', 'Dashboard') }} GOV.UK Notify
{% endblock %}
2015-12-14 16:37:15 +00:00
{% block maincolumn_content %}
<ul class="grid-row job-totals">
<li class="column-half">
{{ big_number(
free_text_messages_remaining,
'free text messages remaining'
)}}
</li>
<li class="column-half">
{{ big_number(
'£' + spent_this_month,
'spent this month'
)}}
</li>
</ul>
2016-02-23 11:32:33 +00:00
{% if not template_count and not jobs %}
2016-02-02 13:38:39 +00:00
{{ banner(
2016-02-23 11:32:33 +00:00
"""
<ol>
<li>
<a href='{}'>Add a template</a>
</li>
<li>
<a href='{}'>Send yourself a text message</a>
</li>
</ol>
""".format(
2016-02-25 10:21:23 +00:00
url_for(".add_service_template", service_id=service_id, template_type="sms"),
2016-02-22 17:17:18 +00:00
url_for(".choose_template", service_id=service_id, template_type="sms")
2016-02-23 11:32:33 +00:00
)|safe,
2016-02-02 13:38:39 +00:00
subhead='Get started',
2016-02-23 11:32:33 +00:00
type="tip"
)}}
{% elif not jobs %}
{{ banner(
"""
<a href='{}'>Send yourself a text message</a>
""".format(
2016-02-22 17:17:18 +00:00
url_for(".choose_template", service_id=service_id, template_type="sms")
2016-02-23 11:32:33 +00:00
)|safe,
subhead='Next step',
type="tip"
2016-02-02 13:38:39 +00:00
)}}
2016-02-04 09:58:56 +00:00
{% else %}
2016-02-02 13:38:39 +00:00
{% call(item) list_table(
2016-02-03 14:43:16 +00:00
jobs,
2016-02-02 13:38:39 +00:00
caption="Recent text messages",
empty_message='You havent sent any text messages yet',
2016-02-03 14:43:16 +00:00
field_headings=['Job', 'Created', right_aligned_field_heading('Status')]
2016-02-02 13:38:39 +00:00
) %}
{% call field() %}
2016-02-03 14:43:16 +00:00
<a href="{{ url_for('.view_job', service_id=service_id, job_id=item.id) }}">{{ item.original_file_name }}</a>
2016-02-02 13:38:39 +00:00
{% endcall %}
{% call field() %}
2016-02-03 14:43:16 +00:00
{{ item.created_at|format_datetime }}
2016-02-02 13:38:39 +00:00
{% endcall %}
2016-02-03 14:43:16 +00:00
{% call field(align='right') %}
2016-02-02 13:38:39 +00:00
{{ item.status }}
{% endcall %}
{% endcall %}
2016-02-04 17:13:57 +00:00
{% if more_jobs_to_show %}
<p class="table-show-more-link">
<a href="{{ url_for('.view_jobs', service_id=service_id) }}">See all sent text messages</a>
</p>
{% endif %}
2016-02-02 13:38:39 +00:00
{% endif %}
{% endblock %}