From f5cd5b16fe444c4f9ea40d060218a9f1396ee380 Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Wed, 7 Oct 2026 18:02:36 +0200 Subject: [PATCH] fix(admin): title the posts list Posts, not New post The admin names a list page, its heading and breadcrumb after the first side-menu item of its controller. The new_post item pointed at the posts list too, came first and won. A side item cannot open the create form, so drop it; the list toolbar's Create button stays. --- admin_navigation.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/admin_navigation.go b/admin_navigation.go index 5805ea8..04254c0 100644 --- a/admin_navigation.go +++ b/admin_navigation.go @@ -6,7 +6,9 @@ import ( ) // Navigation is the plugin's Winter registerNavigation() entry: the main -// item journal (order 300) with its side menu. +// item journal (order 300) with its side menu. Winter's new_post side item is +// left out: a side item can only point at a controller's list, and the admin +// names each list page after the first side item of its controller. func (*Plugin) Navigation() []pact.NavigationItem { return []pact.NavigationItem{ { @@ -17,13 +19,6 @@ func (*Plugin) Navigation() []pact.NavigationItem { Order: 300, Controller: controllers.PostsControllerID, SideMenu: []pact.NavigationItem{ - { - Code: "new_post", - Label: "golem15.journal::lang.posts.new_post", - Icon: "plus", - Permissions: []string{controllers.PermissionAccessPosts}, - Controller: controllers.PostsControllerID, - }, { Code: "posts", Label: "golem15.journal::lang.journal.posts",