mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Add mocked service ID to all service-specific pages
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
{% if not current_user.is_authenticated() %}
|
||||
{% set homepage_url = url_for('main.index') %}
|
||||
{% else %}
|
||||
{% set homepage_url = url_for('main.dashboard') %}
|
||||
{% set homepage_url = url_for('main.dashboard', service_id=123) %}
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
@@ -60,7 +60,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="column-half management-navigation-account">
|
||||
<a href="{{ url_for('.userprofile') }}">{{ current_user.name }}</a>
|
||||
<a href="{{ url_for('main.userprofile') }}">{{ current_user.name }}</a>
|
||||
<a href="{{ url_for('main.sign_out')}}">Sign out</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<nav class="navigation">
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.dashboard') }}">Dashboard</a></li>
|
||||
<li><a href="{{ url_for('.dashboard', service_id=123) }}">Dashboard</a></li>
|
||||
</ul>
|
||||
<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>
|
||||
<li><a href="{{ url_for('.sendsms', service_id=123) }}">Send text messages</a></li>
|
||||
<li><a href="{{ url_for('.sendemail', service_id=123) }}">Send emails</a></li>
|
||||
<li><a href="{{ url_for('.showjobs', service_id=123) }}">Activity</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.apikeys') }}">API keys and documentation</a></li>
|
||||
<li><a href="{{ url_for('.apikeys', service_id=123) }}">API keys and documentation</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.manageusers') }}">Manage users</a></li>
|
||||
<li><a href="{{ url_for('.service_settings') }}">Service settings</a></li>
|
||||
<li><a href="{{ url_for('.manageusers', service_id=123) }}">Manage users</a></li>
|
||||
<li><a href="{{ url_for('.service_settings', service_id=123) }}">Service settings</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -7,13 +7,13 @@ GOV.UK Notify | API keys and documentation
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-xlarge">API keys and documentation</h1>
|
||||
<h1 class="heading-xlarge">API keys and documentation</h1>
|
||||
|
||||
<p>Here's where developers can access information about the API and access keys</p>
|
||||
<p>Here's where developers can access information about the API and access keys</p>
|
||||
|
||||
{{ page_footer(
|
||||
back_link=url_for('.dashboard'),
|
||||
back_link_text='Back to dashboard'
|
||||
) }}
|
||||
{{ page_footer(
|
||||
back_link=url_for('.dashboard', service_id=service_id),
|
||||
back_link_text='Back to dashboard'
|
||||
) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{% for rejected in upload_result.rejects %}
|
||||
<p>Line {{rejected.line_number}}: {{rejected.phone }}</a>
|
||||
{% endfor %}
|
||||
<p><a href="{{url_for('.sendsms')}}" class="button">Go back and resolve errors</a></p>
|
||||
<p><a href="{{url_for('.sendsms', service_id=service_id)}}" class="button">Go back and resolve errors</a></p>
|
||||
|
||||
{% else %}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
{{ page_footer(
|
||||
button_text = "Send {} text messages".format(upload_result.valid|count),
|
||||
back_link = url_for(".sendsms")
|
||||
back_link = url_for(".sendsms", service_id=service_id)
|
||||
)}}
|
||||
|
||||
{% if upload_result.valid | count > 6 %}
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
{{ page_footer(
|
||||
button_text = "Send {} text messages".format(upload_result.valid|count),
|
||||
back_link = url_for(".sendsms")
|
||||
back_link = url_for(".sendsms", service_id=service_id)
|
||||
)}}
|
||||
|
||||
</form>
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
field_headings=['Job', 'File', 'Time', 'Status']
|
||||
) %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.showjob') }}">{{ item.file }}</a>
|
||||
<a href="{{ url_for('.showjob', service_id=service_id) }}">{{ item.file }}</a>
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.showjob') }}">{{ item.job }}</a>
|
||||
<a href="{{ url_for('.showjob', service_id=service_id) }}">{{ item.job }}</a>
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
{{ item.time }}
|
||||
@@ -43,7 +43,7 @@
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
<p>
|
||||
<a href={{ url_for('.showjobs') }}>See all notifications activity</a>
|
||||
<a href={{ url_for('.showjobs', service_id=service_id) }}>See all notifications activity</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ GOV.UK Notify | Edit template
|
||||
{{ textbox(form.template_body, highlight_tags=True) }}
|
||||
{{ page_footer(
|
||||
'Save and continue',
|
||||
back_link=url_for('.dashboard'),
|
||||
back_link=url_for('.dashboard', service_id=service_id),
|
||||
back_link_text='Back to manage templates'
|
||||
) }}
|
||||
</form>
|
||||
|
||||
@@ -38,7 +38,7 @@ GOV.UK Notify | Notifications activity
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Sent with template <a href="{{ url_for('.edit_template') }}">{{ template_used }}</a> at {{ uploaded_file_time }}
|
||||
Sent with template <a href="{{ url_for('.edit_template', service_id=service_id) }}">{{ template_used }}</a> at {{ uploaded_file_time }}
|
||||
</p>
|
||||
|
||||
{% call(item) list_table(
|
||||
@@ -52,10 +52,10 @@ GOV.UK Notify | Notifications activity
|
||||
]
|
||||
) %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.shownotification', notification_id=item.id) }}">{{item.phone}}</a>
|
||||
<a href="{{ url_for('.shownotification', service_id=service_id, notification_id=item.id) }}">{{item.phone}}</a>
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.shownotification', notification_id=item.id) }}">{{item.message[:50]}}…</a>
|
||||
<a href="{{ url_for('.shownotification', service_id=service_id, notification_id=item.id) }}">{{item.message[:50]}}…</a>
|
||||
{% endcall %}
|
||||
{% call field(
|
||||
align='right',
|
||||
|
||||
@@ -16,10 +16,10 @@ GOV.UK Notify | Notifications activity
|
||||
field_headings=['Job', 'File', 'Time', 'Status']
|
||||
) %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.showjob') }}">{{ item.file }}</a>
|
||||
<a href="{{ url_for('.showjob', service_id=service_id) }}">{{ item.file }}</a>
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
<a href="{{ url_for('.showjob') }}">{{ item.job }}</a>
|
||||
<a href="{{ url_for('.showjob', service_id=service_id) }}">{{ item.job }}</a>
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
{{ item.time }}
|
||||
|
||||
@@ -12,11 +12,11 @@ GOV.UK Notify | Manage templates
|
||||
<p>Here's where you can view templates, choose to add one, or edit/delete one.</p>
|
||||
|
||||
<p>
|
||||
<a href="{{ url_for('.edit_template') }}">Here is my first template</a>
|
||||
<a href="{{ url_for('.edit_template', service_id=service_id) }}">Here is my first template</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a class="button" href="{{ url_for('.edit_template') }}" role="button">Add a new message template</a>
|
||||
<a class="button" href="{{ url_for('.edit_template', service_id=service_id) }}" role="button">Add a new message template</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ GOV.UK Notify | Manage users
|
||||
<p>Here's where you can add or remove users of a service.</p>
|
||||
|
||||
{{ page_footer(
|
||||
back_link = url_for('.dashboard'),
|
||||
back_link = url_for('.dashboard', service_id=service_id),
|
||||
back_link_text = 'Back to dashboard'
|
||||
) }}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ GOV.UK Notify | Notifications activity
|
||||
</div>
|
||||
|
||||
{{ page_footer(
|
||||
back_link = url_for('.showjob'),
|
||||
back_link = url_for('.showjob', service_id=service_id),
|
||||
back_link_text = 'View other messages in this job'
|
||||
) }}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{% endfor %}
|
||||
|
||||
<p>
|
||||
or <a href="{{ url_for(".add_template") }}">create a new template</a>
|
||||
or <a href="{{ url_for(".add_template", service_id=service_id) }}">create a new template</a>
|
||||
</p>
|
||||
|
||||
<h2 class="heading-medium">2. Add recipients</h2>
|
||||
|
||||
@@ -12,26 +12,26 @@
|
||||
{{ browse_list([
|
||||
{
|
||||
'title': 'Change your service name',
|
||||
'link': url_for('.name'),
|
||||
'link': url_for('.name', service_id=service_id),
|
||||
'hint': 'Your service name ({}) is included in every sent notification'.format(service.name)
|
||||
},
|
||||
{
|
||||
'title': 'Request to go live and turn off sending restrictions',
|
||||
'link': url_for('.request_to_go_live'),
|
||||
'link': url_for('.request_to_go_live', service_id=service_id),
|
||||
'hint': 'A live service can send notifications to any phone number or email address',
|
||||
} if not service.live else {
|
||||
},
|
||||
{
|
||||
'title': 'Turn off all outgoing notifications',
|
||||
'link': url_for('.status'),
|
||||
'link': url_for('.status', service_id=service_id),
|
||||
'destructive': True
|
||||
} if service.active else {
|
||||
'title': 'Restart sending notifications',
|
||||
'link': url_for('.status')
|
||||
'link': url_for('.status', service_id=service_id)
|
||||
},
|
||||
{
|
||||
'title': 'Delete this service from Notify',
|
||||
'link': url_for('.delete'),
|
||||
'link': url_for('.delete', service_id=service_id),
|
||||
'destructive': True
|
||||
},
|
||||
]) }}
|
||||
|
||||
@@ -18,7 +18,7 @@ GOV.UK Notify | Service settings
|
||||
{{ page_footer(
|
||||
'Confirm',
|
||||
destructive=destructive,
|
||||
back_link=url_for('.service_settings')
|
||||
back_link=url_for('.service_settings', service_id=service_id)
|
||||
) }}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
{{ page_footer(
|
||||
'Yes, delete ‘{}’'.format(service.name),
|
||||
destructive=True,
|
||||
back_link=url_for('.service_settings')
|
||||
back_link=url_for('.service_settings', service_id=service_id)
|
||||
) }}
|
||||
</form>
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ GOV.UK Notify | Service settings
|
||||
{{ textbox(form.service_name) }}
|
||||
{{ page_footer(
|
||||
'Save',
|
||||
back_link=url_for('.service_settings')
|
||||
back_link=url_for('.service_settings', service_id=service_id)
|
||||
) }}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<form method="post">
|
||||
{{ page_footer(
|
||||
'Send request',
|
||||
back_link=url_for('.service_settings')
|
||||
back_link=url_for('.service_settings', service_id=service_id)
|
||||
) }}
|
||||
</form>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ GOV.UK Notify | Service settings
|
||||
{{ page_footer(
|
||||
'Turn off all outgoing notifications',
|
||||
destructive=True,
|
||||
back_link=url_for('.service_settings')
|
||||
back_link=url_for('.service_settings', service_id=service_id)
|
||||
) }}
|
||||
</form>
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% extends "admin_template.html" %}
|
||||
{% from "components/table.html" import list_table, row, field %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Your profile
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<h1 class="heading-xlarge">Your profile</h1>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% extends "admin_template.html" %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
GOV.UK Notify | Service settings
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<h1 class="heading-xlarge">Change your {{ thing }}</h1>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% extends "admin_template.html" %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
GOV.UK Notify | Service settings
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<h1 class="heading-xlarge">Change your password</h1>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% extends "admin_template.html" %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
GOV.UK Notify | Service settings
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<h1 class="heading-xlarge">Change your {{ thing }}</h1>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% extends "admin_template.html" %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
GOV.UK Notify | Service settings
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
{% block fullwidth_content %}
|
||||
|
||||
<h1 class="heading-xlarge">Change your {{ thing }}</h1>
|
||||
|
||||
@@ -20,7 +20,7 @@ GOV.UK Notify | Service settings
|
||||
{{ page_footer(
|
||||
'Confirm',
|
||||
destructive=destructive,
|
||||
back_link=url_for('.service_settings')
|
||||
back_link=url_for('.userprofile')
|
||||
) }}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user