mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-03 14:48:25 -04:00
This commit adds two things: a section on the dashboard to show how many inbound messages the service has received in the last 7 days, and how recently an inbound message has been received --- Doesn’t show the contents of any messages, just like how the rest of the dashboard is an aggregation, never individual messages. a page to show all the inbound messages the service has received in the last 7 days --- This shows the first line of the message. Eventually this will link through to a ‘conversation’ page, where a service can see all the messages it’s received from a given phone number.
44 lines
1.3 KiB
HTML
44 lines
1.3 KiB
HTML
{% from "components/table.html" import list_table, field, hidden_field_heading, right_aligned_field_heading, row_heading %}
|
||
{% from "components/message-count-label.html" import message_count_label %}
|
||
|
||
{% extends "withnav_template.html" %}
|
||
|
||
{% block service_page_title %}
|
||
Inbox
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
<h1 class="heading-large">
|
||
Received text messages
|
||
</h1>
|
||
<div>
|
||
{% call(item, row_number) list_table(
|
||
messages,
|
||
caption="Inbox",
|
||
caption_visible=False,
|
||
empty_message='When users text your service’s phone number ({}) you’ll see the messages here'.format(current_service.sms_sender),
|
||
field_headings=[
|
||
'From',
|
||
'First two lines of message'
|
||
],
|
||
field_headings_visible=False
|
||
) %}
|
||
{% call field() %}
|
||
<span class="file-list-filename" href="#">{{ item.user_number }}</span>
|
||
<span class="wide-left-hand-column">{{ item.content }}</span>
|
||
{% endcall %}
|
||
{% call field(align='right') %}
|
||
<span class="file-list-hint align-with-message-body">
|
||
{{ item.created_at | format_delta }}
|
||
</span>
|
||
{% endcall %}
|
||
{% endcall %}
|
||
{% if messages %}
|
||
<p class="table-show-more-link">
|
||
Showing all {{ messages | length }} messages
|
||
</p>
|
||
{% endif %}
|
||
</div>
|
||
{% endblock %}
|