mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Merge with master.
This commit is contained in:
@@ -1,13 +1,22 @@
|
||||
{% extends "govuk_template.html" %}
|
||||
|
||||
{% block head %}
|
||||
{% assets "css_all" %}
|
||||
<link rel="stylesheet" href="{{ ASSET_URL }}" />
|
||||
{% endassets %}
|
||||
<!--[if gt IE 8]><!-->
|
||||
<link rel="stylesheet" media="screen" href="{{ asset_path }}stylesheets/main.css" />
|
||||
<!--<![endif]-->
|
||||
<!--[if IE 6]>
|
||||
<link rel="stylesheet" media="screen" href="{{ asset_path }}/stylesheets/main-ie6.css" />
|
||||
<![endif]-->
|
||||
<!--[if IE 7]>
|
||||
<link rel="stylesheet" media="screen" href="{{ asset_path }}/stylesheets/main-ie7.css" />
|
||||
<![endif]-->
|
||||
<!--[if IE 8]>
|
||||
<link rel="stylesheet" media="screen" href="{{ asset_path }}/stylesheets/main-ie8.css" />
|
||||
<![endif]-->
|
||||
{% endblock %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK notifications admin
|
||||
GOV.UK Notify admin
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -15,13 +24,11 @@ GOV.UK notifications admin
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block inside_header %}
|
||||
<div class="phase-banner-beta">
|
||||
|
||||
<strong class="phase-tag">BETA</strong>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block inside_header %}
|
||||
<div class="phase-banner-beta">
|
||||
<strong class="phase-tag">BETA</strong>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% set global_header_text = "GOV.UK Notify" %}
|
||||
@@ -32,3 +39,13 @@ GOV.UK notifications admin
|
||||
{% else %}
|
||||
{% set homepage_url = url_for('main.dashboard') %}
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
<main id="content" role="main" class="page-container">
|
||||
{% block fullwidth_content %}{% endblock %}
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
{% block body_end %}
|
||||
<script type="text/javascript" src="{{ asset_path }}javascripts/all.js" /></script>
|
||||
{% endblock %}
|
||||
|
||||
3
app/templates/components/banner.html
Normal file
3
app/templates/components/banner.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% macro banner(body) %}
|
||||
<div class='banner'>{{ body }}</div>
|
||||
{% endmacro %}
|
||||
6
app/templates/components/big-number.html
Normal file
6
app/templates/components/big-number.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{% macro big_number(number, label) %}
|
||||
<div class="big-number">
|
||||
{{ number }}
|
||||
<span class="big-number-label">{{ label }}</span>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -1,12 +1,20 @@
|
||||
{% macro sms_message(body, recipient) %}
|
||||
{% if recipient %}
|
||||
<p class="sms-message-recipient">
|
||||
{{ recipient }}
|
||||
</p>
|
||||
{% endif %}
|
||||
<div class="sms-message">
|
||||
<div class="sms-message-wrapper">
|
||||
{{ body|placeholders }}
|
||||
</div>
|
||||
</div>
|
||||
{% if recipient %}
|
||||
<p class="sms-message-recipient">
|
||||
{{ recipient }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro message_status(status, time) %}
|
||||
<div class="sms-message-history">
|
||||
<p class="sms-message-history-heading">
|
||||
{{ status }} <span class="sms-message-history-heading-time">{{ time }}</span>
|
||||
</p>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
{% macro submit_form(button_text, back_link) %}
|
||||
{% macro submit_form(button_text, back_link=False) %}
|
||||
<div class="submit-form">
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="submit" class="button" value="{{ button_text }}" />
|
||||
{% if back_link %}
|
||||
<a class="submit-form-back-link" role="button" href="{{ back_link }}">Back</a>
|
||||
{% endif %}
|
||||
</form>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="submit" class="button" value="{{ button_text }}" />
|
||||
{% if back_link %}
|
||||
<a class="submit-form-back-link" role="button" href="{{ back_link }}">Back</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% macro table(items, caption='', field_headings='', field_headings_visible=True) -%}
|
||||
{% macro table(items, caption='', field_headings='', field_headings_visible=True, caption_visible=True) -%}
|
||||
<table class="table">
|
||||
<caption class="heading-medium table-heading">
|
||||
<caption class="heading-medium table-heading{{ ' visuallyhidden' if not caption_visible}}">
|
||||
{{ caption }}
|
||||
</caption>
|
||||
<thead class="table-field-headings{% if field_headings_visible %}-visible{% endif %}">
|
||||
@@ -32,8 +32,12 @@
|
||||
</table>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro field(first=False, wide=False, action=False) -%}
|
||||
<td class="table-field{% if first %}-first{% endif %}{% if first and wide %}-wider{% endif %}{% if action %}-with-action{% endif %}">
|
||||
<span>{{ caller() }}</span>
|
||||
{% macro field(align='left', status='') -%}
|
||||
<td class="table-field{% if align == 'right' %}-right-aligned{% endif %}">
|
||||
<span class="{{ 'table-field-status-' + status if status }}">{{ caller() }}</span>
|
||||
</td>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro right_aligned_field_heading(text) %}
|
||||
<span class="table-field-heading-right-aligned">{{ text }}</span>
|
||||
{%- endmacro %}
|
||||
|
||||
15
app/templates/components/textbox.html
Normal file
15
app/templates/components/textbox.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% macro textbox(name, label, value='', small=True, highlight_tags=False) %}
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="{{ name }}">{{ label }}</label>
|
||||
{% if small %}
|
||||
<input class="form-control" id="{{ name }}" name="{{ name }}" type="text" value="{{ value }}">
|
||||
{% else %}
|
||||
<textarea
|
||||
class="form-control {% if highlight_tags %}textbox-highlight-textbox{% endif %}"
|
||||
id="{{ name }}" name="{{ name }}"
|
||||
cols="30" rows="10"
|
||||
{% if highlight_tags %}data-module='highlight-tags'{% endif %}
|
||||
>{{ value }}</textarea>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -1,142 +0,0 @@
|
||||
{%- from "components/form-field.html" import render_field %}
|
||||
{% block top_of_page %}{% endblock %}
|
||||
<!DOCTYPE html>
|
||||
<!--[if lt IE 9]><html class="lte-ie8" lang="{{ html_lang|default('en') }}"><![endif]-->
|
||||
<!--[if gt IE 8]><!--><html lang="{{ html_lang|default('en') }}"><!--<![endif]-->
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<title>{% block page_title %}GOV.UK - The best place to find government services and information{% endblock %}</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){if(navigator.userAgent.match(/IEMobile\/10\.0/)){var d=document,c="appendChild",a=d.createElement("style");a[c](d.createTextNode("@-ms-viewport{width:auto!important}"));d.getElementsByTagName("head")[0][c](a);}})();
|
||||
</script>
|
||||
{% assets "css_govuk-template" %}
|
||||
<!--[if gt IE 8]><!--><link href="{{ ASSET_URL }}" media="screen" rel="stylesheet" type="text/css" /><!--<![endif]-->
|
||||
{% endassets %}
|
||||
{% assets "css_govuk-template-ie6" %}
|
||||
<!--[if IE 6]><link href="{{ ASSET_URL }}" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
|
||||
{% endassets %}
|
||||
{% assets "css_govuk-template-ie7" %}
|
||||
<!--[if IE 7]><link href="{{ ASSET_URL }}" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
|
||||
{% endassets %}
|
||||
{% assets "css_govuk-template-ie8" %}
|
||||
<!--[if IE 8]><link href="{{ ASSET_URL }}" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
|
||||
{% endassets %}
|
||||
{% assets "css_govuk-template" %}
|
||||
<link href="{{ ASSET_URL }}" media="print" rel="stylesheet" type="text/css" />
|
||||
{% endassets %}
|
||||
|
||||
<!--[if IE 8]>
|
||||
<script type="text/javascript">
|
||||
(function(){if(window.opera){return;}
|
||||
setTimeout(function(){var a=document,g,b={families:(g=
|
||||
["nta"]),urls:["/static/stylesheets/fonts-ie8.css?0.16.0"]},
|
||||
c="/static/javascripts/vendor/goog/webfont-debug.js?0.16.0",d="script",
|
||||
e=a.createElement(d),f=a.getElementsByTagName(d)[0],h=g.length;WebFontConfig
|
||||
={custom:b},e.src=c,f.parentNode.insertBefore(e,f);for(;h=h-1;a.documentElement
|
||||
.className+=' wf-'+g[h].replace(/\s/g,'').toLowerCase()+'-n4-loading');},0)
|
||||
})()
|
||||
</script>
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]><!-->
|
||||
<link href="/static/stylesheets/fonts.css?0.16.0" media="all" rel="stylesheet" type="text/css" />
|
||||
<!--<![endif]-->
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="/static/javascripts/ie.js?0.16.0" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
|
||||
<link rel="shortcut icon" href="/static/images/favicon.ico?0.16.0" type="image/x-icon" />
|
||||
|
||||
<!-- Size for iPad and iPad mini (high resolution) -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="/static/images/apple-touch-icon-152x152.png?0.16.0">
|
||||
<!-- Size for iPhone and iPod touch (high resolution) -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/static/images/apple-touch-icon-120x120.png?0.16.0">
|
||||
<!-- Size for iPad 2 and iPad mini (standard resolution) -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="/static/images/apple-touch-icon-76x76.png?0.16.0">
|
||||
<!-- Default non-defined size, also used for Android 2.1+ devices -->
|
||||
<link rel="apple-touch-icon-precomposed" href="/static/images/apple-touch-icon-60x60.png?0.16.0">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta property="og:image" content="/static/images/opengraph-image.png?0.16.0">
|
||||
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
|
||||
<body class="{% block body_classes %}{% endblock %}">
|
||||
<script type="text/javascript">document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
|
||||
|
||||
{% block body_start %}{% endblock %}
|
||||
|
||||
<div id="skiplink-container">
|
||||
<div>
|
||||
<a href="#content" class="skiplink">{{ skip_link_message|default('Skip to main content') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="global-cookie-message">
|
||||
|
||||
{% block cookie_message %}{% endblock %}
|
||||
|
||||
</div>
|
||||
<!--end global-cookie-message-->
|
||||
|
||||
|
||||
<header role="banner" id="global-header" class="{% block header_class %}{% endblock %}">
|
||||
<div class="header-wrapper">
|
||||
<div class="header-global">
|
||||
<div class="header-logo">
|
||||
<a href="{{ homepage_url|default('https://www.gov.uk') }}" title="{{ logo_link_title|default('Go to the GOV.UK homepage') }}" id="logo" class="content">
|
||||
<img src="/static/images/gov.uk_logotype_crown.png?0.16.1" width="35" height="31" alt=""> {{ global_header_text|default('GOV.UK') }}
|
||||
</a>
|
||||
</div>
|
||||
{% block inside_header %}{% endblock %}
|
||||
</div>
|
||||
{% block proposition_header %}{% endblock %}
|
||||
</div>
|
||||
</header>
|
||||
<!--end header-->
|
||||
|
||||
|
||||
{% block after_header %}{% endblock %}
|
||||
|
||||
<div id="global-header-bar"></div>
|
||||
<!--end global-header-bar-->
|
||||
<main id="content" role="main" class="page-container">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
<footer class="group js-footer" id="footer" role="contentinfo">
|
||||
|
||||
<div class="footer-wrapper">
|
||||
{% block footer_top %}{% endblock %}
|
||||
|
||||
<div class="footer-meta">
|
||||
<div class="footer-meta-inner">
|
||||
{% block footer_support_links %}{% endblock %}
|
||||
|
||||
<div class="open-government-licence">
|
||||
<p class="logo"><a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence</a></p>
|
||||
|
||||
{% block licence_message %}<p>All content is available under the <a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, except where otherwise stated</p>{% endblock %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<a href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">{{ crown_copyright_message|default('© Crown copyright')|safe }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!--end footer-->
|
||||
|
||||
<div id="global-app-error" class="app-error hidden"></div>
|
||||
|
||||
<script src="/static/javascripts/govuk-template.js?0.16.0" type="text/javascript"></script>
|
||||
|
||||
{% block body_end %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +1,18 @@
|
||||
{% macro main_nav() %}
|
||||
|
||||
<div id="navigation">
|
||||
<h3><a href="{{ url_for('.dashboard') }}">Service name</a></h3>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.sendsms') }}">Send text messages</a></li>
|
||||
<li><a href="{{ url_for('.sendemail') }}">Send emails</a></li>
|
||||
<li><a href="{{ url_for('.showjobs') }}">Activity</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.apikeys') }}">API keys and documentation</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.manageusers') }}">Manage users</a></li>
|
||||
<li><a href="{{ url_for('.servicesettings') }}">Service settings</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="/user-profile">Your details</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
<nav class="navigation">
|
||||
<h3><a href="{{ url_for('.dashboard') }}">Service name</a></h3>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.sendsms') }}">Send text messages</a></li>
|
||||
<li><a href="{{ url_for('.sendemail') }}">Send emails</a></li>
|
||||
<li><a href="{{ url_for('.showjobs') }}">Activity</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.apikeys') }}">API keys and documentation</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.manageusers') }}">Manage users</a></li>
|
||||
<li><a href="{{ url_for('.servicesettings') }}">Service settings</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="/user-profile">Your details</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% from "components/form-field.html" import render_field %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Set up service
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Set up notifications for your service</h1>
|
||||
|
||||
|
||||
<p>Users will see your service name:</p>
|
||||
<ul class="list-bullet">
|
||||
<li>at the start of every text message, eg 'Vehicle tax: we received your payment, thank you'</li>
|
||||
|
||||
@@ -15,50 +15,54 @@
|
||||
|
||||
<h2 class="heading-medium">Check and confirm</h2>
|
||||
|
||||
{{ submit_form(
|
||||
"Send {} text messages".format(number_of_recipients),
|
||||
url_for(".sendsms")
|
||||
) }}
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
|
||||
<h3 class="heading-small">First 3 messages</h2>
|
||||
{{ submit_form(
|
||||
"Send {} text messages".format(number_of_recipients),
|
||||
url_for(".sendsms")
|
||||
) }}
|
||||
|
||||
{% if recipients.first_three and recipients.last_three %}
|
||||
<h3 class="heading-small">First 3 messages</h2>
|
||||
|
||||
{% for recipient in recipients.first_three %}
|
||||
{{ sms_message(
|
||||
message_template|replace_placeholders(recipient),
|
||||
"{}".format(recipient['phone'])
|
||||
) }}
|
||||
{% endfor %}
|
||||
{% if recipients.first_three and recipients.last_three %}
|
||||
|
||||
<h3 class="heading-small">Last 3 messages</h2>
|
||||
{% for recipient in recipients.first_three %}
|
||||
{{ sms_message(
|
||||
message_template|replace_placeholders(recipient),
|
||||
"{}".format(recipient['phone'])
|
||||
) }}
|
||||
{% endfor %}
|
||||
|
||||
{% for recipient in recipients.last_three %}
|
||||
{{ sms_message(
|
||||
message_template|replace_placeholders(recipient),
|
||||
"{}".format(recipient['phone'])
|
||||
) }}
|
||||
{% endfor %}
|
||||
<h3 class="heading-small">Last 3 messages</h2>
|
||||
|
||||
{% else %}
|
||||
{% for recipient in recipients.last_three %}
|
||||
{{ sms_message(
|
||||
message_template|replace_placeholders(recipient),
|
||||
"{}".format(recipient['phone'])
|
||||
) }}
|
||||
{% endfor %}
|
||||
|
||||
{% for recipient in recipients.all %}
|
||||
{{ sms_message(
|
||||
message_template|replace_placeholders(recipient),
|
||||
"{}".format(recipient['phone'])
|
||||
) }}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
{% for recipient in recipients.all %}
|
||||
{{ sms_message(
|
||||
message_template|replace_placeholders(recipient),
|
||||
"{}".format(recipient['phone'])
|
||||
) }}
|
||||
{% endfor %}
|
||||
|
||||
<p>
|
||||
<a href="#">See all</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{{ submit_form(
|
||||
"Send {} text messages".format(number_of_recipients),
|
||||
url_for(".sendsms")
|
||||
) }}
|
||||
<p>
|
||||
<a href="#">See all</a>
|
||||
</p>
|
||||
|
||||
{{ submit_form(
|
||||
"Send {} text messages".format(number_of_recipients),
|
||||
url_for(".sendsms")
|
||||
) }}
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,55 +1,51 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% from "components/table.html" import table, field %}
|
||||
{% from "components/big-number.html" import big_number %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Dashboard
|
||||
GOV.UK Notify | Dashboard
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-xlarge">Dashboard</h1>
|
||||
<h1 class="heading-xlarge">Service name</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4">Recent activity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href={{ url_for('.showjob') }}>Test message 1</a></td>
|
||||
<td>dispatch_20151114.csv</td>
|
||||
<td>Just now</td>
|
||||
<td>Queued</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href={{ url_for('.showjob') }}>Mickey Mouse</a></td>
|
||||
<td>dispatch_20151117.csv</td>
|
||||
<td>5 minutes ago</td>
|
||||
<td>Delivered</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href={{ url_for('.showjob') }}>Asdfgg</a></td>
|
||||
<td>remdinder_monday.csv</td>
|
||||
<td>30 minutes ago</td>
|
||||
<td>Failed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href={{ url_for('.showjob') }}>Test message 2</a></td>
|
||||
<td>appointments_wed.csv</td>
|
||||
<td>2 hours ago</td>
|
||||
<td>Delivered</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href={{ url_for('.showjob') }}>Reminder file</a></td>
|
||||
<td>+447889887634</td>
|
||||
<td>11:44 - 21 Nov 2015</td>
|
||||
<td>Delivered</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<p><a href={{ url_for('.showjobs') }}>See all notifications activity</a></p>
|
||||
<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>
|
||||
|
||||
{% call(item) table(
|
||||
jobs[:3],
|
||||
caption="Recent text messages",
|
||||
field_headings=['Job', 'File', 'Time', 'Status']
|
||||
) %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.showjob') }}">{{ item.file }}</a>
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.showjob') }}">{{ item.job }}</a>
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
{{ item.time }}
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
{{ item.status }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
<p>
|
||||
<a href={{ url_for('.showjobs') }}>See all notifications activity</a>
|
||||
</p>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/submit-form.html" import submit_form %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Edit template
|
||||
@@ -6,13 +8,14 @@ GOV.UK Notify | Edit template
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-xlarge">{{ h1 }}</h1>
|
||||
|
||||
<h1 class="heading-xlarge">Edit template</h1>
|
||||
|
||||
<p>Here's where you can edit an exiting template (including delete) or add a new one</p>
|
||||
<form method="post">
|
||||
{{ textbox(name='template_name', label='Template name', value=template_name) }}
|
||||
{{ textbox(name='template_body', label='Message', small=False, value=template_body, highlight_tags=True) }}
|
||||
{{ submit_form('Save and continue') }}
|
||||
</form>
|
||||
|
||||
<p><a href="manage-templates">Back to manage templates</a></p>
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
GOV.UK Notify
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
GOV.UK Notify
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
@@ -24,4 +24,4 @@ GOV.UK Notify
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/table.html" import table, field, right_aligned_field_heading %}
|
||||
{% from "components/big-number.html" import big_number %}
|
||||
{% from "components/banner.html" import banner %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Notifications activity
|
||||
@@ -6,14 +9,60 @@ GOV.UK Notify | Notifications activity
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-xlarge">Notifications for a specific job</h1>
|
||||
<h1 class="heading-large">
|
||||
{{ uploaded_file_name }}
|
||||
</h1>
|
||||
|
||||
<p>This page will be where we list the notifications for a specific job.</p>
|
||||
<p>
|
||||
{{ banner(flash_message) }}
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="/jobs/job/notification">view a specific notification</a></li>
|
||||
<li><a href="/jobs">view all the activity for this service</a></li>
|
||||
</ul>
|
||||
|
||||
<ul class="grid-row job-totals">
|
||||
<li class="column-one-third">
|
||||
{{ big_number(
|
||||
counts.total,
|
||||
'text message' if 1 == counts.total else 'text messages'
|
||||
)}}
|
||||
</li>
|
||||
<li class="column-one-third">
|
||||
{{ big_number(
|
||||
counts.failed,
|
||||
'failed delivery' if 1 == counts.failed else 'failed deliveries'
|
||||
)}}
|
||||
</li>
|
||||
<li class="column-one-third">
|
||||
{{ big_number(
|
||||
cost, 'total cost'
|
||||
)}}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Sent with template <a href="{{ url_for('.edit_template') }}">{{ template_used }}</a> at {{ uploaded_file_time }}
|
||||
</p>
|
||||
|
||||
{% call(item) table(
|
||||
messages,
|
||||
caption='Messages',
|
||||
caption_visible=False,
|
||||
field_headings=[
|
||||
'To',
|
||||
'Message',
|
||||
right_aligned_field_heading('Delivery status')
|
||||
]
|
||||
) %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.shownotification', notification_id=item.id) }}">{{item.phone}}</a>
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.shownotification', notification_id=item.id) }}">{{item.message[:50]}}…</a>
|
||||
{% endcall %}
|
||||
{% call field(
|
||||
align='right',
|
||||
status='error' if item.status == 'Failed' else 'default'
|
||||
) %}
|
||||
{{ item.status }} {{ item.time }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/table.html" import table, field %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Notifications activity
|
||||
@@ -8,11 +9,25 @@ GOV.UK Notify | Notifications activity
|
||||
|
||||
<h1 class="heading-xlarge">Notifications activity</h1>
|
||||
|
||||
<p>This page will be where we show the list of jobs that this service has processed</p>
|
||||
|
||||
<p>
|
||||
<a href="jobs/job">view a particular notification job</a>
|
||||
</p>
|
||||
{% call(item) table(
|
||||
jobs,
|
||||
caption="Recent activity",
|
||||
caption_visible=False,
|
||||
field_headings=['Job', 'File', 'Time', 'Status']
|
||||
) %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.showjob') }}">{{ item.file }}</a>
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.showjob') }}">{{ item.job }}</a>
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
{{ item.time }}
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
{{ item.status }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -7,15 +7,17 @@ GOV.UK Notify | Manage templates
|
||||
{% block maincolumn_content %}
|
||||
|
||||
|
||||
<h1 class="heading-xlarge">Manage templates</h1>
|
||||
<h1 class="heading-xlarge">Manage templates</h1>
|
||||
|
||||
<p>Here's where you can view templates, choose to add one, or edit/delete one.</p>
|
||||
<p>Here's where you can view templates, choose to add one, or edit/delete one.</p>
|
||||
|
||||
<p><a href="edit-template">Here is my first template</a></p>
|
||||
<p>
|
||||
<a href="{{ url_for('.edit_template') }}">Here is my first template</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a class="button" href="edit-template" role="button">Add a new message template</a>
|
||||
</p>
|
||||
<p>
|
||||
<a class="button" href="{{ url_for('.edit_template') }}" role="button">Add a new message template</a>
|
||||
</p>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
GOV.UK Notify
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Create a new password</h1>
|
||||
|
||||
|
||||
<p> You can now create a new password for your account.</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/sms-message.html" import sms_message, message_status %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Notifications activity
|
||||
@@ -7,12 +8,21 @@ GOV.UK Notify | Notifications activity
|
||||
{% block maincolumn_content %}
|
||||
|
||||
|
||||
<h1 class="heading-xlarge">A specific notification</h1>
|
||||
<h1 class="heading-large">
|
||||
Text message
|
||||
</h1>
|
||||
|
||||
<p>This page will be where we show what happened for a specific notification.</p>
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
{{ sms_message(message.message, message.phone) }}
|
||||
</div>
|
||||
<div class="column-one-third">
|
||||
{{ message_status(message.status, delivered_at) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a href="/jobs/job">View other notifications in this job</a>
|
||||
<a href="{{ url_for('.showjob') }}">View other notifications in this job</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
GOV.UK Notify | Create a user account
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
GOV.UK Notify | Create an account
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
{% endfor %}
|
||||
|
||||
<p>
|
||||
or <a href="{{ url_for(".managetemplates") }}">create a new template</a>
|
||||
or <a href="{{ url_for(".add_template") }}">create a new template</a>
|
||||
</p>
|
||||
|
||||
<h2 class="heading-medium">2. Add recipients</h2>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
GOV.UK Notify | Get started
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Sign in
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
GOV.UK Notify
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<!-- this page is just a hack for building out pages - same functionality as text-not-received, but for the register from an invite flow -->
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
GOV.UK Notify
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
GOV.UK Notify | Text verification
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
GOV.UK Notify
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
GOV.UK Notify | Confirm mobile number
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
GOV.UK Notify | Confirm email address and mobile number
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% from "main_nav.html" import main_nav with context %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-third">
|
||||
{{ main_nav() }}
|
||||
{% block fullwidth_content %}
|
||||
<div class="grid-row">
|
||||
<div class="column-one-quarter">
|
||||
{% include "main_nav.html" %}
|
||||
</div>
|
||||
<div class="column-three-quarters">
|
||||
{% block maincolumn_content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="column-two-thirds">
|
||||
{% block maincolumn_content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user