Browse Source

Use annotated_date also for updated datetimes

This changes the text from: Updated 5 months, 1 week ago
to: Updated 2021-01-24 00:33 (5 months, 1 week ago)

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
Robin Schneider 4 năm trước cách đây
mục cha
commit
74f1b51b38

+ 1 - 1
netbox/templates/generic/object.html

@@ -43,7 +43,7 @@
   <p>
     <small class="text-muted">
       Created {{ object.created|annotated_date }} &middot;
-      Updated <span title="{{ object.last_updated|date:'SHORT_DATETIME_FORMAT' }} ({{ object.last_updated|date:'DATETIME_FORMAT' }})">{{ object.last_updated|timesince }}</span> ago
+      Updated {{ object.last_updated|annotated_date }} ({{ object.last_updated|timesince }} ago)
     </small>
     <span class="label label-default">{{ object|meta:"app_label" }}.{{ object|meta:"model_name" }}:{{ object.pk }}</span>
   </p>

+ 1 - 1
netbox/templates/users/userkey.html

@@ -22,7 +22,7 @@
         <p>
             <small class="text-muted">
               Created {{ object.created|annotated_date }} &middot;
-              Updated <span title="{{ object.last_updated|date:'SHORT_DATETIME_FORMAT' }} ({{ object.last_updated|date:'DATETIME_FORMAT' }})">{{ object.last_updated|timesince }}</span> ago
+              Updated {{ object.last_updated|annotated_date }} ({{ object.last_updated|timesince }} ago)
         </p>
         {% if not object.is_active %}
             <div class="alert alert-warning" role="alert">