Files
notifications-admin/app/templates/views/dashboard/inbox.html
Chris Hill-Scott b8cc0de44e Use file list pattern for notifications
Most of our tables are now lists which have:
- a thing you click on
- some secondary info about that thing underneath
- some extra numbers/status on the right hand side

Since these are so similar, they should share the same pattern, which
this commit does (using the `file-list` pattern).

Visually this means:
- the secondary text on the inbox becomes grey not black, for
  consistency
- the status bit of the notifications tables bottom align like the
  status of messages in the inbox

These both seem like OK changes to make for the sake of consistency.
2017-06-21 17:57:20 +01:00

50 lines
1.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% 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 %}
Received text messages
{% 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 services phone number ({}) youll see the messages here'.format(current_service.sms_sender),
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 %}
{% if messages %}
<p class="table-show-more-link">
{{ count_of_messages }} message{{ '' if 1 == count_of_messages else 's' }}
from {{ count_of_users }} user{{ '' if 1 == count_of_users else 's' }}
</p>
{% endif %}
</div>
{% endblock %}