Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultVersionBar(db *gorm.DB) presets.ObjectComponentFunc
- func DefaultVersionComponentFunc(b *presets.ModelBuilder, cfg ...VersionComponentConfig) presets.FieldComponentFunc
- func DraftCountComponentFunc(db *gorm.DB) presets.FieldComponentFunc
- func GetStatusLabelColor(status string, msgr *Messages) (label, color string)
- func IsVersion(obj interface{}) (IsVersion bool)
- func LiveComponentFunc(db *gorm.DB, b *LiveChipsBuilder) presets.FieldComponentFunc
- func LiveFieldComponentFunc(db *gorm.DB, b *LiveChipsBuilder) presets.FieldComponentFunc
- func LiveFieldComponentFuncBuilder(db *gorm.DB, ...) presets.FieldComponentFunc
- func RunJob(jobName string, interval time.Duration, timeout time.Duration, f func())
- func RunPublisher(db *gorm.DB, Storage storage.Storage, publisher *Builder)
- func ScheduleTimeString(t *time.Time) string
- func StatusListFunc(b *LiveChipsBuilder) presets.FieldComponentFunc
- func UploadOrDelete(objs []*PublishAction, Storage storage.Storage) (err error)
- func WithPublishCallback(b *presets.ModelBuilder, f ModelPublishCallback)
- func WithUnpublishCallback(b *presets.ModelBuilder, f ModelUnpublishCallback)
- type AfterPublishInterface
- type AfterUnPublishInterface
- type Builder
- func (b *Builder) Activity(v *activity.Builder) (r *Builder)
- func (b *Builder) AfterInstall(f func()) *Builder
- func (b *Builder) BulkAction(m *presets.ModelBuilder) *BulkAction
- func (b *Builder) ContextValueFuncs(vs ...ContextValueFunc) *Builder
- func (b *Builder) Install(pb *presets.Builder) error
- func (b *Builder) ModelInstall(pb *presets.Builder, m *presets.ModelBuilder) error
- func (b *Builder) Publish(mb *presets.ModelBuilder, record interface{}, ctx context.Context) (err error)
- func (b *Builder) UnPublish(mb *presets.ModelBuilder, record interface{}, ctx context.Context) (err error)
- func (b *Builder) WithContextValues(ctx context.Context) context.Context
- type BulkAction
- type ContextKey
- type ContextValueFunc
- type Executor
- type List
- type ListInterface
- type ListPublishBuilder
- func (b *ListPublishBuilder) GetOldItemsFunc(f func(record interface{}) (result []interface{}, err error)) *ListPublishBuilder
- func (b *ListPublishBuilder) NeedNextPageFunc(f func(totalNumberPerPage, currentPageNumber, totalNumberOfItems int) bool) *ListPublishBuilder
- func (b *ListPublishBuilder) PublishActionsFunc(...) *ListPublishBuilder
- func (b *ListPublishBuilder) Run(model interface{}) (err error)
- func (b *ListPublishBuilder) TotalNumberPerPage(number int) *ListPublishBuilder
- func (b *ListPublishBuilder) WithValue(key, val interface{}) *ListPublishBuilder
- type ListPublisher
- type LiveChipsBuilder
- func (b *LiveChipsBuilder) Auto(status string, toStatus string, msgr *Messages) h.HTMLComponent
- func (b *LiveChipsBuilder) Live(status string, isScheduled bool, msgr *Messages) *VChipBuilder
- func (b *LiveChipsBuilder) LiveIcons(status string, isScheduled bool, msgr *Messages) (comps h.HTMLComponents)
- func (b *LiveChipsBuilder) Lives(status string, toStatus string, msgr *Messages) h.HTMLComponent
- func (b *LiveChipsBuilder) LivesIcon(status string, toStatus string, msgr *Messages) h.HTMLComponents
- func (b *LiveChipsBuilder) Status(status string, msgr *Messages) *VChipBuilder
- type Messages
- func (msgr *Messages) ActivityHelp(activity string) string
- func (msgr *Messages) ActivityTitle(activity string) string
- func (msgr *Messages) BulkActionConfirmationText(action string) string
- func (msgr *Messages) BulkActionNoRecordsText(action string) string
- func (msgr *Messages) DeleteVersionConfirmationText(versionName string) string
- func (msgr *Messages) Status(status string) string
- type Model
- type ModelPublishCallback
- type ModelUnpublishCallback
- type OnePageItems
- type PublicUrlInterface
- type PublishAction
- type PublishExecutor
- func (p PublishExecutor) Accept(status string) (ok bool)
- func (p PublishExecutor) ActivityName() string
- func (p PublishExecutor) Do(mb *presets.ModelBuilder, publisher *Builder, actionName string, ...) (err error)
- func (p PublishExecutor) Execute(mb *presets.ModelBuilder, publisher *Builder, actionName string, ...) (obj any, err error)
- func (p PublishExecutor) Option(opt ...PublishOption) PublishExecutor
- func (p PublishExecutor) Title(msgr *Messages) string
- type PublishFlag
- type PublishInterface
- type PublishOption
- type PublishOptions
- type Schedule
- type ScheduleInterface
- type SchedulePublishBuilder
- type SchedulePublisher
- type Status
- type StatusInterface
- type UnPublishInterface
- type UnpublishExecutor
- func (UnpublishExecutor) Accept(status string) (ok bool)
- func (p UnpublishExecutor) ActivityName() string
- func (e UnpublishExecutor) Do(mb *presets.ModelBuilder, publisher *Builder, actionName string, ...) (err error)
- func (e UnpublishExecutor) Execute(mb *presets.ModelBuilder, publisher *Builder, actionName string, ...) (obj any, err error)
- func (p UnpublishExecutor) Title(msgr *Messages) string
- type Version
- type VersionComponentConfig
- type VersionInterface
Constants ¶
View Source
const ( ListingFieldDraftCount = "Draft Count" ListingFieldLive = "Live" VersionsPublishBar = "VersionsPublishBar" FieldOnlineUrl = "OnlineUrl" FieldStatus = "Status" SlugVersion = "version" )
View Source
const ( EventPublish = "publish_EventPublish" EventRepublish = "publish_EventRepublish" EventPublishOrRepublish = "publish_EventRepublishOrRepublish" EventUnpublish = "publish_EventUnpublish" EventDuplicateVersion = "publish_EventDuplicateVersion" ActivityPublish = "Publish" ActivityRepublish = "Republish" ActivityPublishOrRepublish = "PublishOrRepublish" ActivityUnPublish = "UnPublish" ParamScriptAfterPublish = "publish_param_script_after_publish" )
View Source
const ( StatusDraft = "draft" StatusOnline = "online" StatusOffline = "offline" )
@snippet_begin(PublishStatus)
View Source
const ( PortalSchedulePublishDialog = "publish_PortalSchedulePublishDialog" PortalPublishCustomDialog = "publish_PortalPublishCustomDialog" VarCurrentDisplayID = "vars.publish_VarCurrentDisplayID" )
View Source
const I18nPublishKey i18n.ModuleKey = "I18nPublishKey"
Variables ¶
View Source
var ( NonVersionPublishModels map[string]*Model VersionPublishModels map[string]*Model ListPublishModels map[string]*Model )
View Source
var ( Publish PublishExecutor PublishOrRepublish = Publish.Option(PublishWithFlag(FlagPublishOrRepublish)) RePublish = Publish.Option(PublishWithFlag(FlagPublishRepublish)) UnPublish UnpublishExecutor )
View Source
var DefaultMessages = Messages_en_US
View Source
var Messages_en_US = &Messages{
StatusDraft: "Draft",
StatusOnline: "Online",
StatusOffline: "Offline",
Publication: "Publication",
Publish: "Publish",
PublishHelp: "Publish only if status is 'draft' or 'offline'",
PublishOrRepublish: "Publish/Republish",
PublishOrRepublishHelp: "If status is 'draft' or 'offline', publish then, other else 'republish'",
Unpublish: "UnPublish",
UnpublishHelp: "Unpublish if status is 'online'",
Republish: "Republish",
RepublishHelp: "Republish if status is 'online'",
Areyousure: "Are you sure?",
ScheduledStartAt: "Start at",
ScheduledEndAt: "End at",
ScheduledStartAtShouldLaterThanNow: "Start at should be later than now",
ScheduledEndAtShouldLaterThanNowOrEmpty: "End at should be later than now or empty",
ScheduledEndAtShouldLaterThanStartAt: "End at should be later than start at",
ScheduledStartAtShouldNotEmpty: "Start at should not be empty",
PublishedAt: "Start at",
UnPublishedAt: "End at",
ActualPublishTime: "Actual Publish Time",
SchedulePublishTime: "Schedule Publish Time",
NotSet: "Not set",
WhenDoYouWantToPublish: "When do you want to publish?",
PublishScheduleTip: "After you set the {SchedulePublishTime}, the system will automatically publish/unpublish it.",
DateTimePickerClearText: "Clear",
DateTimePickerOkText: "OK",
SaveAsNewVersion: "Save As New Version",
SwitchedToNewVersion: "Switched To New Version",
SuccessfullyCreated: "Successfully Created",
SuccessfullyRename: "Successfully Rename",
SuccessfullyPublished: "Successfully published",
SuccessfullyPublishedOrRepublished: "Successfully published or republished",
SuccessfullyUnpublished: "Successfully unpublished",
SuccessfullyRepublished: "Successfully republished",
OnlineVersion: "Online Version",
VersionsList: "Versions List",
AllVersions: "All versions",
NamedVersions: "Named versions",
RenameVersion: "Rename Version",
DeleteVersionConfirmationTextTemplate: "Are you sure you want to delete version {VersionName} ?",
BulkActionConfirmationTextTemplate: "Are you sure you want to <b>{Action}</b> below records?",
BulkActionNoRecordsTextTemplate: "No records to <b>{Action}</b>.",
FilterTabAllVersions: "All Versions",
FilterTabOnlineVersion: "Online Versions",
FilterTabNamedVersions: "Named Versions",
Rename: "Rename",
PageOverView: "Page Overview",
Duplicate: "Duplicate",
}
View Source
var Messages_ja_JP = &Messages{
StatusDraft: "下書き",
StatusOnline: "公開中",
StatusOffline: "非公開中",
Publish: "公開する",
Unpublish: "非公開",
Republish: "再公開",
Areyousure: "よろしいですか?",
ScheduledStartAt: "公開開始日時",
ScheduledEndAt: "公開終了日時",
ScheduledStartAtShouldLaterThanNow: "予定開始時間は現在時刻よりも後でなければなりません",
ScheduledEndAtShouldLaterThanNowOrEmpty: "予定終了時間は現在時刻よりも後、または空でなければなりません",
ScheduledEndAtShouldLaterThanStartAt: "予定終了時間は予定開始時間よりも後でなければなりません",
ScheduledStartAtShouldNotEmpty: "予定開始時間は空ではない必要があります",
PublishedAt: "開始日時",
UnPublishedAt: "公開終了日時",
ActualPublishTime: "投稿日時",
SchedulePublishTime: "公開日時を設定する",
NotSet: "未セット",
WhenDoYouWantToPublish: "公開日時を設定してください",
PublishScheduleTip: "{SchedulePublishTime} 設定後、システムが自動で当該記事の公開・非公開を行います。",
DateTimePickerClearText: "クリア",
DateTimePickerOkText: "OK",
SaveAsNewVersion: "新規バージョンとして保存する",
SwitchedToNewVersion: "新規バージョンに変更する",
SuccessfullyCreated: "作成に成功しました",
SuccessfullyRename: "名付けに成功しました",
OnlineVersion: "オンラインバージョン",
VersionsList: "バージョンリスト",
AllVersions: "全てのバージョン",
NamedVersions: "名付け済みバージョン",
RenameVersion: "バージョンの名前を変更する",
DeleteVersionConfirmationTextTemplate: "このバージョン {VersionName} を削除してもよろしいですか?",
FilterTabAllVersions: "全てのバージョン",
FilterTabOnlineVersion: "オンラインバージョン",
FilterTabNamedVersions: "名付け済みバージョン",
Rename: "名前の変更",
PageOverView: "ページ概要",
}
View Source
var Messages_zh_CN = &Messages{
StatusDraft: "草稿",
StatusOnline: "在线",
StatusOffline: "离线",
Publish: "发布",
Unpublish: "取消发布",
Republish: "重新发布",
Areyousure: "你确定吗?",
ScheduledStartAt: "发布时间",
ScheduledEndAt: "下线时间",
ScheduledStartAtShouldLaterThanNow: "计划发布时间应当晚于现在时间",
ScheduledEndAtShouldLaterThanNowOrEmpty: "计划下线时间应当晚于现在时间",
ScheduledEndAtShouldLaterThanStartAt: "计划下线时间应当晚于计划发布时间",
ScheduledStartAtShouldNotEmpty: "计划发布时间不得为空",
PublishedAt: "发布时间",
UnPublishedAt: "下线时间",
ActualPublishTime: "实际发布时间",
SchedulePublishTime: "计划发布时间",
NotSet: "未设定",
WhenDoYouWantToPublish: "你希望什么时候发布?",
PublishScheduleTip: "设定好 {SchedulePublishTime} 之后, 系统会按照时间自动将它发布/下线。",
DateTimePickerClearText: "清空",
DateTimePickerOkText: "确定",
SaveAsNewVersion: "保存为一个新版本",
SwitchedToNewVersion: "切换到新版本",
SuccessfullyCreated: "成功创建",
SuccessfullyRename: "成功命名",
OnlineVersion: "在线版本",
VersionsList: "版本列表",
AllVersions: "所有版本",
NamedVersions: "已命名版本",
RenameVersion: "命名版本",
DeleteVersionConfirmationTextTemplate: "你确定你要删除此版本 {VersionName} 吗?",
FilterTabAllVersions: "所有版本",
FilterTabOnlineVersion: "在线版本",
FilterTabNamedVersions: "已命名版本",
Rename: "重命名",
PageOverView: "页面概览",
Duplicate: "复制",
}
Functions ¶
func DefaultVersionBar ¶
func DefaultVersionBar(db *gorm.DB) presets.ObjectComponentFunc
func DefaultVersionComponentFunc ¶
func DefaultVersionComponentFunc(b *presets.ModelBuilder, cfg ...VersionComponentConfig) presets.FieldComponentFunc
func DraftCountComponentFunc ¶
func DraftCountComponentFunc(db *gorm.DB) presets.FieldComponentFunc
func GetStatusLabelColor ¶
func LiveComponentFunc ¶
func LiveComponentFunc(db *gorm.DB, b *LiveChipsBuilder) presets.FieldComponentFunc
func LiveFieldComponentFunc ¶
func LiveFieldComponentFunc(db *gorm.DB, b *LiveChipsBuilder) presets.FieldComponentFunc
func LiveFieldComponentFuncBuilder ¶
func LiveFieldComponentFuncBuilder(db *gorm.DB, build func(status string, toStatus string, msgr *Messages) h.HTMLComponent) presets.FieldComponentFunc
func ScheduleTimeString ¶
func StatusListFunc ¶
func StatusListFunc(b *LiveChipsBuilder) presets.FieldComponentFunc
func UploadOrDelete ¶
func UploadOrDelete(objs []*PublishAction, Storage storage.Storage) (err error)
func WithPublishCallback ¶
func WithPublishCallback(b *presets.ModelBuilder, f ModelPublishCallback)
func WithUnpublishCallback ¶
func WithUnpublishCallback(b *presets.ModelBuilder, f ModelUnpublishCallback)
Types ¶
type AfterPublishInterface ¶
type AfterUnPublishInterface ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) AfterInstall ¶
func (*Builder) BulkAction ¶
func (b *Builder) BulkAction(m *presets.ModelBuilder) *BulkAction
func (*Builder) ContextValueFuncs ¶
func (b *Builder) ContextValueFuncs(vs ...ContextValueFunc) *Builder
func (*Builder) ModelInstall ¶
func (*Builder) Publish ¶
func (b *Builder) Publish(mb *presets.ModelBuilder, record interface{}, ctx context.Context) (err error)
幂等
type BulkAction ¶
type BulkAction struct { Finder func(db *gorm.DB, e Executor, selectedIds model.IDSlice) (records any, err error) ConfirmationComponent func(ctx *web.EventContext, records any) (comp h.HTMLComponent, err error) ConfirmationTable func(records any, table *v.VDataTableBuilder, ctx *web.EventContext) (comp h.HTMLComponent, err error) // contains filtered or unexported fields }
func (*BulkAction) Build ¶
func (ba *BulkAction) Build() *presets.BulkActionBuilder
func (*BulkAction) Update ¶
func (ba *BulkAction) Update(e Executor, selectedIds []string, ctx *web.EventContext) (err error)
type ContextKey ¶
type ContextKey string
const ( ModelPublishCallbackKey ContextKey = "mode_publish_callback" ModelUnpublishCallbackKey ContextKey = "mode_unpublish_callback" )
type Executor ¶
type Executor interface { Execute(mb *presets.ModelBuilder, publisher *Builder, actionName string, ctx *web.EventContext, mid model.ID) (obj any, err error) Title(msgr *Messages) string ActivityName() string Accept(status string) bool }
type ListInterface ¶
type ListInterface interface {
EmbedList() *List
}
type ListPublishBuilder ¶
type ListPublishBuilder struct {
// contains filtered or unexported fields
}
func NewListPublishBuilder ¶
func NewListPublishBuilder(db *gorm.DB, Storage storage.Storage) *ListPublishBuilder
func (*ListPublishBuilder) GetOldItemsFunc ¶
func (b *ListPublishBuilder) GetOldItemsFunc(f func(record interface{}) (result []interface{}, err error)) *ListPublishBuilder
func (*ListPublishBuilder) NeedNextPageFunc ¶
func (b *ListPublishBuilder) NeedNextPageFunc(f func(totalNumberPerPage, currentPageNumber, totalNumberOfItems int) bool) *ListPublishBuilder
func (*ListPublishBuilder) PublishActionsFunc ¶
func (b *ListPublishBuilder) PublishActionsFunc(f func(db *gorm.DB, lp ListPublisher, result []*OnePageItems, indexPage *OnePageItems) (objs []*PublishAction)) *ListPublishBuilder
func (*ListPublishBuilder) Run ¶
func (b *ListPublishBuilder) Run(model interface{}) (err error)
model is a empty struct example: Product{}
func (*ListPublishBuilder) TotalNumberPerPage ¶
func (b *ListPublishBuilder) TotalNumberPerPage(number int) *ListPublishBuilder
func (*ListPublishBuilder) WithValue ¶
func (b *ListPublishBuilder) WithValue(key, val interface{}) *ListPublishBuilder
type ListPublisher ¶
type LiveChipsBuilder ¶
var ( LiveChipsFormBuilder = LiveChipsBuilder{WithLabel: true, WithBg: true} LiveChipsListBuilder LiveChipsBuilder )
func (*LiveChipsBuilder) Auto ¶
func (b *LiveChipsBuilder) Auto(status string, toStatus string, msgr *Messages) h.HTMLComponent
func (*LiveChipsBuilder) Live ¶
func (b *LiveChipsBuilder) Live(status string, isScheduled bool, msgr *Messages) *VChipBuilder
func (*LiveChipsBuilder) LiveIcons ¶
func (b *LiveChipsBuilder) LiveIcons(status string, isScheduled bool, msgr *Messages) (comps h.HTMLComponents)
func (*LiveChipsBuilder) Lives ¶
func (b *LiveChipsBuilder) Lives(status string, toStatus string, msgr *Messages) h.HTMLComponent
func (*LiveChipsBuilder) LivesIcon ¶
func (b *LiveChipsBuilder) LivesIcon(status string, toStatus string, msgr *Messages) h.HTMLComponents
func (*LiveChipsBuilder) Status ¶
func (b *LiveChipsBuilder) Status(status string, msgr *Messages) *VChipBuilder
type Messages ¶
type Messages struct { StatusDraft string StatusOnline string StatusOffline string Publication string Publish string PublishHelp string PublishOrRepublish string PublishOrRepublishHelp string Unpublish string UnpublishHelp string Republish string RepublishHelp string Areyousure string ScheduledStartAt string ScheduledEndAt string ScheduledStartAtShouldLaterThanNow string ScheduledEndAtShouldLaterThanNowOrEmpty string ScheduledEndAtShouldLaterThanStartAt string ScheduledStartAtShouldNotEmpty string PublishedAt string UnPublishedAt string ActualPublishTime string SchedulePublishTime string NotSet string WhenDoYouWantToPublish string PublishScheduleTip string DateTimePickerClearText string DateTimePickerOkText string SaveAsNewVersion string SwitchedToNewVersion string SuccessfullyCreated string SuccessfullyRename string SuccessfullyPublished string SuccessfullyPublishedOrRepublished string SuccessfullyUnpublished string SuccessfullyRepublished string OnlineVersion string VersionsList string AllVersions string NamedVersions string RenameVersion string DeleteVersionConfirmationTextTemplate string BulkActionConfirmationTextTemplate string BulkActionNoRecordsTextTemplate string FilterTabAllVersions string FilterTabOnlineVersion string FilterTabNamedVersions string Rename string PageOverView string Duplicate string }
func GetMessages ¶
func (*Messages) ActivityHelp ¶
func (*Messages) ActivityTitle ¶
func (*Messages) BulkActionConfirmationText ¶
func (*Messages) BulkActionNoRecordsText ¶
func (*Messages) DeleteVersionConfirmationText ¶
type Model ¶
type Model struct { Record interface{} Builder *presets.ModelBuilder }
type ModelPublishCallback ¶
type ModelUnpublishCallback ¶
type OnePageItems ¶
type OnePageItems struct { Items []interface{} PageNumber int }
type PublicUrlInterface ¶
type PublicUrlInterface interface {
GetPublicUrl(mb *presets.ModelBuilder, ctx *web.EventContext) string
}
type PublishAction ¶
type PublishExecutor ¶
type PublishExecutor struct {
// contains filtered or unexported fields
}
func (PublishExecutor) Accept ¶
func (p PublishExecutor) Accept(status string) (ok bool)
func (PublishExecutor) ActivityName ¶
func (p PublishExecutor) ActivityName() string
func (PublishExecutor) Do ¶
func (p PublishExecutor) Do(mb *presets.ModelBuilder, publisher *Builder, actionName string, ctx *web.EventContext, obj any) (err error)
func (PublishExecutor) Execute ¶
func (p PublishExecutor) Execute(mb *presets.ModelBuilder, publisher *Builder, actionName string, ctx *web.EventContext, mid model.ID) (obj any, err error)
func (PublishExecutor) Option ¶
func (p PublishExecutor) Option(opt ...PublishOption) PublishExecutor
func (PublishExecutor) Title ¶
func (p PublishExecutor) Title(msgr *Messages) string
type PublishFlag ¶
type PublishFlag uint8
const ( FlagPublishRepublish PublishFlag = iota + 1 FlagPublishOrRepublish )
type PublishInterface ¶
type PublishInterface interface {
GetPublishActions(mb *presets.ModelBuilder, db *gorm.DB, ctx context.Context, Storage storage.Storage) (actions []*PublishAction, err error)
}
type PublishOption ¶
type PublishOption func(*PublishOptions)
func PublishWithFlag ¶
func PublishWithFlag(flag PublishFlag) PublishOption
type PublishOptions ¶
type PublishOptions struct {
Flag PublishFlag
}
type Schedule ¶
type Schedule struct { ScheduledStartAt *time.Time `gorm:"index"` ScheduledEndAt *time.Time `gorm:"index"` ActualStartAt *time.Time ActualEndAt *time.Time }
@snippet_begin(PublishSchedule)
func (*Schedule) EmbedSchedule ¶
type ScheduleInterface ¶
type ScheduleInterface interface {
EmbedSchedule() *Schedule
}
type SchedulePublishBuilder ¶
type SchedulePublishBuilder struct {
// contains filtered or unexported fields
}
func NewSchedulePublishBuilder ¶
func NewSchedulePublishBuilder(publisher *Builder) *SchedulePublishBuilder
func (*SchedulePublishBuilder) Run ¶
func (b *SchedulePublishBuilder) Run(model *Model) (err error)
model is a empty struct example: Product{}
func (*SchedulePublishBuilder) WithValue ¶
func (b *SchedulePublishBuilder) WithValue(key, val interface{}) *SchedulePublishBuilder
type SchedulePublisher ¶
type StatusInterface ¶
type StatusInterface interface {
EmbedStatus() *Status
}
type UnPublishInterface ¶
type UnPublishInterface interface {
GetUnPublishActions(mb *presets.ModelBuilder, db *gorm.DB, ctx context.Context, Storage storage.Storage) (actions []*PublishAction, err error)
}
type UnpublishExecutor ¶
type UnpublishExecutor struct { }
func (UnpublishExecutor) Accept ¶
func (UnpublishExecutor) Accept(status string) (ok bool)
func (UnpublishExecutor) ActivityName ¶
func (p UnpublishExecutor) ActivityName() string
func (UnpublishExecutor) Do ¶
func (e UnpublishExecutor) Do(mb *presets.ModelBuilder, publisher *Builder, actionName string, ctx *web.EventContext, obj any) (err error)
func (UnpublishExecutor) Execute ¶
func (e UnpublishExecutor) Execute(mb *presets.ModelBuilder, publisher *Builder, actionName string, ctx *web.EventContext, mid model.ID) (obj any, err error)
func (UnpublishExecutor) Title ¶
func (p UnpublishExecutor) Title(msgr *Messages) string
type Version ¶
type Version struct { Version string `gorm:"primary_key;size:128;not null;"` VersionName string ParentVersion string }
@snippet_begin(PublishVersion)
func EmbedVersion ¶
func (*Version) CreateVersion ¶
func (*Version) EmbedVersion ¶
type VersionComponentConfig ¶
type VersionComponentConfig struct { // If you want to use custom publish dialog, you can update the portal named PublishCustomDialogPortalName PublishEvent func(obj interface{}, field *presets.FieldContext, ctx *web.EventContext) string UnPublishEvent func(obj interface{}, field *presets.FieldContext, ctx *web.EventContext) string RePublishEvent func(obj interface{}, field *presets.FieldContext, ctx *web.EventContext) string Top bool }
Click to show internal directories.
Click to hide internal directories.