mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Add a page to choose a contact list
You’ll be able to use a contact list by first choosing a template, then choosing the list you want to use. At the moment this shows all lists, not just the ones that are compatible with your template.
This commit is contained in:
53
app/templates/views/send-contact-list.html
Normal file
53
app/templates/views/send-contact-list.html
Normal file
@@ -0,0 +1,53 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/big-number.html" import big_number -%}
|
||||
{% from "components/message-count-label.html" import recipient_count_label %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Choose a saved contact list
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header(
|
||||
'Choose a saved contact list',
|
||||
back_link=url_for('.send_one_off', service_id=current_service.id, template_id=template.id)
|
||||
) }}
|
||||
|
||||
<div class='dashboard-table ajax-block-container'>
|
||||
{% call(item, row_number) list_table(
|
||||
contact_lists,
|
||||
caption="Existing contact lists",
|
||||
caption_visible=False,
|
||||
empty_message=(
|
||||
'You don’t have any contact lists yet'
|
||||
),
|
||||
field_headings=[
|
||||
'File',
|
||||
'Status'
|
||||
],
|
||||
field_headings_visible=False
|
||||
) %}
|
||||
{% call row_heading() %}
|
||||
<div class="file-list">
|
||||
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('main.send_from_contact_list', service_id=current_service.id, template_id=template.id, contact_list_id=item.id) }}">{{ item.original_file_name }}</a>
|
||||
<span class="file-list-hint">
|
||||
Uploaded {{ item.created_at|format_datetime_relative }}
|
||||
</span>
|
||||
</div>
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
{{ big_number(
|
||||
item.row_count,
|
||||
smallest=True,
|
||||
label=recipient_count_label(
|
||||
item.row_count,
|
||||
item.template_type
|
||||
)
|
||||
) }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user