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.
This commit is contained in:
Jakub Zych
2026-10-07 18:02:36 +02:00
parent 9327e1e4f3
commit f5cd5b16fe

View File

@@ -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",