mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-26 08:09:51 -04:00
Use friendlier relative dates for ‘last edited’
Because ‘2 months ago’ is more human-sounding than ‘70 days ago’. Using this pattern (borrowed from the API integration page) will also use Javascript to keep the time updated, so ‘just now’ will turn into ‘1 minute ago’ without having to reload the page.
This commit is contained in:
@@ -57,7 +57,13 @@
|
||||
|
||||
<div class="bottom-gutter-1-2">
|
||||
{% if template._template.updated_at %}
|
||||
<h2 class="heading-small bottom-gutter-2-3 heading-inline">Last edited {{ template._template.updated_at|format_delta }}</h2>
|
||||
<h2 class="heading-small bottom-gutter-2-3 heading-inline">
|
||||
Last edited
|
||||
<time class="timeago" datetime="{{ template._template.updated_at }}">
|
||||
{{ template._template.updated_at|format_delta }}
|
||||
</time>
|
||||
</h2>
|
||||
|
||||
 
|
||||
<a href="{{ url_for('.view_template_versions', service_id=current_service.id, template_id=template.id) }}">See previous versions</a>
|
||||
 
|
||||
|
||||
Reference in New Issue
Block a user