mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Offer link to upload
‘Upload recipients’ and ‘Send to one recipient’ have always been slightly clunky phrases. Now that basic view jumps straight into the ‘Send to one recipient’ flow there’s no way for users to get to the ‘Upload recipients’ flow. By adding a link to it from the ‘Send to one recipient’ flow it’s possible for users of basic view to access it. But we don’t want to introduce too much inconsistency between basic view and admin view because users will be migrating from one to another. They might also be talking to their manager, who wouldn’t be able to tell them where to click if they were looking at two completely different interfaces. This also means that we can keep the left-hand navigation in basic view nice and simple with the two options (‘Templates’ and ‘Sent messages’), rather than trying to introduce something like ‘Send one message’ and ‘Send lots of messages’ later on.
This commit is contained in:
@@ -459,6 +459,10 @@ def send_test_step(service_id, template_id, step_index):
|
||||
optional_placeholder=optional_placeholder,
|
||||
back_link=back_link,
|
||||
help=get_help_argument(),
|
||||
link_to_upload=(
|
||||
request.endpoint == 'main.send_one_off_step' and
|
||||
step_index == 0
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -26,3 +26,32 @@
|
||||
{%- endif -%}
|
||||
{%- endif %} {{ suffix }}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro recipient_count_label(count, template_type) -%}
|
||||
{% if template_type == None %}
|
||||
{%- if count == 1 -%}
|
||||
recipient
|
||||
{%- else -%}
|
||||
recipients
|
||||
{%- endif -%}
|
||||
{% endif %}
|
||||
{%- if template_type == 'sms' -%}
|
||||
{%- if count == 1 -%}
|
||||
phone number
|
||||
{%- else -%}
|
||||
phone numbers
|
||||
{%- endif -%}
|
||||
{%- elif template_type == 'email' -%}
|
||||
{%- if count == 1 -%}
|
||||
email address
|
||||
{%- else -%}
|
||||
email addresses
|
||||
{%- endif -%}
|
||||
{%- elif template_type == 'letter' -%}
|
||||
{%- if count == 1 -%}
|
||||
address
|
||||
{%- else -%}
|
||||
addresses
|
||||
{%- endif -%}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/file-upload.html" import file_upload %}
|
||||
{% from "components/message-count-label.html" import recipient_count_label %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/table.html" import list_table, field, text_field, index_field, index_field_heading %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{{ page_title }}
|
||||
@@ -29,6 +28,13 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if link_to_upload %}
|
||||
<p>
|
||||
<a href="{{ url_for('.send_messages', service_id=current_service.id, template_id=template.id) }}">
|
||||
Upload a list of {{ recipient_count_label(999, template.template_type) }}
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{{ page_footer('Continue', back_link=back_link) }}
|
||||
</form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user