2017-07-07 15:51:59 +01:00
|
|
|
|
{% from "components/table.html" import list_table, field, hidden_field_heading, right_aligned_field_heading, row_heading %}
|
2018-03-21 15:08:03 +00:00
|
|
|
|
{% from "components/previous-next-navigation.html" import previous_next_navigation %}
|
2017-07-07 15:51:59 +01:00
|
|
|
|
{% from "components/message-count-label.html" import message_count_label %}
|
|
|
|
|
|
|
|
|
|
|
|
<div class="ajax-block-container">
|
2017-10-17 11:41:12 +01:00
|
|
|
|
{% if messages %}
|
|
|
|
|
|
<p class="bottom-gutter-2-3 top-gutter-2-3">
|
2018-01-02 14:38:14 +00:00
|
|
|
|
<a href="{{ url_for('.inbox_download', service_id=current_service.id) }}" download class="heading-small">Download these messages</a>
|
2017-10-17 11:41:12 +01:00
|
|
|
|
</p>
|
|
|
|
|
|
{% endif %}
|
2017-07-07 15:51:59 +01:00
|
|
|
|
{% call(item, row_number) list_table(
|
|
|
|
|
|
messages,
|
|
|
|
|
|
caption="Inbox",
|
|
|
|
|
|
caption_visible=False,
|
2017-08-24 13:57:12 +01:00
|
|
|
|
empty_message='When users text your service’s phone number ({}) you’ll see the messages here'.format(inbound_number),
|
2017-07-07 15:51:59 +01:00
|
|
|
|
field_headings=[
|
|
|
|
|
|
'From',
|
|
|
|
|
|
'First two lines of message'
|
|
|
|
|
|
],
|
|
|
|
|
|
field_headings_visible=False
|
|
|
|
|
|
) %}
|
|
|
|
|
|
{% call field() %}
|
|
|
|
|
|
<a
|
|
|
|
|
|
class="file-list-filename"
|
|
|
|
|
|
href="{{ url_for('.conversation', service_id=current_service.id, notification_id=item.id) }}#n{{ item.id }}"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ item.user_number | format_phone_number_human_readable }}
|
|
|
|
|
|
</a>
|
|
|
|
|
|
<span class="file-list-hint">{{ item.content }}</span>
|
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
{% call field(align='right') %}
|
|
|
|
|
|
<span class="align-with-message-body">
|
|
|
|
|
|
{{ item.created_at | format_delta }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
{% endcall %}
|
2018-03-21 15:08:03 +00:00
|
|
|
|
|
|
|
|
|
|
{{ previous_next_navigation(prev_page, next_page) }}
|
2017-07-07 15:51:59 +01:00
|
|
|
|
</div>
|
2018-03-21 15:08:03 +00:00
|
|
|
|
|