mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 17:45:32 -04:00
Added current_service to flask context and template context.
Fix all tests and conflicts. Removed comment line.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
You need a template before you can send
|
||||
{{ 'emails' if 'email' == template_type else 'text messages' }}
|
||||
</p>
|
||||
<a href="{{ url_for('.add_service_template', service_id=service_id, template_type=template_type) }}" class="button">Add a new template</a>
|
||||
<a href="{{ url_for('.add_service_template', service_id=current_service.id, template_type=template_type) }}" class="button">Add a new template</a>
|
||||
{% else %}
|
||||
<p>You need to ask your service manager to add templates before you can send messages</p>
|
||||
{% endif %}
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
{% if current_user.has_permissions(permissions=['manage_templates'], admin_override=True) %}
|
||||
<div class="column-one-third">
|
||||
<a href="{{ url_for('.add_service_template', service_id=service_id, template_type=template_type) }}" class="button align-with-heading">Add new template</a>
|
||||
<a href="{{ url_for('.add_service_template', service_id=current_service.id, template_type=template_type) }}" class="button align-with-heading">Add new template</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -46,7 +46,7 @@
|
||||
template.formatted_as_markup,
|
||||
name=template.name,
|
||||
edit_link=(
|
||||
url_for(".edit_service_template", service_id=service_id, template_id=template.id)
|
||||
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
|
||||
)
|
||||
@@ -56,7 +56,7 @@
|
||||
template.formatted_as_markup,
|
||||
name=template.name,
|
||||
edit_link=(
|
||||
url_for(".edit_service_template", service_id=service_id, template_id=template.id)
|
||||
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
|
||||
)
|
||||
@@ -66,11 +66,11 @@
|
||||
<div class="column-one-third">
|
||||
<div class="sms-message-use-links">
|
||||
{% if current_user.has_permissions(permissions=['send_texts', 'send_emails', 'send_letters']) %}
|
||||
<a href="{{ url_for(".send_messages", service_id=service_id, template_id=template.id) }}">Send from a CSV file</a>
|
||||
<a href="{{ url_for(".send_message_to_self", service_id=service_id, template_id=template.id) }}">Send yourself a test</a>
|
||||
<a href="{{ url_for(".send_messages", service_id=current_service.id, template_id=template.id) }}">Send from a CSV file</a>
|
||||
<a href="{{ url_for(".send_message_to_self", service_id=current_service.id, template_id=template.id) }}">Send yourself a test</a>
|
||||
{% endif %}
|
||||
{% if current_user.has_permissions(permissions=['manage_api_keys']) %}
|
||||
<a href="{{ url_for(".send_from_api", service_id=service_id, template_id=template.id) }}">API integration</a>
|
||||
<a href="{{ url_for(".send_from_api", service_id=current_service.id, template_id=template.id) }}">API integration</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user