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:
2026-10-12 17:24:52 +02:00
commit 1c5491232a
22 changed files with 1370 additions and 0 deletions

28
admin_navigation.go Normal file
View 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)