|
13 | 13 | {% block extra_controls %}
|
14 | 14 | {% endblock %}
|
15 | 15 |
|
16 |
| -{% block page-header %} |
17 |
| -<div class="container-fluid mt-2 d-print-none"> |
18 |
| - <div class="d-flex justify-content-between align-items-center mt-2"> |
| 16 | +{% block breadcrumbs %} |
| 17 | +<li class="breadcrumb-item"><a href="{{ object.get_list_url }}">{{ object.custom_object_type.get_verbose_name_plural }}</a></li> |
| 18 | +<li class="breadcrumb-item"><a href="{{ object.custom_object_type.get_absolute_url }}">{{ object.custom_object_type }}</a></li> |
| 19 | +{% endblock breadcrumbs %} |
19 | 20 |
|
20 |
| - {# Title #} |
21 |
| - <div> |
22 |
| - <h1 class="page-title">{% block title %}{{ object }}{% endblock title %}</h1> |
23 |
| - {% block subtitle %}{% endblock %} |
24 |
| - </div> |
| 21 | +{% block object_identifier %} |
| 22 | +{{ object|meta:"app_label" }}.{{ object.custom_object_type.name }}:{{ object.pk }} |
| 23 | +{% if object.slug %}({{ object.slug }}){% endif %} |
| 24 | +{% endblock object_identifier %} |
25 | 25 |
|
26 |
| - {# Controls #} |
27 |
| - <div class="d-print-none"> |
28 |
| - {% block controls %} |
29 |
| - <div class="btn-list"> |
30 |
| - {% block control-buttons %} |
31 |
| - {# Default buttons #} |
32 |
| - {% if perms.extras.add_bookmark and object.bookmarks %} |
33 |
| - {% custom_object_bookmark_button object %} |
34 |
| - {% endif %} |
35 |
| - {% if perms.extras.add_subscription and object.subscriptions %} |
36 |
| - {% custom_object_subscribe_button object %} |
37 |
| - {% endif %} |
38 |
| - {% if request.user|can_add:object %} |
39 |
| - {% custom_object_clone_button object %} |
40 |
| - {% endif %} |
41 |
| - {% if request.user|can_change:object %} |
42 |
| - {% custom_object_edit_button object %} |
43 |
| - {% endif %} |
44 |
| - {% if request.user|can_delete:object %} |
45 |
| - {% custom_object_delete_button object %} |
46 |
| - {% endif %} |
47 |
| - {% endblock %} |
48 |
| - </div> |
| 26 | +{% block title %}{{ object }}{% endblock title %} |
49 | 27 |
|
50 |
| - {# Custom links #} |
51 |
| - <div class="d-flex justify-content-end"> |
52 |
| - <div class="btn-list"> |
53 |
| - {% block custom-links %} |
54 |
| - {% custom_links object %} |
55 |
| - {% endblock custom-links %} |
56 |
| - </div> |
57 |
| - </div> |
58 |
| - |
59 |
| - {% endblock controls %} |
60 |
| - </div> |
| 28 | +{% block subtitle %} |
| 29 | +<div class="text-secondary fs-5"> |
| 30 | + {% trans "Created" %} {{ object.created|isodatetime:"minutes" }} |
| 31 | + {% if object.last_updated %} |
| 32 | + <span class="separator">·</span> |
| 33 | + {% trans "Updated" %} {{ object.last_updated|isodatetime:"minutes" }} |
| 34 | + {% endif %} |
| 35 | +</div> |
| 36 | +{% endblock subtitle %} |
61 | 37 |
|
| 38 | +{% block controls %} |
| 39 | +<div class="btn-list justify-content-end mb-2"> |
| 40 | + {% block control-buttons %} |
| 41 | + {# Default buttons #} |
| 42 | + {% if perms.extras.add_bookmark and object.bookmarks %} |
| 43 | + {% custom_object_bookmark_button object %} |
| 44 | + {% endif %} |
| 45 | + {% if perms.extras.add_subscription and object.subscriptions %} |
| 46 | + {% custom_object_subscribe_button object %} |
| 47 | + {% endif %} |
| 48 | + {% if request.user|can_add:object %} |
| 49 | + {% custom_object_clone_button object %} |
| 50 | + {% endif %} |
| 51 | + {% if request.user|can_change:object %} |
| 52 | + {% custom_object_edit_button object %} |
| 53 | + {% endif %} |
| 54 | + {% if request.user|can_delete:object %} |
| 55 | + {% custom_object_delete_button object %} |
| 56 | + {% endif %} |
| 57 | + {% endblock %} |
62 | 58 | </div>
|
63 |
| -</div> |
64 |
| -{% endblock %} |
| 59 | + |
| 60 | + {# Custom links #} |
| 61 | + <div class="d-flex justify-content-end"> |
| 62 | + <div class="btn-list"> |
| 63 | + {% block custom-links %} |
| 64 | + {% custom_links object %} |
| 65 | + {% endblock custom-links %} |
| 66 | + </div> |
| 67 | + </div> |
| 68 | +{% endblock controls %} |
65 | 69 |
|
66 | 70 | {% block tabs %}
|
67 | 71 | <ul class="nav nav-tabs" role="presentation">
|
|
0 commit comments