feat(15-02): add Posts admin with mlmarkdown and FormatHTML
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>
This commit is contained in:
39
admin_navigation.go
Normal file
39
admin_navigation.go
Normal file
@@ -0,0 +1,39 @@
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user