mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Move delete link from edit to view template page
Users were having trouble finding the delete template link. It sort of made sense having it on the edit page before we had the view template page. But it doesn’t make sense now – having to choose to ‘edit’ the template before you can delete is counterintuitive. The single template page is where you go to choose an action to perform on your template. Deleting is a good example of an action you can perform on a template. So this commit moves the delete link from the edit template page to the view template page. It also puts the confirm banner on same page as the delete link The idea being that, in order to make a decision about whether to delete the template, it’s useful to be able to see the template you’re deleting. There’s no user need to edit the template before you delete it.
This commit is contained in:
@@ -23,9 +23,7 @@
|
||||
{{ radios(form.process_type) }}
|
||||
{% endif %}
|
||||
{{ page_footer(
|
||||
'Save',
|
||||
delete_link=url_for('.delete_service_template', service_id=current_service.id, template_id=template_id) if template_id or None,
|
||||
delete_link_text='Delete this template'
|
||||
'Save'
|
||||
) }}
|
||||
</div>
|
||||
<aside class="column-whole">
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
{{ textbox(form.subject, width='1-1', highlight_tags=True, rows=2) }}
|
||||
{{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=8) }}
|
||||
{{ page_footer(
|
||||
'Save',
|
||||
delete_link=url_for('.delete_service_template', service_id=current_service.id, template_id=template_id) if template_id or None,
|
||||
delete_link_text='Delete this template'
|
||||
'Save'
|
||||
) }}
|
||||
</div>
|
||||
<aside class="column-three-quarters">
|
||||
|
||||
@@ -24,9 +24,7 @@
|
||||
{{ radios(form.process_type) }}
|
||||
{% endif %}
|
||||
{{ page_footer(
|
||||
'Save',
|
||||
delete_link=url_for('.delete_service_template', service_id=current_service.id, template_id=template_id) if template_id or None,
|
||||
delete_link_text='Delete this template'
|
||||
'Save'
|
||||
) }}
|
||||
</div>
|
||||
<aside class="column-whole">
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
|
||||
{% if template._template.updated_at %}
|
||||
<div class="bottom-gutter-2">
|
||||
<div class="bottom-gutter">
|
||||
<h2 class="heading-small">Last edited {{ template._template.updated_at|format_delta }}</h2>
|
||||
<p>
|
||||
<a href="{{ url_for('.view_template_versions', service_id=current_service.id, template_id=template.id) }}">See previous versions</a>
|
||||
@@ -31,4 +31,13 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if current_user.has_permissions(permissions=['manage_templates'], admin_override=True) %}
|
||||
<div class="bottom-gutter">
|
||||
{{ page_footer(
|
||||
delete_link=url_for('.delete_service_template', service_id=current_service.id, template_id=template.id),
|
||||
delete_link_text='Delete this template'
|
||||
) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user