Register the remaining YAML admin screens and the settings singleton so a host can boot Posts, Categories, Tags, and Code journal. Posts update and delete refuse other authors without access_other_posts. Co-authored-by: Cursor <cursoragent@cursor.com>
52 lines
1.5 KiB
Go
52 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.
|
|
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: "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",
|
|
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: "tag",
|
|
Permissions: []string{controllers.PermissionAccessTags},
|
|
Controller: controllers.TagsControllerID,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|