Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions django/contrib/admin/static/admin/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -808,18 +808,25 @@ a.deletelink:focus, a.deletelink:hover {
text-decoration: none;
}

/* TITLES */

.titles-and-tools {
display: flex;
}

.titles {
flex-grow: 1;
}

/* OBJECT TOOLS */

.object-tools {
padding: 0;
overflow: hidden;
text-align: right;
margin: 0 0 15px;
margin: 0;
}

.object-tools li {
display: inline-block;
height: auto;
}

.object-tools li + li {
Expand Down
10 changes: 7 additions & 3 deletions django/contrib/admin/static/admin/css/responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,15 @@ input[type="submit"], button {
margin-top: 30px;
}

.object-tools {
text-align: left;
/* Forms */

.titles-and-tools {
flex-direction: column;
}

/* Forms */
.object-tools {
margin-bottom: 10px;
}

.form-row {
padding: 15px 0;
Expand Down
4 changes: 0 additions & 4 deletions django/contrib/admin/static/admin/css/responsive_rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
margin-right: 0;
}

[dir="rtl"] .object-tools {
text-align: right;
}

[dir="rtl"] .aligned .vCheckboxLabel {
padding: 1px 5px 0 0;
}
Expand Down
4 changes: 0 additions & 4 deletions django/contrib/admin/static/admin/css/rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ th {
background-position: 100% 1px;
}

.object-tools {
text-align: left;
}

.object-tools li + li {
margin-right: 15px;
margin-left: 0;
Expand Down
12 changes: 8 additions & 4 deletions django/contrib/admin/templates/admin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,15 @@
{% endblock messages %}
<!-- Content -->
<div id="content" class="{% block coltype %}colM{% endblock %}">
{% block pretitle %}{% endblock %}
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
{% block content_subtitle %}{% if subtitle %}<h2>{{ subtitle }}</h2>{% endif %}{% endblock %}
{% block content %}
<div class="titles-and-tools">
<div class="titles">
{% block pretitle %}{% endblock %}
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
{% block content_subtitle %}{% if subtitle %}<h2>{{ subtitle }}</h2>{% endif %}{% endblock %}
</div>
{% block object-tools %}{% endblock %}
</div>
{% block content %}
{{ content }}
{% endblock %}
{% block sidebar %}{% endblock %}
Expand Down
3 changes: 2 additions & 1 deletion django/contrib/admin/templates/admin/change_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
{% endblock %}
{% endif %}

{% block content %}<div id="content-main">
{% block object-tools %}
{% if change and not is_popup %}
<ul class="object-tools">
Expand All @@ -34,6 +33,8 @@
</ul>
{% endif %}
{% endblock %}

{% block content %}<div id="content-main">
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}{% if form_url %}action="{{ form_url }}" {% endif %}method="post" id="{{ opts.model_name }}_form" novalidate>{% csrf_token %}{% block form_top %}{% endblock %}
<div>
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %}
Expand Down
15 changes: 8 additions & 7 deletions django/contrib/admin/templates/admin/change_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@

{% block coltype %}{% endblock %}

{% block object-tools %}
<ul class="object-tools">
{% block object-tools-items %}
{% change_list_object_tools %}
{% endblock %}
</ul>
{% endblock %}

{% block content %}
<div id="content-main">
{% block object-tools %}
<ul class="object-tools">
{% block object-tools-items %}
{% change_list_object_tools %}
{% endblock %}
</ul>
{% endblock %}
{% if cl.formset and cl.formset.errors %}
<p class="errornote">
{% blocktranslate count counter=cl.formset.total_error_count %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
Expand Down
Binary file modified docs/intro/_images/admin04t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/intro/_images/admin05t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/intro/_images/admin07t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/intro/_images/admin08t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/intro/_images/admin12t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/intro/_images/admin13t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/ref/contrib/admin/_images/list_filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/releases/6.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ backends.

* The ``wide`` class is removed, as it was made obsolete by the new layout.

* The ``object-tools`` block is hoisted out of the ``content`` block in forms.

:mod:`django.contrib.gis`
-------------------------

Expand Down