Put notification meta above message, remove AJAX

The meta info about a notification (who sent it, when they sent it)
won’t ever change, so there’s no need for it to reload it using AJAX.

Putting it above the message and under the `<h1>` makes it match how
this information is displayed on the job page.

On the job page this information is bold, but visually the job page is
using too much bold now (nothing is emphasised/differentiated if
everything is bold). So this commit also makes this line of info regular
on both the notification and job pages.
This commit is contained in:
Chris Hill-Scott
2017-06-19 14:36:25 +01:00
parent 974953a64f
commit 929e2b841f
3 changed files with 8 additions and 1 deletions

View File

@@ -70,6 +70,8 @@ def view_notification(service_id, notification_id):
help=get_help_argument()
),
partials=get_single_notification_partials(notification),
created_by=notification.get('created_by'),
created_at=notification['created_at'],
help=get_help_argument()
)

View File

@@ -1,5 +1,5 @@
<div class="ajax-block-container">
<p class='heading-small bottom-gutter'>
<p class='bottom-gutter'>
{% if job.scheduled_for %}
{% if job.processing_started %}
Sent by {{ job.created_by.name }} on {{ job.processing_started|format_datetime_short }}

View File

@@ -14,6 +14,11 @@
{{ message_count_label(1, template.template_type, suffix='') | capitalize }}
</h1>
<p>
Sent {% if created_by %}by {{ created_by.name }} {% endif %}
on {{ created_at|format_datetime_short }}
</p>
{{ template|string }}
{{ ajax_block(partials, updates_url, 'status', finished=finished) }}