Restore missing created/updated times for object views

This commit is contained in:
jeremystretch 2021-07-20 13:07:18 -04:00
parent eec456ea55
commit e3603ca51c
7 changed files with 11 additions and 14 deletions

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -303,7 +303,6 @@ div.title-container {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center;
div#content-title { div#content-title {
display: flex; display: flex;

View File

@ -126,6 +126,7 @@
<div id="content-title"> <div id="content-title">
{# Center-align title in object-edit views #} {# Center-align title in object-edit views #}
<h1 class="h2 w-100">{% block title %}{% endblock title %}</h1> <h1 class="h2 w-100">{% block title %}{% endblock title %}</h1>
{% block subtitle %}{% endblock %}
</div> </div>
{# Controls #} {# Controls #}

View File

@ -19,6 +19,14 @@
{% block title %}{{ object }}{% endblock %} {% block title %}{{ object }}{% endblock %}
{% block subtitle %}
<small class="text-muted">
Created {{ object.created|annotated_date }} &middot;
Updated <span title="{{ object.last_updated }}">{{ object.last_updated|timesince }}</span> ago
<span class="badge bg-secondary">{{ object|meta:"app_label" }}.{{ object|meta:"model_name" }}:{{ object.pk }}</span>
</small>
{% endblock %}
{% block controls %} {% block controls %}
{# Clone/Edit/Delete Buttons #} {# Clone/Edit/Delete Buttons #}
<div class="controls pb-2 mx-0"> <div class="controls pb-2 mx-0">
@ -70,14 +78,3 @@
{% endif %} {% endif %}
</ul> </ul>
{% endblock tabs %} {% endblock tabs %}
{% block content %}
<p>
<small class="text-muted">
Created {{ object.created|annotated_date }} &middot;
Updated <span title="{{ object.last_updated|annotated_date }}">{{ object.last_updated|timesince }}</span> ago
</small>
<span class="badge bg-primary">{{ object|meta:"app_label" }}.{{ object|meta:"model_name" }}:{{ object.pk }}</span>
</p>
{% endblock content %}
{% block components %}{% endblock %}