mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-08 13:00:08 -06:00
Closes #5503: ISO 8601 date in UI and alternative format as tooltip
With this commit all dates in the UI are now consistently displayed. I changed the long date format as suggested by @xkilian and confirmed by my own research. * DATETIME_FORMAT * Before July 20, 2020 4:52 p.m. * Now 20th July, 2020 16:52 "20th July, 2020" would be spoken as "the 20th of July, 2020" but the "the" and "of" are never written. The only exception is `object_list.html`. I tried it but there it does not work so easily because the dates are passed to Jinja as SafeString.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<tr>
|
||||
<td>Created</td>
|
||||
<td>
|
||||
{{ object.created }}
|
||||
{{ object.created|annotated_date }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<tr>
|
||||
<td>Time</td>
|
||||
<td>
|
||||
{{ object.time }}
|
||||
{{ object.time|annotated_date }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<div class="col-md-12">
|
||||
{% if report.result %}
|
||||
Last run: <a href="{% url 'extras:report_result' job_result_pk=report.result.pk %}">
|
||||
<strong>{{ report.result.created }}</strong>
|
||||
<strong>{{ report.result.created|annotated_date }}</strong>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<td class="rendered-markdown">{{ report.description|render_markdown|placeholder }}</td>
|
||||
<td class="text-right">
|
||||
{% if report.result %}
|
||||
<a href="{% url 'extras:report_result' job_result_pk=report.result.pk %}">{{ report.result.created }}</a>
|
||||
<a href="{% url 'extras:report_result' job_result_pk=report.result.pk %}">{{ report.result.created|annotated_date }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">Never</span>
|
||||
{% endif %}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p>
|
||||
Run: <strong>{{ result.created }}</strong>
|
||||
Run: <strong>{{ result.created|annotated_date }}</strong>
|
||||
{% if result.completed %}
|
||||
Duration: <strong>{{ result.duration }}</strong>
|
||||
{% else %}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<td>{{ script.Meta.description|render_markdown }}</td>
|
||||
{% if script.result %}
|
||||
<td class="text-right">
|
||||
<a href="{% url 'extras:script_result' job_result_pk=script.result.pk %}">{{ script.result.created }}</a>
|
||||
<a href="{% url 'extras:script_result' job_result_pk=script.result.pk %}">{{ script.result.created|annotated_date }}</a>
|
||||
</td>
|
||||
{% else %}
|
||||
<td class="text-right text-muted">Never</td>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<li><a href="{% url 'extras:script_list' %}">Scripts</a></li>
|
||||
<li><a href="{% url 'extras:script_list' %}#module.{{ script.module }}">{{ script.module|bettertitle }}</a></li>
|
||||
<li><a href="{% url 'extras:script' module=script.module name=class_name %}">{{ script }}</a></li>
|
||||
<li>{{ result.created }}</li>
|
||||
<li>{{ result.created|annotated_date }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@@ -32,7 +32,7 @@
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<p>
|
||||
Run: <strong>{{ result.created }}</strong>
|
||||
Run: <strong>{{ result.created|annotated_date }}</strong>
|
||||
{% if result.completed %}
|
||||
Duration: <strong>{{ result.duration }}</strong>
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user