Files
sm-seo-plugin/admin_navigation.go
Jakub Zych 163b0aaf98 feat: redirects screen
- golem15.seo.redirects list and form (UI-SPEC C8): chain rows marked,
  status, match, origin and chain filters, the navigation item lands here
- a field-less extension on the controller refuses a loop with
  redirects.loop on target, answers the chain notice and records history
- the status dropdown posts text, read through RedirectStatus
2026-10-27 11:30:56 +01:00

46 lines
1.3 KiB
Go

package seo
import (
"git.golem15.com/golem15/sm-seo-plugin/controllers"
"git.golem15.com/golem15/summercms/modules/pact"
)
// Navigation registers the SEO main item (UI-SPEC C2) behind
// golem15.seo.manage. It lands on Redirects; each side-menu entry is added
// when its controller exists, in the C2 order.
func (*Plugin) Navigation() []pact.NavigationItem {
return []pact.NavigationItem{{
Code: "seo",
Label: "golem15.seo::lang.nav.seo",
Icon: "search",
Permissions: []string{controllers.PermissionManage},
Order: 600,
Controller: controllers.RedirectsControllerID,
SideMenu: []pact.NavigationItem{
{
Code: "redirects",
Label: "golem15.seo::lang.nav.redirects",
Icon: "arrow-right",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.RedirectsControllerID,
},
{
Code: "rules",
Label: "golem15.seo::lang.nav.rules",
Icon: "link",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.RulesControllerID,
},
{
Code: "history",
Label: "golem15.seo::lang.nav.history",
Icon: "clock",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.HistoryControllerID,
},
},
}}
}
var _ pact.HasNavigation = (*Plugin)(nil)