Files
sm-faq-plugin/admin_navigation.go
Jakub Zych 1c5491232a feat(17-04): FAQ plugin tracer, admin FAQ with sanitized question repeater
- golem15.faq plugin (Requires golem15.translate), table golem15_faq_faqs with the PHP columns
- FAQ model with jsonable content and the translate Locale relation
- admin controller golem15.faq.faqs: name, slug, locale, active switch, richeditor description, question repeater
- navigation FAQ (order 500), permission golem15.faq.faqs, en and pl phrasebooks
- TestFaqAdminSmoke: answers stored sanitized with a notice under content.1.answer
2026-10-12 17:24:52 +02:00

29 lines
867 B
Go

package faq
import (
"git.golem15.com/golem15/sm-faq-plugin/controllers"
"git.golem15.com/golem15/summercms/modules/pact"
)
// Navigation is the plugin's Winter registerNavigation() entry: the main item
// faq (order 500) with its side menu faqs.
func (*Plugin) Navigation() []pact.NavigationItem {
return []pact.NavigationItem{{
Code: "faq",
Label: "golem15.faq::lang.plugin.name",
Icon: "circle-question-mark",
Permissions: []string{"golem15.faq.*"},
Order: 500,
Controller: controllers.FAQsControllerID,
SideMenu: []pact.NavigationItem{{
Code: "faqs",
Label: "golem15.faq::lang.models.faq.label_plural",
Icon: "circle-question-mark",
Permissions: []string{controllers.PermissionFAQs},
Controller: controllers.FAQsControllerID,
}},
}}
}
var _ pact.HasNavigation = (*Plugin)(nil)