Move ‘edit template’ to its own link

It’s probably clearer to have it labelled explicitly, rather than have
people infer that they should click the title of a template to edit it.
This commit is contained in:
Chris Hill-Scott
2016-04-11 15:18:29 +01:00
parent 6bfb7914e2
commit 33e1b2679f

View File

@@ -45,22 +45,12 @@
template.subject,
template.formatted_as_markup,
name=template.name,
edit_link=(
url_for(".edit_service_template", service_id=current_service.id, template_id=template.id)
if current_user.has_permissions(permissions=['manage_templates'], admin_override=True) else
None
)
) }}
{% elif 'sms' == template_type %}
{{ sms_message(
template.formatted_as_markup,
name=template.name,
edit_link=(
url_for(".edit_service_template", service_id=current_service.id, template_id=template.id)
if current_user.has_permissions(permissions=['manage_templates'], admin_override=True) else
None
)
) }}
template.formatted_as_markup,
name=template.name
) }}
{% endif %}
</div>
<div class="column-one-third">
@@ -72,6 +62,9 @@
{% if current_user.has_permissions(permissions=['manage_api_keys']) %}
<a href="{{ url_for(".send_from_api", service_id=current_service.id, template_id=template.id) }}">API integration</a>
{% endif %}
{% if current_user.has_permissions(permissions=['manage_templates'], admin_override=True) %}
<a href="{{ url_for(".edit_service_template", service_id=current_service.id, template_id=template.id) }}">Edit template</a>
{% endif %}
</div>
</div>
{% endfor %}