Merge pull request #4198 from alphagov/service-history-link

Show link to service history in the settings page
This commit is contained in:
Ben Thorner
2022-03-25 09:49:00 +00:00
committed by GitHub
9 changed files with 29 additions and 14 deletions

View File

@@ -3,7 +3,7 @@
position: relative;
margin-bottom: 30px;
&-delete-link {
&-link {
line-height: 40px;
padding: 1px 0 0 15px;

View File

@@ -31,7 +31,7 @@
{% endif %}
{% if delete_link %}
<span class="page-footer-delete-link {% if not button_text %}page-footer-delete-link-without-button{% endif %}">
<span class="page-footer-link {% if not button_text %}page-footer-delete-link-without-button{% endif %}">
<a class="govuk-link govuk-link--destructive" href="{{ delete_link }}">{{ delete_link_text }}</a>
</span>
{% endif %}

View File

@@ -71,7 +71,7 @@
</p>
{% endif %}
{% if user.state == 'active' %}
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<span class="page-footer-link page-footer-delete-link-without-button">
<a class="govuk-link govuk-link--destructive" href="{{ url_for('main.archive_user', user_id=user.id) }}">
Archive user
</a>

View File

@@ -30,7 +30,7 @@
{% if job.letter_job_can_be_cancelled %}
<div class="js-stick-at-bottom-when-scrolling">
<div class="page-footer">
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<span class="page-footer-link page-footer-delete-link-without-button">
<a class="govuk-link govuk-link--destructive" href="{{ url_for('main.cancel_letter_job', service_id=current_service.id, job_id=job.id) }}">Cancel sending these letters</a>
</span>
{% else %}

View File

@@ -460,17 +460,23 @@
{% if current_service.active and (current_service.trial_mode or current_user.platform_admin) %}
<p class="top-gutter-1-2">
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<span class="page-footer-link page-footer-delete-link-without-button">
<a class="govuk-link govuk-link--destructive" href="{{ url_for('.archive_service', service_id=current_service.id) }}">
Delete this service
</a>
</span>
{% if current_user.platform_admin %}
<span class="page-footer-delete-link">
<a href="{{ url_for('.suspend_service', service_id=current_service.id) }}" class="govuk-link govuk-link--destructive page-footer-delete-link">
<span class="page-footer-link">
<a href="{{ url_for('.suspend_service', service_id=current_service.id) }}" class="govuk-link govuk-link--destructive page-footer-link">
Suspend service
</a>
</span>
<span class="page-footer-link">
<a href="{{ url_for('.history', service_id=current_service.id) }}" class="govuk-link govuk-link--no-visited-state page-footer-link">
Service history
</a>
</span>
{% endif %}
</p>
{% endif %}
@@ -479,11 +485,18 @@
<div class="hint bottom-gutter-1-2">
Service suspended
</div>
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<span class="page-footer-link page-footer-delete-link-without-button">
<a class="govuk-link govuk-link--destructive" href="{{ url_for('.resume_service', service_id=current_service.id) }}">
Resume service
</a>
</span>
<span class="page-footer-link">
<a href="{{ url_for('.history', service_id=current_service.id) }}" class="govuk-link govuk-link--no-visited-state page-footer-link">
Service history
</a>
</span>
</p>
{% endif %}

View File

@@ -67,14 +67,14 @@
{% endif %}
{% if current_user.has_permissions('manage_templates') and user_has_template_permission %}
{% if not template._template.archived %}
<span class="page-footer-delete-link page-footer-delete-link-without-button bottom-gutter-2-3">
<span class="page-footer-link page-footer-delete-link-without-button bottom-gutter-2-3">
<a class="govuk-link govuk-link--destructive" href="{{ url_for('.delete_service_template', service_id=current_service.id, template_id=template.id) }}">Delete this template</a>
</span>
&emsp;
{% endif %}
{% if template.template_type not in ('letter', 'broadcast') %}
{% if not template._template.redact_personalisation %}
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<span class="page-footer-link page-footer-delete-link-without-button">
<a class="govuk-link govuk-link--destructive" href="{{ url_for('.confirm_redact_template', service_id=current_service.id, template_id=template.id) }}">Hide personalisation after sending</a>
</span>
{% else %}

View File

@@ -130,7 +130,7 @@
<div class="js-stick-at-bottom-when-scrolling">
<div class="page-footer">
{% if not confirm_delete_banner %}
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<span class="page-footer-link page-footer-delete-link-without-button">
<a class="govuk-link govuk-link--destructive" href="{{ url_for('main.delete_contact_list', service_id=current_service.id, contact_list_id=contact_list.id) }}">Delete this contact list</a>
</span>
{% endif %}