kopia lustrzana https://github.com/wagtail/wagtail
Add WAGTAIL_SLIM_SIDEBAR = False setting to switch back to legacy sidebar
rodzic
18c4d7c813
commit
2e6378aa19
docs/reference
wagtail/admin
templatetags
tests
|
@ -217,6 +217,15 @@ If a user has not uploaded a profile picture, Wagtail will look for an avatar li
|
|||
|
||||
Changes whether the Submit for Moderation button is displayed in the action menu.
|
||||
|
||||
``WAGTAIL_SLIM_SIDEBAR``
|
||||
------------------------
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
WAGTAIL_SLIM_SIDEBAR = False
|
||||
|
||||
Disables Wagtail’s slim sidebar to use the legacy sidebar instead.
|
||||
|
||||
Comments
|
||||
========
|
||||
|
||||
|
|
|
@ -769,7 +769,7 @@ def locales():
|
|||
|
||||
@register.simple_tag()
|
||||
def slim_sidebar_enabled():
|
||||
return 'legacy-sidebar' not in getattr(settings, 'WAGTAIL_EXPERIMENTAL_FEATURES', [])
|
||||
return getattr(settings, 'WAGTAIL_SLIM_SIDEBAR', True)
|
||||
|
||||
|
||||
@register.simple_tag(takes_context=True)
|
||||
|
|
|
@ -32,7 +32,7 @@ class TestMenuRendering(TestCase, WagtailTestUtils):
|
|||
response = self.client.get(reverse('wagtailadmin_home'))
|
||||
self.assertContains(response, 'sidebar-collapsed')
|
||||
|
||||
@override_settings(WAGTAIL_EXPERIMENTAL_FEATURES={'legacy-sidebar'})
|
||||
@override_settings(WAGTAIL_SLIM_SIDEBAR=False)
|
||||
def test_not_collapsed_with_legacy(self):
|
||||
'''Sidebar should only remember its collapsed state with the slim implementation.'''
|
||||
# Sidebar should not be collapsed because the feature flag is not enabled
|
||||
|
|
Ładowanie…
Reference in New Issue