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.
47 lines
1.5 KiB
Go
47 lines
1.5 KiB
Go
package journal
|
|
|
|
import (
|
|
"git.golem15.com/golem15/sm-journal-plugin/controllers"
|
|
"git.golem15.com/golem15/summercms/modules/pact"
|
|
)
|
|
|
|
// Navigation is the plugin's Winter registerNavigation() entry: the main
|
|
// 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{
|
|
{
|
|
Code: "journal",
|
|
Label: "golem15.journal::lang.journal.menu_label",
|
|
Icon: "pencil",
|
|
Permissions: []string{"golem15.journal.*"},
|
|
Order: 300,
|
|
Controller: controllers.PostsControllerID,
|
|
SideMenu: []pact.NavigationItem{
|
|
{
|
|
Code: "posts",
|
|
Label: "golem15.journal::lang.journal.posts",
|
|
Icon: "copy",
|
|
Permissions: []string{controllers.PermissionAccessPosts},
|
|
Controller: controllers.PostsControllerID,
|
|
},
|
|
{
|
|
Code: "categories",
|
|
Label: "golem15.journal::lang.journal.categories",
|
|
Icon: "list",
|
|
Permissions: []string{controllers.PermissionAccessCategories},
|
|
Controller: controllers.CategoriesControllerID,
|
|
},
|
|
{
|
|
Code: "tags",
|
|
Label: "golem15.journal::lang.journal.tags",
|
|
Icon: "tags",
|
|
Permissions: []string{controllers.PermissionAccessTags},
|
|
Controller: controllers.TagsControllerID,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|