YAML-driven Posts screen stores translatable markdown and regenerates content_html in the plugin. Publish writes without access_publish are refused; list and form queries stay on the principal without access_other_posts. Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
1.2 KiB
Go
40 lines
1.2 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. Categories and tags side
|
|
// items are added when those controllers register (Task 2): cabana boot
|
|
// refuses a NavigationItem.Controller that is not an AdminController.
|
|
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,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|