mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Link to conversation from notification page
If you’re using inbound SMS then I reckon it’s useful to be able to naviagate from one message to the context in which that message sits (ie the conversation). This commit adds that link. This is maybe a stopgap until we do something more like chat, where you can reply on the same screen where you see the conversation, but maybe it turns out we don’t want to do that – lets see how this works.
This commit is contained in:
@@ -82,6 +82,8 @@ def view_notification(service_id, notification_id):
|
||||
created_at=notification['created_at'],
|
||||
help=get_help_argument(),
|
||||
estimated_letter_delivery_date=get_letter_timings(notification['created_at']).earliest_delivery,
|
||||
notification_id=notification['id'],
|
||||
can_receive_inbound=('inbound_sms' in current_service['permissions']),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -42,4 +42,10 @@
|
||||
{{ ajax_block(partials, updates_url, 'status', finished=finished) }}
|
||||
{% endif %}
|
||||
|
||||
{% if current_user.has_permissions(['send_texts'], admin_override=True) and template.template_type == 'sms' and can_receive_inbound %}
|
||||
<p>
|
||||
<a href="{{ url_for('.conversation', service_id=current_service.id, notification_id=notification_id, _anchor='n{}'.format(notification_id)) }}">See all text messages sent to this phone number</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user