mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-09 19:04:33 -04:00
Fix overlapping text on tables of notifications
This commit changes the tables of notifications from 3 columns to two columns. This is so the text has more room, so it doesn’t start overlapping. It also makes sure that if the recipient gets really long that it will be cut off with an ellipsis, rather than overlapping… I hypothesize that if a notification fails you probably don’t care when it failed, just that it failed.
This commit is contained in:
@@ -116,6 +116,7 @@ def create_app():
|
||||
application.add_template_filter(format_date_normal)
|
||||
application.add_template_filter(format_date_short)
|
||||
application.add_template_filter(format_notification_status)
|
||||
application.add_template_filter(format_notification_status_with_time)
|
||||
application.add_template_filter(format_notification_status_as_field_status)
|
||||
application.add_template_filter(format_notification_status_as_url)
|
||||
|
||||
@@ -281,6 +282,14 @@ def format_notification_status(status, template_type):
|
||||
}.get(template_type).get(status, status)
|
||||
|
||||
|
||||
def format_notification_status_with_time(status, template_type, when):
|
||||
return {
|
||||
'delivered': 'Delivered {}'.format(when),
|
||||
'sending': 'Sending since {}'.format(when),
|
||||
'created': 'Sending since {}'.format(when)
|
||||
}.get(status, format_notification_status(status, template_type))
|
||||
|
||||
|
||||
def format_notification_status_as_field_status(status):
|
||||
return {
|
||||
'failed': 'error',
|
||||
|
||||
Reference in New Issue
Block a user