2016-03-16 16:57:10 +00:00
{% extends "withnav_template.html" %}
2016-09-27 15:07:40 +01:00
{% from "components/ajax-block.html" import ajax_block %}
2020-09-03 16:12:25 +01:00
{% from "components/page-header.html" import page_header %}
2017-05-30 13:51:25 +01:00
{% from "components/page-footer.html" import page_footer %}
2018-09-19 12:39:36 +01:00
{% from "components/form.html" import form_wrapper %}
2023-08-30 11:07:38 -04:00
{% from "components/components/button/macro.njk" import usaButton %}
2016-03-16 16:57:10 +00:00
2018-07-13 16:21:22 +01:00
{% set page_title = (
2022-12-12 15:15:50 -05:00
(99|message_count_label(message_type, suffix='')) | capitalize
2018-07-13 16:21:22 +01:00
if current_user.has_permissions('view_activity')
else 'Sent messages'
) %}
2017-02-13 10:45:15 +00:00
{% block service_page_title %}
2018-07-13 16:21:22 +01:00
{{ page_title }}
2016-03-16 16:57:10 +00:00
{% endblock %}
{% block maincolumn_content %}
2020-09-03 16:12:25 +01:00
{{ page_header(page_title) }}
2022-12-05 15:33:44 -05:00
{{ ajax_block(
partials,
url_for('.get_notifications_as_json', service_id=current_service.id, message_type=message_type, status=status),
'counts'
) }}
2018-07-10 15:49:57 +01:00
2023-06-27 08:20:58 -07:00
< p class = "notification-status {{ field_status }}" >
Messages will remain in pending state until carrier status is received, typically 5 minutes.
</ p >
2020-04-21 13:55:23 +01:00
{% call form_wrapper(
action=url_for('.view_notifications', service_id=current_service.id, message_type=message_type),
2023-06-08 13:12:00 -04:00
class="usa-search margin-bottom-2"
2020-04-21 13:55:23 +01:00
) %}
2023-06-08 13:12:00 -04:00
< div class = "grid-col-4 {% if message_type == 'sms' %}extra-tracking{% endif %}" >
{{ search_form.to(param_extensions={
"label": {
"text": things_you_can_search_by|formatted_list(
conjunction='or',
before_each='',
after_each='',
prefix='Search by',
prefix_plural='Search by'
)
}
}) }}
</ div >
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" >
< button class = "usa-button" type = "submit" >
< span class = "usa-search__submit-text" > Search </ span >< img src = "/assets/img/usa-icons-bg/search--white.svg"
class = "usa-search__submit-icon" alt = "Search" />
2023-12-13 15:17:04 -08:00
</ button >
2020-04-21 13:55:23 +01:00
{% endcall %}
2023-06-27 08:20:58 -07:00
2020-04-21 13:55:23 +01:00
{% call form_wrapper(id="search-form") %}
2020-08-07 10:16:24 +01:00
< input type = "hidden" name = "to" {% if search_form . to . data %} value = "{{ search_form.to.data }}{% endif %}" >
2020-04-21 13:55:23 +01:00
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" >
{% endcall %}
2018-07-10 17:06:06 +01:00
{% if current_user.has_permissions('view_activity') %}
2023-06-08 13:12:00 -04:00
< p class = "font-body-sm" >
2024-06-10 10:15:22 -06:00
< a href = "{{ download_link_seven_day }}" download = "download" class = "usa-link" > Download all data last 7 days (< abbr title = "Comma separated values" > CSV</ abbr > )</ a >
2018-07-10 15:49:57 +01:00
 
2018-08-13 17:07:49 +01:00
Data available for {{ partials.service_data_retention_days }} days
2018-07-10 17:06:06 +01:00
</ p >
2024-06-10 10:15:22 -06:00
< p class = "font-body-sm" >
< a href = "{{ download_link_five_day }}" download = "download" class = "usa-link" > Download all data last 5 days (< abbr title = "Comma separated values" > CSV</ abbr > )</ a >
 
</ p >
< p class = "font-body-sm" >
< a href = "{{ download_link_three_day }}" download = "download" class = "usa-link" > Download all data last 3 days (< abbr title = "Comma separated values" > CSV</ abbr > )</ a >
 
</ p >
2024-06-24 10:44:19 -06:00
< p class = "font-body-sm" >
< a href = "{{ download_link_today }}" download = "download" class = "usa-link" > Download all data today (< abbr title = "Comma separated values" > CSV</ abbr > )</ a >
 
2024-06-10 10:15:22 -06:00
</ p >
2018-07-10 17:06:06 +01:00
{% endif %}
2018-07-10 15:49:57 +01:00
2016-09-27 15:07:40 +01:00
{{ ajax_block(
partials,
2017-06-13 11:20:41 +01:00
url_for('.get_notifications_as_json', service_id=current_service.id, message_type=message_type, status=status, page=page),
'notifications',
2020-04-08 17:55:53 +01:00
form='search-form'
2016-09-27 15:07:40 +01:00
) }}
2016-04-12 15:05:27 +01:00
{% endblock %}