menus

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const Tag feature.Tag = "fs-editor-menus"

Variables

View Source
var (
	DefaultEditorType = "menu"
	DefaultEditorKey  = "menus"
)

Functions

This section is empty.

Types

type CFeature

type CFeature struct {
	fs_editor.CEditorFeature[MakeFeature]
}

func (*CFeature) Build

func (f *CFeature) Build(b feature.Buildable) (err error)

func (*CFeature) EditorMenu

func (f *CFeature) EditorMenu(r *http.Request) (m menu.Menu)

func (*CFeature) GetAllMenus

func (f *CFeature) GetAllMenus() (allMenus map[language.Tag]map[string]menu.Menu)

func (*CFeature) GetTranslatedLocales

func (f *CFeature) GetTranslatedLocales(info *editor.File) (txs map[language.Tag]string)

func (*CFeature) GetUntranslatedLocales

func (f *CFeature) GetUntranslatedLocales(info *editor.File) (locales []language.Tag)

func (*CFeature) Init

func (f *CFeature) Init(this interface{})

func (*CFeature) Make

func (f *CFeature) Make() (feat Feature)

func (*CFeature) OpChangeHandler

func (f *CFeature) OpChangeHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *editor.File, eid string) (redirect string)

func (*CFeature) OpChangeValidate

func (f *CFeature) OpChangeValidate(r *http.Request, pg feature.Page, ctx, form context.Context, info *editor.File, eid string) (err error)

func (*CFeature) OpFileCommitHandler

func (f *CFeature) OpFileCommitHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *editor.File, eid string) (redirect string)

func (*CFeature) OpFileCommitValidate

func (f *CFeature) OpFileCommitValidate(r *http.Request, pg feature.Page, ctx, form context.Context, info *editor.File, eid string) (err error)

func (*CFeature) OpFilePublishHandler

func (f *CFeature) OpFilePublishHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *editor.File, eid string) (redirect string)

func (*CFeature) OpFilePublishValidate

func (f *CFeature) OpFilePublishValidate(r *http.Request, pg feature.Page, ctx, form context.Context, info *editor.File, eid string) (err error)

func (*CFeature) OpMenuCreateHandler

func (f *CFeature) OpMenuCreateHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *editor.File, eid string) (redirect string)

func (*CFeature) OpMenuCreateValidate

func (f *CFeature) OpMenuCreateValidate(r *http.Request, pg feature.Page, ctx, form context.Context, info *editor.File, eid string) (err error)

func (*CFeature) ParseCreateMenuForm

func (f *CFeature) ParseCreateMenuForm(r *http.Request, pg feature.Page, ctx, form context.Context, info *editor.File, eid string, redirect *string) (dstUri string, dstInfo *editor.File, dstFS feature.FileSystemFeature, dstMP *feature.CMountPoint, dstExists bool, stop bool)

func (*CFeature) ParseDraftToMenu

func (f *CFeature) ParseDraftToMenu(parsed menu.EditMenu, info *editor.File, r *http.Request) (cleaned menu.Menu, redirect string)

func (*CFeature) ParseFormToDraft

func (f *CFeature) ParseFormToDraft(list []interface{}, info *editor.File, r *http.Request) (parsed menu.EditMenu, redirect string)

func (*CFeature) RenderFileEditor

func (f *CFeature) RenderFileEditor(w http.ResponseWriter, r *http.Request)

func (*CFeature) RenderFilePreview

func (f *CFeature) RenderFilePreview(w http.ResponseWriter, r *http.Request)

func (*CFeature) ServePreviewEditPage

func (f *CFeature) ServePreviewEditPage(pg feature.Page, ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*CFeature) SetupEditor

func (f *CFeature) SetupEditor(es feature.EditorSite)

func (*CFeature) SiteFeatureMenu

func (f *CFeature) SiteFeatureMenu(r *http.Request) (m menu.Menu)

func (*CFeature) Startup

func (f *CFeature) Startup(ctx *cli.Context) (err error)

func (*CFeature) UpdateFileInfo

func (f *CFeature) UpdateFileInfo(info *editor.File, r *http.Request)

func (*CFeature) UpdateFileInfoForEditing

func (f *CFeature) UpdateFileInfoForEditing(info *editor.File, r *http.Request)

func (*CFeature) UpdatePathInfo

func (f *CFeature) UpdatePathInfo(info *editor.File, r *http.Request)

type Feature

type Feature interface {
	feature.EditorFeature
}

type MakeFeature

type MakeFeature interface {
	feature.EditorMakeFeature[MakeFeature]

	Make() Feature
}

func New

func New() MakeFeature

func NewTagged

func NewTagged(tag feature.Tag) MakeFeature

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL