Skip to content

Commit

Permalink
Update search link
Browse files Browse the repository at this point in the history
  • Loading branch information
albinazs committed Sep 18, 2024
1 parent 4aad271 commit 004bb61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion wagtail/admin/templates/wagtailadmin/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1 class="w-h1 w-mt-0">{{ header_title }}</h1>

<form
class="w-mb-12"
action="{% url "wagtailadmin_pages:search" %}"
action="{% url 'wagtailadmin_explore' root_page.pk %}"
method="get"
novalidate
role="search"
Expand Down
4 changes: 4 additions & 0 deletions wagtail/admin/views/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ def get_context_data(self, parent_context):
class HomeView(WagtailAdminTemplateMixin, TemplateView):
template_name = "wagtailadmin/home.html"
page_title = _("Dashboard")
permission_policy = page_permission_policy

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
Expand All @@ -296,6 +297,9 @@ def get_context_data(self, **kwargs):
context["upgrade_notification"] = UpgradeNotificationPanel()
context["site_summary"] = SiteSummaryPanel(self.request)
context["search_form"] = SearchForm(placeholder=_("Search all pages..."))
context["root_page"] = self.permission_policy.explorable_root_instance(
self.request.user
)
context["user"] = self.request.user

return {**context, **site_details}
Expand Down

0 comments on commit 004bb61

Please sign in to comment.