mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* Introduce the isodate(), isotime(), and isodatetime() template filters * Display the relative time on mouse hover * Render journal entry times in ISO 8601 format * Use ISO 8601 format when displaying dates & times in a table * Standardize the use of DateTimeColumn across all tables
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
{% block subtitle %}
|
||||
{% if object.created %}
|
||||
<div class="text-secondary fs-5">
|
||||
{% trans "Created" %} {{ object.created|annotated_date }}
|
||||
{% trans "Created" %} {{ object.created|isodatetime }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock subtitle %}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
{% block subtitle %}
|
||||
<div class="text-secondary fs-5">
|
||||
{% trans "Created" %} {{ object.created|annotated_date }}
|
||||
{% trans "Created" %} {{ object.created|isodatetime }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -49,12 +49,12 @@
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">{% trans "Created" %}</th>
|
||||
<td>{{ object.created|annotated_date }}</td>
|
||||
<td>{{ object.created|isodatetime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Scheduled" %}</th>
|
||||
<td>
|
||||
{{ object.scheduled|annotated_date|placeholder }}
|
||||
{{ object.scheduled|isodatetime|placeholder }}
|
||||
{% if object.interval %}
|
||||
({% blocktrans with interval=object.interval %}every {{ interval }} minutes{% endblocktrans %})
|
||||
{% endif %}
|
||||
@@ -62,11 +62,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Started" %}</th>
|
||||
<td>{{ object.started|annotated_date|placeholder }}</td>
|
||||
<td>{{ object.started|isodatetime|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Completed" %}</th>
|
||||
<td>{{ object.completed|annotated_date|placeholder }}</td>
|
||||
<td>{{ object.completed|isodatetime|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
{% block subtitle %}
|
||||
<div class="text-secondary fs-5">
|
||||
<span>{% trans "Created" %} {{ job.created_at|annotated_date }}</span>
|
||||
<span>{% trans "Created" %} {{ job.created_at|isodatetime }}</span>
|
||||
</div>
|
||||
{% endblock subtitle %}
|
||||
|
||||
@@ -71,11 +71,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Created" %}</th>
|
||||
<td>{{ job.created_at|annotated_date }}</td>
|
||||
<td>{{ job.created_at|isodatetime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Queued" %}</th>
|
||||
<td>{{ job.enqueued_at|annotated_date }}</td>
|
||||
<td>{{ job.enqueued_at|isodatetime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Status" %}</th>
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
{% block subtitle %}
|
||||
<div class="text-secondary fs-5">
|
||||
<span>{% trans "Created" %} {{ worker.birth_date|annotated_date }}</span>
|
||||
<span>{% trans "Created" %} {{ worker.birth_date|isodatetime }}</span>
|
||||
</div>
|
||||
{% endblock subtitle %}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Birth" %}</th>
|
||||
<td>{{ worker.birth_date|annotated_date }}</td>
|
||||
<td>{{ worker.birth_date|isodatetime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Queues" %}</th>
|
||||
|
Reference in New Issue
Block a user