From 22a35b70d2cf1fbbfab643e31d2d38d7602050ad Mon Sep 17 00:00:00 2001 From: Stefan Hammer Date: Thu, 26 Aug 2021 15:00:51 +0200 Subject: [PATCH] Fix home icon in breadcrumbs for limited-permission users, fixes #7348 - The html has just been synced with the html for unlimited users --- CHANGELOG.txt | 1 + CONTRIBUTORS.rst | 1 + docs/releases/2.15.rst | 1 + .../admin/templates/wagtailadmin/shared/breadcrumb.html | 2 +- wagtail/admin/tests/pages/test_explorer_view.py | 8 ++++---- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0d4d4252d4..80100f4b63 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -24,6 +24,7 @@ Changelog * Fix: Admin fields and Icon visibility issues in Windows high contrast mode (Dmitrii Faiazov) * Fix: `blocks.MultipleChoiceBlock`, `forms.CheckboxSelectMultiple` and `ArrayField` checkboxes will now stack instead of display inline to align with all other checkboxes fields (Seb Brown) * Fix: Screen readers can now access login screen field labels (Amy Chan) + * Fix: Admin breadcrumbs home icon now shows for users with access to a subtree only (Stefan Hammer) 2.14.1 (12.08.2021) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index a66d3f03f1..c297ad250c 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -529,6 +529,7 @@ Contributors * Jannis Vajen * Dmitrii Faiazov * Amy Chan +* Stefan Hammer Translators =========== diff --git a/docs/releases/2.15.rst b/docs/releases/2.15.rst index c06ff58775..38ef416a65 100644 --- a/docs/releases/2.15.rst +++ b/docs/releases/2.15.rst @@ -39,6 +39,7 @@ Bug fixes * Admin fields and Icon visibility issues in Windows high contrast mode (Dmitrii Faiazov) * ``blocks.MultipleChoiceBlock``, ``forms.CheckboxSelectMultiple`` and ``ArrayField`` checkboxes will now stack instead of display inline to align with all other checkboxes fields (Seb Brown) * Screen readers can now access login screen field labels (Amy Chan) + * Admin breadcrumbs home icon now shows for users with access to a subtree only (Stefan Hammer) Upgrade considerations ====================== diff --git a/wagtail/admin/templates/wagtailadmin/shared/breadcrumb.html b/wagtail/admin/templates/wagtailadmin/shared/breadcrumb.html index bd26d4efe9..2966c78d98 100644 --- a/wagtail/admin/templates/wagtailadmin/shared/breadcrumb.html +++ b/wagtail/admin/templates/wagtailadmin/shared/breadcrumb.html @@ -10,7 +10,7 @@ {% elif forloop.first %} {# For limited-permission users whose breadcrumb starts further down from the root, the first item displays as a 'home' icon in place of the title #} {% trans 'Home' as home %} -
  • {% icon name="site" class_name="home_icon" title=home %}{% icon name="arrow-right" class_name="arrow_right_icon"%}
  • +
  • {% icon name="site" class_name="home_icon" title=home %}{% icon name="arrow-right" class_name="arrow_right_icon"%}
  • {% elif forloop.last %}
  • {{ page.get_admin_display_title }} {% if trailing_arrow %} diff --git a/wagtail/admin/tests/pages/test_explorer_view.py b/wagtail/admin/tests/pages/test_explorer_view.py index 3f0c8d2867..420965280f 100644 --- a/wagtail/admin/tests/pages/test_explorer_view.py +++ b/wagtail/admin/tests/pages/test_explorer_view.py @@ -559,15 +559,15 @@ class TestExplorablePageVisibility(TestCase, WagtailTestUtils): # since it's his Closest Common Ancestor. expected = """
  • - + Home + -
  • """ self.assertContains(response, expected, html=True)