Documentation ¶
Index ¶
- Constants
- Variables
- type Builder
- func (b *Builder) AddContainer(ctx *web.EventContext) (r web.EventResponse, err error)
- func (b *Builder) AddContainerDialog(ctx *web.EventContext) (r web.EventResponse, err error)
- func (b *Builder) AddContainerToPage(pageID int, pageVersion, locale, containerName string) (modelID uint, err error)
- func (b *Builder) AddSharedContainerToPage(pageID int, pageVersion, locale, containerName string, modelID uint) (err error)
- func (b *Builder) ConfigCategory(pb *presets.Builder, db *gorm.DB) (pm *presets.ModelBuilder)
- func (b *Builder) ConfigDemoContainer(pb *presets.Builder, db *gorm.DB) (pm *presets.ModelBuilder)
- func (b *Builder) ConfigSharedContainer(pb *presets.Builder, db *gorm.DB) (pm *presets.ModelBuilder)
- func (b *Builder) ConfigTemplate(pb *presets.Builder, db *gorm.DB) (pm *presets.ModelBuilder)
- func (b *Builder) Configure(pb *presets.Builder, db *gorm.DB, l10nB *l10n.Builder, ...) (pm *presets.ModelBuilder)
- func (b *Builder) ContainerByName(name string) (r *ContainerBuilder)
- func (b *Builder) DeleteContainer(ctx *web.EventContext) (r web.EventResponse, err error)
- func (b *Builder) DeleteContainerConfirmation(ctx *web.EventContext) (r web.EventResponse, err error)
- func (b *Builder) Editor(ctx *web.EventContext) (r web.PageResponse, err error)
- func (b *Builder) GetPresetsBuilder() (r *presets.Builder)
- func (b *Builder) Images(v http.Handler, imagesPrefix string) (r *Builder)
- func (b *Builder) MarkAsSharedContainer(ctx *web.EventContext) (r web.EventResponse, err error)
- func (b *Builder) MoveContainer(ctx *web.EventContext) (r web.EventResponse, err error)
- func (b *Builder) PageLayout(v PageLayoutFunc) (r *Builder)
- func (b *Builder) PageStyle(v h.HTMLComponent) (r *Builder)
- func (b *Builder) Prefix(v string) (r *Builder)
- func (b *Builder) Preview(ctx *web.EventContext) (r web.PageResponse, err error)
- func (b *Builder) RegisterContainer(name string) (r *ContainerBuilder)
- func (b *Builder) RenameContainer(ctx *web.EventContext) (r web.EventResponse, err error)
- func (b *Builder) RenameContainerDialog(ctx *web.EventContext) (r web.EventResponse, err error)
- func (b *Builder) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (b *Builder) ToggleContainerVisibility(ctx *web.EventContext) (r web.EventResponse, err error)
- type Category
- type Container
- type ContainerBuilder
- func (b *ContainerBuilder) Cover(v string) *ContainerBuilder
- func (b *ContainerBuilder) Editing(vs ...interface{}) *presets.EditingBuilder
- func (b *ContainerBuilder) GetModelBuilder() *presets.ModelBuilder
- func (b *ContainerBuilder) Model(m interface{}) *ContainerBuilder
- func (b *ContainerBuilder) ModelTypeName() string
- func (b *ContainerBuilder) NewModel() interface{}
- func (b *ContainerBuilder) RenderFunc(v RenderFunc) *ContainerBuilder
- func (b *ContainerBuilder) URIName(uri string) *ContainerBuilder
- type ContainerSorter
- type ContainerSorterItem
- type DemoContainer
- type Messages
- type Page
- func (p *Page) GetPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
- func (p *Page) GetUnPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
- func (p *Page) L10nON()
- func (p *Page) PermissionRN() []string
- func (p *Page) PrimaryColumnValuesBySlug(slug string) map[string]string
- func (p *Page) PrimarySlug() string
- func (*Page) TableName() string
- type PageLayoutFunc
- type PageLayoutInput
- type RenderFunc
- type RenderInput
- type Template
Constants ¶
View Source
const ( AddContainerDialogEvent = "page_builder_AddContainerDialogEvent" AddContainerEvent = "page_builder_AddContainerEvent" DeleteContainerConfirmationEvent = "page_builder_DeleteContainerConfirmationEvent" DeleteContainerEvent = "page_builder_DeleteContainerEvent" MoveContainerEvent = "page_builder_MoveContainerEvent" ToggleContainerVisibilityEvent = "page_builder_ToggleContainerVisibilityEvent" RenameCotainerDialogEvent = "page_builder_RenameContainerDialogEvent" RenameContainerEvent = "page_builder_RenameContainerEvent" )
View Source
const FreeStyleKey = "FreeStyle"
View Source
const I18nPageBuilderKey i18n.ModuleKey = "I18nPageBuilderKey"
Variables ¶
View Source
var Messages_en_US = &Messages{
Category: "Category",
EditPageContent: "Edit Page Content",
Preview: "Preview",
Containers: "Containers",
AddContainers: "Add Containers",
New: "New",
Shared: "Shared",
Select: "Select",
SelectedTemplateLabel: "Template",
CreateFromTemplate: "Create From Template",
RelatedOnlinePages: "Related Online Pages",
RepublishAllRelatedOnlinePages: "Republish All",
Unnamed: "Unnamed",
NotDescribed: "Not Described",
Blank: "Blank",
NewPage: "New Page",
}
View Source
var Messages_ja_JP = &Messages{
Category: "カテゴリー",
EditPageContent: "ページコンテナを編集する",
Preview: "プレビュー",
Containers: "コンテナ",
AddContainers: "コンテナを追加する",
New: "新規",
Shared: "共有",
Select: "選択する",
SelectedTemplateLabel: "テンプレート",
CreateFromTemplate: "テンプレートから新規作成する",
RelatedOnlinePages: "関連オンラインページ",
RepublishAllRelatedOnlinePages: "すべて再公開",
Unnamed: "名前なし",
NotDescribed: "記述されていません",
Blank: "空白",
NewPage: "新しいページ",
}
View Source
var Messages_zh_CN = &Messages{
Category: "目录",
EditPageContent: "编辑页面内容",
Preview: "预览",
Containers: "组件",
AddContainers: "增加组件",
New: "新增",
Shared: "公用的",
Select: "选择",
SelectedTemplateLabel: "模板",
CreateFromTemplate: "从模板中创建",
RelatedOnlinePages: "相关在线页面",
RepublishAllRelatedOnlinePages: "重新发布所有页面",
Unnamed: "未命名",
NotDescribed: "未描述",
Blank: "空白",
NewPage: "新页面",
}
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) AddContainer ¶
func (b *Builder) AddContainer(ctx *web.EventContext) (r web.EventResponse, err error)
func (*Builder) AddContainerDialog ¶
func (b *Builder) AddContainerDialog(ctx *web.EventContext) (r web.EventResponse, err error)
func (*Builder) AddContainerToPage ¶
func (*Builder) AddSharedContainerToPage ¶
func (*Builder) ConfigCategory ¶
func (*Builder) ConfigDemoContainer ¶
func (*Builder) ConfigSharedContainer ¶
func (*Builder) ConfigTemplate ¶
func (*Builder) ContainerByName ¶
func (b *Builder) ContainerByName(name string) (r *ContainerBuilder)
func (*Builder) DeleteContainer ¶
func (b *Builder) DeleteContainer(ctx *web.EventContext) (r web.EventResponse, err error)
func (*Builder) DeleteContainerConfirmation ¶
func (b *Builder) DeleteContainerConfirmation(ctx *web.EventContext) (r web.EventResponse, err error)
func (*Builder) Editor ¶
func (b *Builder) Editor(ctx *web.EventContext) (r web.PageResponse, err error)
func (*Builder) GetPresetsBuilder ¶
func (*Builder) MarkAsSharedContainer ¶
func (b *Builder) MarkAsSharedContainer(ctx *web.EventContext) (r web.EventResponse, err error)
func (*Builder) MoveContainer ¶
func (b *Builder) MoveContainer(ctx *web.EventContext) (r web.EventResponse, err error)
func (*Builder) PageLayout ¶
func (b *Builder) PageLayout(v PageLayoutFunc) (r *Builder)
func (*Builder) Preview ¶
func (b *Builder) Preview(ctx *web.EventContext) (r web.PageResponse, err error)
func (*Builder) RegisterContainer ¶
func (b *Builder) RegisterContainer(name string) (r *ContainerBuilder)
func (*Builder) RenameContainer ¶
func (b *Builder) RenameContainer(ctx *web.EventContext) (r web.EventResponse, err error)
func (*Builder) RenameContainerDialog ¶
func (b *Builder) RenameContainerDialog(ctx *web.EventContext) (r web.EventResponse, err error)
func (*Builder) ToggleContainerVisibility ¶
func (b *Builder) ToggleContainerVisibility(ctx *web.EventContext) (r web.EventResponse, err error)
type Category ¶
type Container ¶
type Container struct { gorm.Model PageID uint PageVersion string ModelName string ModelID uint DisplayOrder float64 Hidden bool DisplayName string l10n.Locale }
func (*Container) PrimaryColumnValuesBySlug ¶
func (*Container) PrimarySlug ¶
type ContainerBuilder ¶
type ContainerBuilder struct {
// contains filtered or unexported fields
}
func (*ContainerBuilder) Cover ¶
func (b *ContainerBuilder) Cover(v string) *ContainerBuilder
func (*ContainerBuilder) Editing ¶
func (b *ContainerBuilder) Editing(vs ...interface{}) *presets.EditingBuilder
func (*ContainerBuilder) GetModelBuilder ¶
func (b *ContainerBuilder) GetModelBuilder() *presets.ModelBuilder
func (*ContainerBuilder) Model ¶
func (b *ContainerBuilder) Model(m interface{}) *ContainerBuilder
func (*ContainerBuilder) ModelTypeName ¶
func (b *ContainerBuilder) ModelTypeName() string
func (*ContainerBuilder) NewModel ¶
func (b *ContainerBuilder) NewModel() interface{}
func (*ContainerBuilder) RenderFunc ¶
func (b *ContainerBuilder) RenderFunc(v RenderFunc) *ContainerBuilder
func (*ContainerBuilder) URIName ¶
func (b *ContainerBuilder) URIName(uri string) *ContainerBuilder
type ContainerSorter ¶
type ContainerSorter struct {
Items []ContainerSorterItem `json:"items"`
}
type ContainerSorterItem ¶
type ContainerSorterItem struct { Index int `json:"index"` Label string `json:"label"` ModelName string `json:"model_name"` ModelID string `json:"model_id"` DisplayName string `json:"display_name"` ContainerID string `json:"container_id"` URL string `json:"url"` VisibilityIcon string `json:"visibility_icon"` ParamID string `json:"param_id"` }
type DemoContainer ¶
func (*DemoContainer) PrimaryColumnValuesBySlug ¶
func (this *DemoContainer) PrimaryColumnValuesBySlug(slug string) map[string]string
func (*DemoContainer) PrimarySlug ¶
func (this *DemoContainer) PrimarySlug() string
func (*DemoContainer) TableName ¶
func (*DemoContainer) TableName() string
type Messages ¶
type Messages struct { Category string EditPageContent string Preview string Containers string AddContainers string New string Select string SelectedTemplateLabel string CreateFromTemplate string RelatedOnlinePages string RepublishAllRelatedOnlinePages string Unnamed string NotDescribed string Blank string NewPage string }
type Page ¶
type Page struct { gorm.Model Title string Slug string CategoryID uint publish.Status publish.Schedule publish.Version l10n.Locale }
func (*Page) GetPublishActions ¶
func (p *Page) GetPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
func (*Page) GetUnPublishActions ¶
func (p *Page) GetUnPublishActions(db *gorm.DB, ctx context.Context, storage oss.StorageInterface) (objs []*publish.PublishAction, err error)
func (*Page) PermissionRN ¶
func (*Page) PrimaryColumnValuesBySlug ¶
func (*Page) PrimarySlug ¶
type PageLayoutFunc ¶
type PageLayoutFunc func(body h.HTMLComponent, input *PageLayoutInput, ctx *web.EventContext) h.HTMLComponent
type PageLayoutInput ¶
type RenderFunc ¶
type RenderFunc func(obj interface{}, input *RenderInput, ctx *web.EventContext) h.HTMLComponent
type RenderInput ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.