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
This commit is contained in:
28
admin_navigation.go
Normal file
28
admin_navigation.go
Normal file
@@ -0,0 +1,28 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user