0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Remove unused in_explorer parameter in StatusSidePanel

It's never used directly in the template. The value that is used in the
side_panels.html template does not come from this parameter, because
that is a wrapper template and not the status panel itself. Instead, the
value is passed when the template is included, i.e. {% include ...
in_explorer=True %}.
This commit is contained in:
Sage Abdullah 2023-09-06 15:01:22 +01:00
parent 2a9709106c
commit 9c0e3d61fc
No known key found for this signature in database
GPG Key ID: EB1A33CC51CC0217
5 changed files with 1 additions and 10 deletions

View File

@ -68,18 +68,14 @@ class BaseStatusSidePanel(BaseSidePanel):
show_schedule_publishing_toggle=None,
live_object=None,
scheduled_object=None,
in_explorer=False,
locale=None,
translations=None,
**kwargs,
):
super().__init__(*args, **kwargs)
self.show_schedule_publishing_toggle = (
show_schedule_publishing_toggle and not in_explorer
)
self.show_schedule_publishing_toggle = show_schedule_publishing_toggle
self.live_object = live_object
self.scheduled_object = scheduled_object
self.in_explorer = in_explorer
self.locale = locale
self.translations = translations
self.locking_enabled = isinstance(self.object, LockableMixin)
@ -254,7 +250,6 @@ class PageStatusSidePanel(BaseStatusSidePanel):
if page.id:
context.update(
{
"in_explorer": self.in_explorer,
"live_object": self.live_object,
"scheduled_object": self.scheduled_object,
"history_url": reverse(

View File

@ -348,7 +348,6 @@ class CreateView(TemplateResponseMixin, ContextMixin, HookResponseMixin, View):
self.page,
self.request,
show_schedule_publishing_toggle=self.form.show_schedule_publishing_toggle,
in_explorer=False,
locale=self.locale,
translations=self.translations,
),

View File

@ -864,7 +864,6 @@ class EditView(TemplateResponseMixin, ContextMixin, HookResponseMixin, View):
show_schedule_publishing_toggle=self.form.show_schedule_publishing_toggle,
live_object=self.real_page_record,
scheduled_object=self.scheduled_page,
in_explorer=False,
locale=self.locale,
translations=self.translations,
),

View File

@ -200,7 +200,6 @@ class IndexView(PermissionCheckedMixin, BaseListingView):
show_schedule_publishing_toggle=False,
live_object=self.parent_page,
scheduled_object=self.scheduled_page,
in_explorer=True,
locale=self.locale,
translations=self.translations,
),

View File

@ -86,7 +86,6 @@ def revisions_revert(request, page_id, revision_id):
show_schedule_publishing_toggle=form.show_schedule_publishing_toggle,
live_object=page,
scheduled_object=scheduled_page,
in_explorer=False,
locale=locale,
translations=translations,
),