diff options
| author | antoliny0919 <antoliny0919@gmail.com> | 2025-07-20 22:12:15 +0900 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-07-30 17:32:39 +0200 |
| commit | 6ea331907996a51842da55c1f8d65eea7b367c7d (patch) | |
| tree | 3deaa0a318b80298438a366dd1808d4ef5be61ba /django/contrib/admin/templates | |
| parent | 792ca148a2d6da6cf0778f6a866c899208ab94f9 (diff) | |
Fixed #36511 -- Ensured filters came before table in keyboard navigation in admin changelist.
Diffstat (limited to 'django/contrib/admin/templates')
| -rw-r--r-- | django/contrib/admin/templates/admin/change_list.html | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/django/contrib/admin/templates/admin/change_list.html b/django/contrib/admin/templates/admin/change_list.html index 3b3ea408d3..b12f8ec583 100644 --- a/django/contrib/admin/templates/admin/change_list.html +++ b/django/contrib/admin/templates/admin/change_list.html @@ -56,29 +56,8 @@ {% endif %} <div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist"> <div class="changelist-form-container"> - {% block search %}{% search_form cl %}{% endblock %} - {% block date_hierarchy %}{% if cl.date_hierarchy %}{% date_hierarchy cl %}{% endif %}{% endblock %} - - <form id="changelist-form" method="post"{% if cl.formset and cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>{% csrf_token %} - {% if cl.formset %} - <div>{{ cl.formset.management_form }}</div> - {% endif %} - - {% block result_list %} - {% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %} - {% result_list cl %} - {% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %} - {% endblock %} - {% block pagination %} - <div class="changelist-footer"> - {% pagination cl %} - {% if cl.formset and cl.result_count %}<input type="submit" name="_save" class="default" value="{% translate 'Save' %}">{% endif %} - {% endblock %} - </div> - </form> - </div> - {% block filters %} - {% if cl.has_filters %} + {% block filters %} + {% if cl.has_filters %} <search id="changelist-filter" aria-labelledby="changelist-filter-header"> <h2 id="changelist-filter-header">{% translate 'Filter' %}</h2> {% if cl.is_facets_optional or cl.has_active_filters %}<div id="changelist-filter-extra-actions"> @@ -92,8 +71,31 @@ </div>{% endif %} {% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %} </search> - {% endif %} - {% endblock %} + {% endif %} + {% endblock %} + <div> + {% block search %}{% search_form cl %}{% endblock %} + {% block date_hierarchy %}{% if cl.date_hierarchy %}{% date_hierarchy cl %}{% endif %}{% endblock %} + + <form id="changelist-form" method="post"{% if cl.formset and cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>{% csrf_token %} + {% if cl.formset %} + <div>{{ cl.formset.management_form }}</div> + {% endif %} + + {% block result_list %} + {% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %} + {% result_list cl %} + {% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %} + {% endblock %} + {% block pagination %} + <div class="changelist-footer"> + {% pagination cl %} + {% if cl.formset and cl.result_count %}<input type="submit" name="_save" class="default" value="{% translate 'Save' %}">{% endif %} + {% endblock %} + </div> + </form> + </div> + </div> </div> </div> {% endblock %} |
