Merge pull request #2994 from alphagov/let-trial-mode-services-be-archived

Let users archive their own trial mode services
This commit is contained in:
Chris Hill-Scott
2019-06-04 13:03:41 +01:00
committed by GitHub
8 changed files with 116 additions and 46 deletions

View File

@@ -4,7 +4,7 @@
<div class="ajax-block-container">
{% if messages %}
<p class="bottom-gutter-2-3 top-gutter-2-3">
<p class="bottom-gutter-2-3 top-gutter-1-2">
<a href="{{ url_for('.inbox_download', service_id=current_service.id) }}" download class="heading-small">Download these messages</a>
</p>
{% endif %}
@@ -37,4 +37,3 @@
{{ previous_next_navigation(prev_page, next_page) }}
</div>

View File

@@ -353,32 +353,39 @@
{% endcall %}
<p>
{% if current_service.active %}
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<a href="{{ url_for('.archive_service', service_id=current_service.id) }}">
Archive service
</a>
</span>
<span class="page-footer-delete-link">
<a href="{{ url_for('.suspend_service', service_id=current_service.id) }}" class="page-footer-delete-link">
Suspend service
</a>
</span>
{% else %}
<div class="hint bottom-gutter-1-2">
Service suspended
</div>
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<a href="{{ url_for('.resume_service', service_id=current_service.id) }}">
Resume service
</a>
</span>
{% endif %}
</p>
</div>
{% endif %}
{% 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">
<a 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="page-footer-delete-link">
Suspend service
</a>
</span>
{% endif %}
</p>
{% endif %}
{% if (not current_service.active) and current_user.platform_admin %}
<p>
<div class="hint bottom-gutter-1-2">
Service suspended
</div>
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<a href="{{ url_for('.resume_service', service_id=current_service.id) }}">
Resume service
</a>
</span>
</p>
{% endif %}
{% endblock %}
}