Documentation ¶
Index ¶
- Constants
- Variables
- func AddGlobalDisplayProcessFn(f FieldFilterFn)
- func GetJoinField(field string) string
- func JoinField(table, field string) string
- func ParseTableDataTmpl(content interface{}) string
- func ParseTableDataTmplWithID(id template.HTML, content string, value ...map[string]InfoItem) string
- func RegisterDisplayFnGenerator(key string, gen DisplayFnGenerator)
- type Action
- type ActionButton
- type ActionIconButton
- type Actions
- type AddFormFieldFn
- type AjaxData
- type AlertAttribute
- type Attribute
- type BaseButton
- func (b *BaseButton) Content() (template.HTML, template.JS)
- func (b *BaseButton) GetAction() Action
- func (b *BaseButton) GetName() string
- func (b *BaseButton) ID() string
- func (b *BaseButton) IsType(t string) bool
- func (b *BaseButton) METHOD() string
- func (b *BaseButton) SetName(name string)
- func (b *BaseButton) Type() string
- func (b *BaseButton) URL() string
- type BaseDisplayFnGenerator
- type BoxAttribute
- type Button
- type ButtonAttribute
- type Buttons
- func (b Buttons) Add(btn Button) Buttons
- func (b Buttons) AddNavButton(ico, name string, action Action) Buttons
- func (b Buttons) Callbacks() []context.Node
- func (b Buttons) CheckExist(name string) bool
- func (b Buttons) CheckPermission(user models.UserModel) Buttons
- func (b Buttons) CheckPermissionWhenURLAndMethodNotEmpty(user models.UserModel) Buttons
- func (b Buttons) Content(ctx *context.Context) (template.HTML, template.JS)
- func (b Buttons) Copy() Buttons
- func (b Buttons) FooterContent(ctx *context.Context) template.HTML
- func (b Buttons) RemoveButtonByName(name string) Buttons
- func (b Buttons) RemoveInfoNavButton() Buttons
- func (b Buttons) RemovePlugNavButton() Buttons
- func (b Buttons) RemoveSiteNavButton() Buttons
- func (b Buttons) RemoveToolNavButton() Buttons
- type Callbacks
- type ColAttribute
- type Component
- type ContentWrapper
- type DataTableAttribute
- type DefaultAction
- func (def *DefaultAction) BtnAttribute() template.HTML
- func (def *DefaultAction) BtnClass() template.HTML
- func (def *DefaultAction) ExtContent(ctx *context.Context) template.HTML
- func (def *DefaultAction) FooterContent(ctx *context.Context) template.HTML
- func (def *DefaultAction) GetCallbacks() context.Node
- func (def *DefaultAction) Js() template.JS
- func (def *DefaultAction) SetBtnData(data interface{})
- func (def *DefaultAction) SetBtnId(btnId string)
- type DefaultButton
- func GetColumnButton(title template.HTML, icon string, action Action, colors ...template.HTML) *DefaultButton
- func GetDefaultButton(title template.HTML, icon string, action Action, colors ...template.HTML) *DefaultButton
- func GetDefaultButtonGroup(title template.HTML, icon string, action Action, colors ...template.HTML) *DefaultButton
- type DefaultSelection
- type DeleteFn
- type DeleteFnWithRes
- type DisplayFnGenerator
- type DisplayProcessFnChains
- func AddLimit(limit int) DisplayProcessFnChains
- func AddSubstr(start int, end int) DisplayProcessFnChains
- func AddToLower() DisplayProcessFnChains
- func AddToTitle() DisplayProcessFnChains
- func AddToUpper() DisplayProcessFnChains
- func AddTrimSpace() DisplayProcessFnChains
- func AddXssFilter() DisplayProcessFnChains
- func AddXssJsFilter() DisplayProcessFnChains
- type ExportProcessFn
- type Field
- type FieldDisplay
- func (f FieldDisplay) AddLimit(limit int) DisplayProcessFnChains
- func (f FieldDisplay) AddSubstr(start int, end int) DisplayProcessFnChains
- func (f FieldDisplay) AddToLower() DisplayProcessFnChains
- func (f FieldDisplay) AddToTitle() DisplayProcessFnChains
- func (f FieldDisplay) AddToUpper() DisplayProcessFnChains
- func (f FieldDisplay) AddTrimSpace() DisplayProcessFnChains
- func (f FieldDisplay) IsNotSelectRes(v interface{}) bool
- func (f FieldDisplay) ToDisplay(value FieldModel) interface{}
- func (f FieldDisplay) ToDisplayHTML(value FieldModel) template.HTML
- func (f FieldDisplay) ToDisplayString(value FieldModel) string
- func (f FieldDisplay) ToDisplayStringArray(value FieldModel) []string
- func (f FieldDisplay) ToDisplayStringArrayArray(value FieldModel) [][]string
- type FieldDotColor
- type FieldFilterFn
- type FieldGetImgArrFn
- type FieldLabelParam
- type FieldList
- func (f FieldList) GetFieldByFieldName(name string) Field
- func (f FieldList) GetFieldFilterProcessValue(key, value, keyIndex string) string
- func (f FieldList) GetFieldJoinTable(key string) string
- func (f FieldList) GetThead(info TableInfo, params parameter.Parameters, columns []string) (Thead, string, string)
- func (f FieldList) GetTheadAndFilterForm(info TableInfo, params parameter.Parameters, columns []string, ...) (Thead, string, string, string, []string, []FormField)
- type FieldModel
- type FieldModelValue
- type FieldOption
- type FieldOptions
- type FieldProgressBarData
- type FilterFormField
- type FilterOperator
- type FilterType
- type FormAttribute
- type FormField
- type FormFields
- func (f FormFields) Add(field *FormField) FormFields
- func (f FormFields) Copy() FormFields
- func (f FormFields) FillCustomContent() FormFields
- func (f FormFields) FindByFieldName(field string) *FormField
- func (f FormFields) FindIndexByFieldName(field string) int
- func (f FormFields) FindTableChildren(father string) []*FormField
- func (f FormFields) FindTableField(field, father string) *FormField
- func (f FormFields) RemoveNotShow() FormFields
- type FormPanel
- func (f *FormPanel) AddCSS(css template.CSS) *FormPanel
- func (f *FormPanel) AddField(head, field string, filedType db.DatabaseType, formType form2.Type) *FormPanel
- func (f *FormPanel) AddFieldTr(ctx *context.Context, head, field string, filedType db.DatabaseType, ...) *FormPanel
- func (f *FormPanel) AddFieldWithTranslation(ctx *context.Context, head, field string, filedType db.DatabaseType, ...) *FormPanel
- func (f *FormPanel) AddJS(js template.JS) *FormPanel
- func (f *FormPanel) AddLimitFilter(limit int) *FormPanel
- func (f *FormPanel) AddRow(addFields AddFormFieldFn) *FormPanel
- func (f *FormPanel) AddSubstrFilter(start int, end int) *FormPanel
- func (f *FormPanel) AddTable(head, field string, addFields AddFormFieldFn) *FormPanel
- func (f *FormPanel) AddToLowerFilter() *FormPanel
- func (f *FormPanel) AddToTitleFilter() *FormPanel
- func (f *FormPanel) AddToUpperFilter() *FormPanel
- func (f *FormPanel) AddTrimSpaceFilter() *FormPanel
- func (f *FormPanel) AddXssFilter() *FormPanel
- func (f *FormPanel) AddXssJsFilter() *FormPanel
- func (f *FormPanel) EnableAjax(msgs ...string) *FormPanel
- func (f *FormPanel) EnableAjaxData(data AjaxData) *FormPanel
- func (f *FormPanel) FieldCustomContent(content template.HTML) *FormPanel
- func (f *FormPanel) FieldCustomCss(css template.CSS) *FormPanel
- func (f *FormPanel) FieldCustomJs(js template.JS) *FormPanel
- func (f *FormPanel) FieldDefault(def string) *FormPanel
- func (f *FormPanel) FieldDefaultOptionDelimiter(delimiter string) *FormPanel
- func (f *FormPanel) FieldDisableWhenCreate() *FormPanel
- func (f *FormPanel) FieldDisableWhenUpdate() *FormPanel
- func (f *FormPanel) FieldDisplay(filter FieldFilterFn) *FormPanel
- func (f *FormPanel) FieldDisplayButCanNotEditWhenCreate() *FormPanel
- func (f *FormPanel) FieldDisplayButCanNotEditWhenUpdate() *FormPanel
- func (f *FormPanel) FieldDivider(title ...string) *FormPanel
- func (f *FormPanel) FieldEnableFileUpload(data ...interface{}) *FormPanel
- func (f *FormPanel) FieldFoot(foot template.HTML) *FormPanel
- func (f *FormPanel) FieldFormType(formType form2.Type) *FormPanel
- func (f *FormPanel) FieldHeadWidth(width int) *FormPanel
- func (f *FormPanel) FieldHelpMsg(s template.HTML) *FormPanel
- func (f *FormPanel) FieldHide() *FormPanel
- func (f *FormPanel) FieldHideLabel() *FormPanel
- func (f *FormPanel) FieldHideWhenCreate() *FormPanel
- func (f *FormPanel) FieldHideWhenUpdate() *FormPanel
- func (f *FormPanel) FieldInputWidth(width int) *FormPanel
- func (f *FormPanel) FieldLimit(limit int) *FormPanel
- func (f *FormPanel) FieldMust() *FormPanel
- func (f *FormPanel) FieldNotAllowAdd() *FormPanel
- func (f *FormPanel) FieldNotAllowEdit() *FormPanel
- func (f *FormPanel) FieldNow() *FormPanel
- func (f *FormPanel) FieldNowWhenInsert() *FormPanel
- func (f *FormPanel) FieldNowWhenUpdate() *FormPanel
- func (f *FormPanel) FieldOnChoose(val, field string, value template.HTML) *FormPanel
- func (f *FormPanel) FieldOnChooseAjax(field, url string, handler Handler, custom ...template.HTML) *FormPanel
- func (f *FormPanel) FieldOnChooseCustom(js template.HTML) *FormPanel
- func (f *FormPanel) FieldOnChooseDisable(value string, field ...string) *FormPanel
- func (f *FormPanel) FieldOnChooseHide(value string, field ...string) *FormPanel
- func (f *FormPanel) FieldOnChooseMap(m map[string]LinkField) *FormPanel
- func (f *FormPanel) FieldOnChooseOptionsHide(values []string, field ...string) *FormPanel
- func (f *FormPanel) FieldOnChooseOptionsShow(values []string, field ...string) *FormPanel
- func (f *FormPanel) FieldOnChooseShow(value string, field ...string) *FormPanel
- func (f *FormPanel) FieldOnSearch(url string, handler Handler, delay ...int) *FormPanel
- func (f *FormPanel) FieldOptionExt(m map[string]interface{}) *FormPanel
- func (f *FormPanel) FieldOptionExt2(m map[string]interface{}) *FormPanel
- func (f *FormPanel) FieldOptionExtJS(js template.JS) *FormPanel
- func (f *FormPanel) FieldOptionExtJS2(js template.JS) *FormPanel
- func (f *FormPanel) FieldOptionInitFn(fn OptionInitFn) *FormPanel
- func (f *FormPanel) FieldOptions(options FieldOptions) *FormPanel
- func (f *FormPanel) FieldOptionsFromTable(table, textFieldName, valueFieldName string, ...) *FormPanel
- func (f *FormPanel) FieldOptionsTableProcessFn(fn OptionProcessFn) *FormPanel
- func (f *FormPanel) FieldPlaceholder(placeholder string) *FormPanel
- func (f *FormPanel) FieldPostFilterFn(post PostFieldFilterFn) *FormPanel
- func (f *FormPanel) FieldRowWidth(width int) *FormPanel
- func (f *FormPanel) FieldSubstr(start int, end int) *FormPanel
- func (f *FormPanel) FieldToLower() *FormPanel
- func (f *FormPanel) FieldToTitle() *FormPanel
- func (f *FormPanel) FieldToUpper() *FormPanel
- func (f *FormPanel) FieldTrimSpace() *FormPanel
- func (f *FormPanel) FieldValue(value string) *FormPanel
- func (f *FormPanel) FieldWidth(width int) *FormPanel
- func (f *FormPanel) FieldXssFilter() *FormPanel
- func (f *FormPanel) FieldsWithDefaultValue(sql ...func() *db.SQL) FormFields
- func (f *FormPanel) FieldsWithValue(pk, id string, columns []string, res map[string]interface{}, ...) FormFields
- func (f *FormPanel) GetNewFormFields(sql ...func() *db.SQL) (FormFields, []FormFields, []string)
- func (f *FormPanel) GroupField(sql ...func() *db.SQL) ([]FormFields, []string)
- func (f *FormPanel) GroupFieldWithValue(pk, id string, columns []string, res map[string]interface{}, ...) ([]FormFields, []string)
- func (f *FormPanel) HasError() bool
- func (f *FormPanel) HideBackButton() *FormPanel
- func (f *FormPanel) HideContinueEditCheckBox() *FormPanel
- func (f *FormPanel) HideContinueNewCheckBox() *FormPanel
- func (f *FormPanel) HideResetButton() *FormPanel
- func (f *FormPanel) OperationURL(id string) string
- func (f *FormPanel) Set400Error(content ...template.HTML) *FormPanel
- func (f *FormPanel) Set403Error(content ...template.HTML) *FormPanel
- func (f *FormPanel) Set404Error(content ...template.HTML) *FormPanel
- func (f *FormPanel) Set500Error(content ...template.HTML) *FormPanel
- func (f *FormPanel) SetAjaxErrorJS(js template.JS) *FormPanel
- func (f *FormPanel) SetAjaxSuccessJS(js template.JS) *FormPanel
- func (f *FormPanel) SetDescription(desc string) *FormPanel
- func (f *FormPanel) SetError(err errors.PageError, content ...template.HTML) *FormPanel
- func (f *FormPanel) SetFooterHtml(footer template.HTML) *FormPanel
- func (f *FormPanel) SetFormEditBtnWord(word template.HTML) *FormPanel
- func (f *FormPanel) SetFormEditTitle(title template.HTML) *FormPanel
- func (f *FormPanel) SetFormNewBtnWord(word template.HTML) *FormPanel
- func (f *FormPanel) SetFormNewTitle(title template.HTML) *FormPanel
- func (f *FormPanel) SetHTMLContent(content template.HTML) *FormPanel
- func (f *FormPanel) SetHeadWidth(width int) *FormPanel
- func (f *FormPanel) SetHeader(content template.HTML) *FormPanel
- func (f *FormPanel) SetHeaderHtml(header template.HTML) *FormPanel
- func (f *FormPanel) SetHideSideBar() *FormPanel
- func (f *FormPanel) SetInputWidth(width int) *FormPanel
- func (f *FormPanel) SetInsertFn(fn FormPostFn) *FormPanel
- func (f *FormPanel) SetLayout(layout form2.Layout) *FormPanel
- func (f *FormPanel) SetNoCompress() *FormPanel
- func (f *FormPanel) SetPostHook(fn FormPostFn) *FormPanel
- func (f *FormPanel) SetPostValidator(va FormPostFn) *FormPanel
- func (f *FormPanel) SetPreProcessFn(fn FormPreProcessFn) *FormPanel
- func (f *FormPanel) SetPrimaryKey(name string, typ db.DatabaseType) *FormPanel
- func (f *FormPanel) SetResponder(responder Responder) *FormPanel
- func (f *FormPanel) SetTabGroups(groups TabGroups) *FormPanel
- func (f *FormPanel) SetTabHeaders(headers ...string) *FormPanel
- func (f *FormPanel) SetTable(table string) *FormPanel
- func (f *FormPanel) SetTitle(title string) *FormPanel
- func (f *FormPanel) SetUpdateFn(fn FormPostFn) *FormPanel
- func (f *FormPanel) SetWrapper(wrapper ContentWrapper) *FormPanel
- type FormPostFn
- type FormPreProcessFn
- type GetDataFn
- type GetPanelFn
- type GetPanelInfoFn
- type GroupFieldHeaders
- type GroupFormFields
- type Handler
- type ImgAttribute
- type InfoItem
- type InfoList
- type InfoPanel
- func (i *InfoPanel) AddActionButton(ctx *context.Context, title template.HTML, action Action, ids ...string) *InfoPanel
- func (i *InfoPanel) AddActionButtonFront(ctx *context.Context, title template.HTML, action Action, ids ...string) *InfoPanel
- func (i *InfoPanel) AddActionIconButton(ctx *context.Context, icon string, action Action, ids ...string) *InfoPanel
- func (i *InfoPanel) AddButton(ctx *context.Context, title template.HTML, icon string, action Action, ...) *InfoPanel
- func (i *InfoPanel) AddButtonRaw(ctx *context.Context, btn Button, action Action) *InfoPanel
- func (i *InfoPanel) AddCSS(css template.CSS) *InfoPanel
- func (i *InfoPanel) AddColumn(head string, fun FieldFilterFn) *InfoPanel
- func (i *InfoPanel) AddColumnButtons(ctx *context.Context, head string, buttons ...Button) *InfoPanel
- func (i *InfoPanel) AddField(head, field string, typeName db.DatabaseType) *InfoPanel
- func (i *InfoPanel) AddFieldTr(ctx *context.Context, head, field string, typeName db.DatabaseType) *InfoPanel
- func (i *InfoPanel) AddFieldWithTranslation(ctx *context.Context, head, field string, typeName db.DatabaseType) *InfoPanel
- func (i *InfoPanel) AddFilter(head, field string, typeName db.DatabaseType, fn UpdateParametersFn, ...) *InfoPanel
- func (i *InfoPanel) AddJS(js template.JS) *InfoPanel
- func (i *InfoPanel) AddJSModule(js template.JS) *InfoPanel
- func (i *InfoPanel) AddLimitFilter(limit int) *InfoPanel
- func (i *InfoPanel) AddSelectBox(ctx *context.Context, placeholder string, options FieldOptions, action Action, ...) *InfoPanel
- func (i *InfoPanel) AddSubstrFilter(start int, end int) *InfoPanel
- func (i *InfoPanel) AddToLowerFilter() *InfoPanel
- func (i *InfoPanel) AddToTitleFilter() *InfoPanel
- func (i *InfoPanel) AddToUpperFilter() *InfoPanel
- func (i *InfoPanel) AddTrimSpaceFilter() *InfoPanel
- func (i *InfoPanel) AddUpdateParametersFn(fn UpdateParametersFn) *InfoPanel
- func (i *InfoPanel) AddXssFilter() *InfoPanel
- func (i *InfoPanel) AddXssJsFilter() *InfoPanel
- func (i *InfoPanel) ExportValue() *InfoPanel
- func (i *InfoPanel) FieldAsDeleteParam() *InfoPanel
- func (i *InfoPanel) FieldAsDetailParam() *InfoPanel
- func (i *InfoPanel) FieldAsEditParam() *InfoPanel
- func (i *InfoPanel) FieldBool(flags ...string) *InfoPanel
- func (i *InfoPanel) FieldCarousel(fn FieldGetImgArrFn, size ...int) *InfoPanel
- func (i *InfoPanel) FieldCopyable(prefix ...string) *InfoPanel
- func (i *InfoPanel) FieldDate(format string) *InfoPanel
- func (i *InfoPanel) FieldDisplay(filter FieldFilterFn) *InfoPanel
- func (i *InfoPanel) FieldDot(icons map[string]FieldDotColor, defaultDot FieldDotColor) *InfoPanel
- func (i *InfoPanel) FieldDownLoadable(prefix ...string) *InfoPanel
- func (i *InfoPanel) FieldEditAble(editType ...table.Type) *InfoPanel
- func (i *InfoPanel) FieldEditOptions(options FieldOptions, extra ...map[string]string) *InfoPanel
- func (i *InfoPanel) FieldFileSize() *InfoPanel
- func (i *InfoPanel) FieldFilterOnChoose(val, field string, value template.HTML) *InfoPanel
- func (i *InfoPanel) FieldFilterOnChooseAjax(field, url string, handler Handler) *InfoPanel
- func (i *InfoPanel) FieldFilterOnChooseCustom(js template.HTML) *InfoPanel
- func (i *InfoPanel) FieldFilterOnChooseDisable(value string, field ...string) *InfoPanel
- func (i *InfoPanel) FieldFilterOnChooseHide(value string, field ...string) *InfoPanel
- func (i *InfoPanel) FieldFilterOnChooseMap(m map[string]LinkField) *InfoPanel
- func (i *InfoPanel) FieldFilterOnChooseShow(value string, field ...string) *InfoPanel
- func (i *InfoPanel) FieldFilterOnSearch(url string, handler Handler, delay ...int) *InfoPanel
- func (i *InfoPanel) FieldFilterOptionExt(m map[string]interface{}) *InfoPanel
- func (i *InfoPanel) FieldFilterOptions(options FieldOptions) *InfoPanel
- func (i *InfoPanel) FieldFilterOptionsFromTable(table, textFieldName, valueFieldName string, ...) *InfoPanel
- func (i *InfoPanel) FieldFilterProcess(process func(string) string) *InfoPanel
- func (i *InfoPanel) FieldFilterable(filterType ...FilterType) *InfoPanel
- func (i *InfoPanel) FieldFixed() *InfoPanel
- func (i *InfoPanel) FieldHide() *InfoPanel
- func (i *InfoPanel) FieldHideForList() *InfoPanel
- func (i *InfoPanel) FieldIcon(icons map[string]string, defaultIcon string) *InfoPanel
- func (i *InfoPanel) FieldImage(width, height string, prefix ...string) *InfoPanel
- func (i *InfoPanel) FieldJoin(join Join) *InfoPanel
- func (i *InfoPanel) FieldLabel(args ...FieldLabelParam) *InfoPanel
- func (i *InfoPanel) FieldLimit(limit int) *InfoPanel
- func (i *InfoPanel) FieldLink(src string, openInNewTab ...bool) *InfoPanel
- func (i *InfoPanel) FieldLoading(data []string) *InfoPanel
- func (i *InfoPanel) FieldProgressBar(data ...FieldProgressBarData) *InfoPanel
- func (i *InfoPanel) FieldQrcode() *InfoPanel
- func (i *InfoPanel) FieldSortable() *InfoPanel
- func (i *InfoPanel) FieldSubstr(start int, end int) *InfoPanel
- func (i *InfoPanel) FieldToLower() *InfoPanel
- func (i *InfoPanel) FieldToTitle() *InfoPanel
- func (i *InfoPanel) FieldToUpper() *InfoPanel
- func (i *InfoPanel) FieldTrimSpace() *InfoPanel
- func (i *InfoPanel) FieldWidth(width int) *InfoPanel
- func (i *InfoPanel) FieldXssFilter() *InfoPanel
- func (i *InfoPanel) GetPageSizeList() []string
- func (i *InfoPanel) GetSort() string
- func (i *InfoPanel) HasError() bool
- func (i *InfoPanel) HideCheckBoxColumn() *InfoPanel
- func (i *InfoPanel) HideColumn(n int) *InfoPanel
- func (i *InfoPanel) HideDeleteButton() *InfoPanel
- func (i *InfoPanel) HideDetailButton() *InfoPanel
- func (i *InfoPanel) HideEditButton() *InfoPanel
- func (i *InfoPanel) HideExportButton() *InfoPanel
- func (i *InfoPanel) HideFilterArea() *InfoPanel
- func (i *InfoPanel) HideFilterButton() *InfoPanel
- func (i *InfoPanel) HideNewButton() *InfoPanel
- func (i *InfoPanel) HidePagination() *InfoPanel
- func (i *InfoPanel) HideQueryInfo() *InfoPanel
- func (i *InfoPanel) HideRowSelector() *InfoPanel
- func (i *InfoPanel) IsExportValue() bool
- func (i *InfoPanel) OperationURL(id string) string
- func (i *InfoPanel) Set400Error(content ...template.HTML) *InfoPanel
- func (i *InfoPanel) Set403Error(content ...template.HTML) *InfoPanel
- func (i *InfoPanel) Set404Error(content ...template.HTML) *InfoPanel
- func (i *InfoPanel) Set500Error(content ...template.HTML) *InfoPanel
- func (i *InfoPanel) SetAction(action template.HTML) *InfoPanel
- func (i *InfoPanel) SetActionButtonFold() *InfoPanel
- func (i *InfoPanel) SetAutoRefresh(interval uint) *InfoPanel
- func (i *InfoPanel) SetDefaultPageSize(defaultPageSize int) *InfoPanel
- func (i *InfoPanel) SetDeleteFn(fn DeleteFn) *InfoPanel
- func (i *InfoPanel) SetDeleteHook(fn DeleteFn) *InfoPanel
- func (i *InfoPanel) SetDeleteHookWithRes(fn DeleteFnWithRes) *InfoPanel
- func (i *InfoPanel) SetDescription(desc string) *InfoPanel
- func (i *InfoPanel) SetError(err errors.PageError, content ...template.HTML) *InfoPanel
- func (i *InfoPanel) SetExportProcessFn(fn ExportProcessFn) *InfoPanel
- func (i *InfoPanel) SetFilterFormHeadWidth(w int) *InfoPanel
- func (i *InfoPanel) SetFilterFormInputWidth(w int) *InfoPanel
- func (i *InfoPanel) SetFilterFormLayout(layout form.Layout) *InfoPanel
- func (i *InfoPanel) SetFooterHtml(footer template.HTML) *InfoPanel
- func (i *InfoPanel) SetGetDataFn(fn GetDataFn) *InfoPanel
- func (i *InfoPanel) SetHeaderHtml(header template.HTML) *InfoPanel
- func (i *InfoPanel) SetHideSideBar() *InfoPanel
- func (i *InfoPanel) SetNoCompress() *InfoPanel
- func (i *InfoPanel) SetPageSizeList(pageSizeList []int) *InfoPanel
- func (i *InfoPanel) SetPreDeleteFn(fn DeleteFn) *InfoPanel
- func (i *InfoPanel) SetPrimaryKey(name string, typ db.DatabaseType) *InfoPanel
- func (i *InfoPanel) SetQueryFilterFn(fn QueryFilterFn) *InfoPanel
- func (i *InfoPanel) SetSortAsc() *InfoPanel
- func (i *InfoPanel) SetSortDesc() *InfoPanel
- func (i *InfoPanel) SetSortField(field string) *InfoPanel
- func (i *InfoPanel) SetTabGroups(groups TabGroups) *InfoPanel
- func (i *InfoPanel) SetTabHeaders(headers ...string) *InfoPanel
- func (i *InfoPanel) SetTable(table string) *InfoPanel
- func (i *InfoPanel) SetTableFixed() *InfoPanel
- func (i *InfoPanel) SetTitle(title string) *InfoPanel
- func (i *InfoPanel) SetWrapper(wrapper ContentWrapper) *InfoPanel
- func (i *InfoPanel) Where(field string, operator string, arg interface{}) *InfoPanel
- func (i *InfoPanel) WhereOr(field string, operator string, arg interface{}) *InfoPanel
- func (i *InfoPanel) WhereRaw(raw string, arg ...interface{}) *InfoPanel
- type Join
- type Joins
- type LabelAttribute
- type LinkAttribute
- type LinkField
- type NavButton
- type NavDropDownButton
- type NavDropDownItemButton
- type NewPageParam
- type NilAction
- func (def *NilAction) BtnAttribute() template.HTML
- func (def *NilAction) BtnClass() template.HTML
- func (def *NilAction) ExtContent(ctx *context.Context) template.HTML
- func (def *NilAction) FooterContent(ctx *context.Context) template.HTML
- func (def *NilAction) GetCallbacks() context.Node
- func (def *NilAction) Js() template.JS
- func (def *NilAction) SetBtnData(data interface{})
- func (def *NilAction) SetBtnId(btnId string)
- type OptionArrInitFn
- type OptionInitFn
- type OptionProcessFn
- type OptionTable
- type OptionTableQueryProcessFn
- type Page
- type PaginatorAttribute
- type Panel
- type PanelInfo
- type PopupAttribute
- type PostFieldFilterFn
- type PostFieldModel
- type PostType
- type QueryFilterFn
- type Responder
- type RowAttribute
- type S
- type Sort
- type SystemInfo
- type TabGroups
- type TabHeaders
- type TableAttribute
- type TableInfo
- type TableRowData
- type TabsAttribute
- type Thead
- type TheadItem
- type TreeAttribute
- type TreeViewAttribute
- type TreeViewData
- type TreeViewItem
- type TreeViewItemState
- type TreeViewItems
- type UpdateParametersFn
- type Where
- type WhereRaw
- type Wheres
Constants ¶
const ()
const ()
const ( PostTypeCreate = iota PostTypeUpdate )
const DefaultPageSize = 10
Variables ¶
var DefaultPageSizeList = []int{10, 20, 30, 50, 100}
var JoinFieldValueDelimiter = utils.Uuid(8)
Functions ¶
func AddGlobalDisplayProcessFn ¶
func AddGlobalDisplayProcessFn(f FieldFilterFn)
func GetJoinField ¶
func ParseTableDataTmpl ¶
func ParseTableDataTmpl(content interface{}) string
func RegisterDisplayFnGenerator ¶
func RegisterDisplayFnGenerator(key string, gen DisplayFnGenerator)
Types ¶
type ActionButton ¶
type ActionButton struct {
*BaseButton
}
func GetActionButton ¶
func GetActionButton(title template.HTML, action Action, ids ...string) *ActionButton
type ActionIconButton ¶
type ActionIconButton struct { Icon template.HTML *BaseButton }
func GetActionIconButton ¶
func GetActionIconButton(icon string, action Action, ids ...string) *ActionIconButton
type AddFormFieldFn ¶
type AddFormFieldFn func(panel *FormPanel)
type AlertAttribute ¶
type AlertAttribute interface { SetTheme(value string) AlertAttribute SetTitle(value template.HTML) AlertAttribute SetContent(value template.HTML) AlertAttribute Warning(msg string) template.HTML GetContent() template.HTML }
type Attribute ¶
Attribute is the component interface of template. Every component of template should implement it.
type BaseButton ¶
func (*BaseButton) GetAction ¶
func (b *BaseButton) GetAction() Action
func (*BaseButton) GetName ¶
func (b *BaseButton) GetName() string
func (*BaseButton) ID ¶
func (b *BaseButton) ID() string
func (*BaseButton) IsType ¶
func (b *BaseButton) IsType(t string) bool
func (*BaseButton) METHOD ¶
func (b *BaseButton) METHOD() string
func (*BaseButton) SetName ¶
func (b *BaseButton) SetName(name string)
func (*BaseButton) Type ¶
func (b *BaseButton) Type() string
func (*BaseButton) URL ¶
func (b *BaseButton) URL() string
type BaseDisplayFnGenerator ¶
type BaseDisplayFnGenerator struct{}
func (*BaseDisplayFnGenerator) HTML ¶
func (base *BaseDisplayFnGenerator) HTML() template.HTML
func (*BaseDisplayFnGenerator) JS ¶
func (base *BaseDisplayFnGenerator) JS() template.HTML
type BoxAttribute ¶
type BoxAttribute interface { SetHeader(value template.HTML) BoxAttribute SetBody(value template.HTML) BoxAttribute SetNoPadding() BoxAttribute SetTitle(value template.HTML) BoxAttribute WithHeadBorder() BoxAttribute SetIframeStyle(iframe bool) BoxAttribute SetAttr(attr template.HTMLAttr) BoxAttribute SetStyle(value template.HTMLAttr) BoxAttribute SetHeadColor(value string) BoxAttribute SetClass(value string) BoxAttribute SetTheme(value string) BoxAttribute SetSecondHeader(value template.HTML) BoxAttribute SetSecondHeadColor(value string) BoxAttribute WithSecondHeadBorder() BoxAttribute SetSecondHeaderClass(value string) BoxAttribute GetContent() template.HTML }
type ButtonAttribute ¶
type ButtonAttribute interface { SetContent(value template.HTML) ButtonAttribute SetOrientationRight() ButtonAttribute SetOrientationLeft() ButtonAttribute SetMarginLeft(int) ButtonAttribute SetMarginRight(int) ButtonAttribute SetThemePrimary() ButtonAttribute SetSmallSize() ButtonAttribute AddClass(class string) ButtonAttribute SetID(id string) ButtonAttribute SetMiddleSize() ButtonAttribute SetHref(string) ButtonAttribute SetThemeWarning() ButtonAttribute SetTheme(value string) ButtonAttribute SetLoadingText(value template.HTML) ButtonAttribute SetThemeDefault() ButtonAttribute SetType(string) ButtonAttribute GetContent() template.HTML }
type Buttons ¶
type Buttons []Button
func (Buttons) AddNavButton ¶
func (Buttons) CheckExist ¶
func (Buttons) CheckPermissionWhenURLAndMethodNotEmpty ¶
func (Buttons) RemoveButtonByName ¶
func (Buttons) RemoveInfoNavButton ¶
func (Buttons) RemovePlugNavButton ¶
func (Buttons) RemoveSiteNavButton ¶
func (Buttons) RemoveToolNavButton ¶
type ColAttribute ¶
type ColAttribute interface { SetSize(value S) ColAttribute SetContent(value template.HTML) ColAttribute AddContent(value template.HTML) ColAttribute GetContent() template.HTML }
type DataTableAttribute ¶
type DataTableAttribute interface { GetDataTableHeader() template.HTML SetThead(value Thead) DataTableAttribute SetInfoList(value []map[string]InfoItem) DataTableAttribute SetEditUrl(value string) DataTableAttribute SetDeleteUrl(value string) DataTableAttribute SetNewUrl(value string) DataTableAttribute SetPrimaryKey(value string) DataTableAttribute SetStyle(style string) DataTableAttribute SetAction(action template.HTML) DataTableAttribute SetIsTab(value bool) DataTableAttribute SetActionFold(fold bool) DataTableAttribute SetHideThead() DataTableAttribute SetLayout(value string) DataTableAttribute SetButtons(btns template.HTML) DataTableAttribute SetSticky(sticky bool) DataTableAttribute SetHideFilterArea(value bool) DataTableAttribute SetHideRowSelector(value bool) DataTableAttribute SetActionJs(aj template.JS) DataTableAttribute SetNoAction() DataTableAttribute SetInfoUrl(value string) DataTableAttribute SetDetailUrl(value string) DataTableAttribute SetHasFilter(hasFilter bool) DataTableAttribute SetSortUrl(value string) DataTableAttribute SetExportUrl(value string) DataTableAttribute SetUpdateUrl(value string) DataTableAttribute GetContent() template.HTML }
type DefaultAction ¶
func NewDefaultAction ¶
func NewDefaultAction(attr, ext, footer template.HTML, js template.JS) *DefaultAction
func (*DefaultAction) BtnAttribute ¶
func (def *DefaultAction) BtnAttribute() template.HTML
func (*DefaultAction) BtnClass ¶
func (def *DefaultAction) BtnClass() template.HTML
func (*DefaultAction) ExtContent ¶
func (def *DefaultAction) ExtContent(ctx *context.Context) template.HTML
func (*DefaultAction) FooterContent ¶
func (def *DefaultAction) FooterContent(ctx *context.Context) template.HTML
func (*DefaultAction) GetCallbacks ¶
func (def *DefaultAction) GetCallbacks() context.Node
func (*DefaultAction) Js ¶
func (def *DefaultAction) Js() template.JS
func (*DefaultAction) SetBtnData ¶
func (def *DefaultAction) SetBtnData(data interface{})
func (*DefaultAction) SetBtnId ¶
func (def *DefaultAction) SetBtnId(btnId string)
type DefaultButton ¶
type DefaultButton struct { *BaseButton Color template.HTML TextColor template.HTML Icon string Direction template.HTML Group bool }
func GetColumnButton ¶
func GetDefaultButton ¶
func GetDefaultButtonGroup ¶
type DefaultSelection ¶
type DefaultSelection struct { *BaseButton Options FieldOptions Placeholder string Width int }
func GetDefaultSelection ¶
func GetDefaultSelection(placeholder string, options FieldOptions, action Action, widths ...int) *DefaultSelection
type DeleteFnWithRes ¶
type DisplayFnGenerator ¶
type DisplayProcessFnChains ¶
type DisplayProcessFnChains []FieldFilterFn
func AddLimit ¶
func AddLimit(limit int) DisplayProcessFnChains
func AddSubstr ¶
func AddSubstr(start int, end int) DisplayProcessFnChains
func AddToLower ¶
func AddToLower() DisplayProcessFnChains
func AddToTitle ¶
func AddToTitle() DisplayProcessFnChains
func AddToUpper ¶
func AddToUpper() DisplayProcessFnChains
func AddTrimSpace ¶
func AddTrimSpace() DisplayProcessFnChains
func AddXssFilter ¶
func AddXssFilter() DisplayProcessFnChains
func AddXssJsFilter ¶
func AddXssJsFilter() DisplayProcessFnChains
func (DisplayProcessFnChains) Add ¶
func (d DisplayProcessFnChains) Add(f FieldFilterFn) DisplayProcessFnChains
func (DisplayProcessFnChains) Append ¶
func (d DisplayProcessFnChains) Append(f DisplayProcessFnChains) DisplayProcessFnChains
func (DisplayProcessFnChains) Copy ¶
func (d DisplayProcessFnChains) Copy() DisplayProcessFnChains
func (DisplayProcessFnChains) Valid ¶
func (d DisplayProcessFnChains) Valid() bool
type ExportProcessFn ¶
type ExportProcessFn func(param parameter.Parameters) (PanelInfo, error)
type Field ¶
type Field struct { Head string Field string TypeName db.DatabaseType Joins Joins Width int Sortable bool EditAble bool Fixed bool Filterable bool Hide bool HideForList bool EditType table.Type EditOptions FieldOptions FilterFormFields []FilterFormField IsEditParam bool IsDeleteParam bool IsDetailParam bool FieldDisplay }
Field is the table field.
func (Field) GetFilterFormFields ¶
type FieldDisplay ¶
type FieldDisplay struct { Display FieldFilterFn DisplayProcessChains DisplayProcessFnChains }
func (FieldDisplay) AddLimit ¶
func (f FieldDisplay) AddLimit(limit int) DisplayProcessFnChains
func (FieldDisplay) AddSubstr ¶
func (f FieldDisplay) AddSubstr(start int, end int) DisplayProcessFnChains
func (FieldDisplay) AddToLower ¶
func (f FieldDisplay) AddToLower() DisplayProcessFnChains
func (FieldDisplay) AddToTitle ¶
func (f FieldDisplay) AddToTitle() DisplayProcessFnChains
func (FieldDisplay) AddToUpper ¶
func (f FieldDisplay) AddToUpper() DisplayProcessFnChains
func (FieldDisplay) AddTrimSpace ¶
func (f FieldDisplay) AddTrimSpace() DisplayProcessFnChains
func (FieldDisplay) IsNotSelectRes ¶
func (f FieldDisplay) IsNotSelectRes(v interface{}) bool
func (FieldDisplay) ToDisplay ¶
func (f FieldDisplay) ToDisplay(value FieldModel) interface{}
func (FieldDisplay) ToDisplayHTML ¶
func (f FieldDisplay) ToDisplayHTML(value FieldModel) template.HTML
func (FieldDisplay) ToDisplayString ¶
func (f FieldDisplay) ToDisplayString(value FieldModel) string
func (FieldDisplay) ToDisplayStringArray ¶
func (f FieldDisplay) ToDisplayStringArray(value FieldModel) []string
func (FieldDisplay) ToDisplayStringArrayArray ¶
func (f FieldDisplay) ToDisplayStringArrayArray(value FieldModel) [][]string
type FieldDotColor ¶
type FieldDotColor string
const ( FieldDotColorDanger FieldDotColor = "danger" FieldDotColorInfo FieldDotColor = "info" FieldDotColorPrimary FieldDotColor = "primary" FieldDotColorSuccess FieldDotColor = "success" )
type FieldFilterFn ¶
type FieldFilterFn func(value FieldModel) interface{}
FieldDisplay is filter function of data.
type FieldGetImgArrFn ¶
type FieldLabelParam ¶
type FieldList ¶
type FieldList []Field
func (FieldList) GetFieldByFieldName ¶
func (FieldList) GetFieldFilterProcessValue ¶
func (FieldList) GetFieldJoinTable ¶
type FieldModel ¶
type FieldModel struct { // The primaryKey of the table. ID string // The value of the single query result. Value string // The current row data. Row map[string]interface{} // Post type PostType PostType }
FieldModel is the single query result.
func (FieldModel) IsCreate ¶
func (m FieldModel) IsCreate() bool
func (FieldModel) IsUpdate ¶
func (m FieldModel) IsUpdate() bool
type FieldModelValue ¶
type FieldModelValue []string
func (FieldModelValue) First ¶
func (r FieldModelValue) First() string
func (FieldModelValue) Value ¶
func (r FieldModelValue) Value() string
type FieldOption ¶
type FieldOptions ¶
type FieldOptions []FieldOption
func (FieldOptions) Copy ¶
func (fo FieldOptions) Copy() FieldOptions
func (FieldOptions) Marshal ¶
func (fo FieldOptions) Marshal() string
func (FieldOptions) SetSelected ¶
func (fo FieldOptions) SetSelected(val interface{}, labels []template.HTML) FieldOptions
func (FieldOptions) SetSelectedLabel ¶
func (fo FieldOptions) SetSelectedLabel(labels []template.HTML) FieldOptions
type FieldProgressBarData ¶
type FilterFormField ¶
type FilterOperator ¶
type FilterOperator string
const ( FilterOperatorLike FilterOperator = "like" FilterOperatorGreater FilterOperator = ">" FilterOperatorGreaterOrEqual FilterOperator = ">=" FilterOperatorEqual FilterOperator = "=" FilterOperatorNotEqual FilterOperator = "!=" FilterOperatorLess FilterOperator = "<" FilterOperatorLessOrEqual FilterOperator = "<=" FilterOperatorFree FilterOperator = "free" )
func GetOperatorFromValue ¶
func GetOperatorFromValue(value string) FilterOperator
func (FilterOperator) AddOrNot ¶
func (o FilterOperator) AddOrNot() bool
func (FilterOperator) Label ¶
func (o FilterOperator) Label() template.HTML
func (FilterOperator) String ¶
func (o FilterOperator) String() string
func (FilterOperator) Valid ¶
func (o FilterOperator) Valid() bool
func (FilterOperator) Value ¶
func (o FilterOperator) Value() string
type FilterType ¶
type FormAttribute ¶
type FormAttribute interface { SetHeader(value template.HTML) FormAttribute SetContent(value FormFields) FormAttribute SetTabContents(value []FormFields) FormAttribute SetTabHeaders(value []string) FormAttribute SetPrefix(value string) FormAttribute SetUrl(value string) FormAttribute SetPrimaryKey(value string) FormAttribute SetHorizontal(value bool) FormAttribute SetId(id string) FormAttribute SetAjax(successJS, errorJS template.JS) FormAttribute SetHiddenFields(fields map[string]string) FormAttribute SetFieldsHTML(html template.HTML) FormAttribute SetMethod(value string) FormAttribute SetHeadWidth(width int) FormAttribute SetInputWidth(width int) FormAttribute SetTitle(value template.HTML) FormAttribute SetLayout(layout form.Layout) FormAttribute GetDefaultBoxHeader(hideBack bool) template.HTML GetDetailBoxHeader(editUrl, deleteUrl string) template.HTML GetBoxHeaderNoButton() template.HTML GetContent() template.HTML }
type FormField ¶
type FormField struct { Field string `json:"field"` FieldClass string `json:"field_class"` TypeName db.DatabaseType `json:"type_name"` Head string `json:"head"` Foot template.HTML `json:"foot"` FormType form2.Type `json:"form_type"` FatherFormType form2.Type `json:"father_form_type"` FatherField string `json:"father_field"` RowWidth int RowFlag uint8 Default template.HTML `json:"default"` DefaultArr interface{} `json:"default_arr"` Value template.HTML `json:"value"` Value2 string `json:"value_2"` ValueArr []string `json:"value_arr"` Value2Arr []string `json:"value_2_arr"` Options FieldOptions `json:"options"` OptionsArr []FieldOptions `json:"options_arr"` DefaultOptionDelimiter string `json:"default_option_delimiter"` Label template.HTML `json:"label"` HideLabel bool `json:"hide_label"` Placeholder string `json:"placeholder"` CustomContent template.HTML `json:"custom_content"` CustomJs template.JS `json:"custom_js"` CustomCss template.CSS `json:"custom_css"` Editable bool `json:"editable"` NotAllowEdit bool `json:"not_allow_edit"` NotAllowAdd bool `json:"not_allow_add"` DisplayButNotAdd bool `json:"display_but_not_add"` Must bool `json:"must"` Hide bool `json:"hide"` CreateHide bool `json:"create_hide"` EditHide bool `json:"edit_hide"` Width int `json:"width"` InputWidth int `json:"input_width"` HeadWidth int `json:"head_width"` Joins Joins `json:"-"` Divider bool `json:"divider"` DividerTitle string `json:"divider_title"` HelpMsg template.HTML `json:"help_msg"` TableFields FormFields Style template.HTMLAttr `json:"style"` NoIcon bool `json:"no_icon"` OptionExt template.JS `json:"option_ext"` OptionExt2 template.JS `json:"option_ext_2"` OptionInitFn OptionInitFn `json:"-"` OptionArrInitFn OptionArrInitFn `json:"-"` OptionTable OptionTable `json:"-"` FieldDisplay `json:"-"` PostFilterFn PostFieldFilterFn `json:"-"` }
FormField is the form field with different options.
func (*FormField) FillCustomContent ¶
func (*FormField) GetRawValue ¶
func (*FormField) UpdateDefaultValue ¶
type FormFields ¶
type FormFields []FormField
func (FormFields) Add ¶
func (f FormFields) Add(field *FormField) FormFields
func (FormFields) Copy ¶
func (f FormFields) Copy() FormFields
func (FormFields) FillCustomContent ¶
func (f FormFields) FillCustomContent() FormFields
func (FormFields) FindByFieldName ¶
func (f FormFields) FindByFieldName(field string) *FormField
func (FormFields) FindIndexByFieldName ¶
func (f FormFields) FindIndexByFieldName(field string) int
func (FormFields) FindTableChildren ¶
func (f FormFields) FindTableChildren(father string) []*FormField
func (FormFields) FindTableField ¶
func (f FormFields) FindTableField(field, father string) *FormField
func (FormFields) RemoveNotShow ¶
func (f FormFields) RemoveNotShow() FormFields
type FormPanel ¶
type FormPanel struct { FieldList FormFields `json:"field_list"` // Warn: may be deprecated in the future. `json:"" TabGroups TabGroups `json:"tab_groups"` TabHeaders TabHeaders `json:"tab_headers"` Table string `json:"table"` Title string `json:"title"` Description string `json:"description"` Validator FormPostFn `json:"validator"` PostHook FormPostFn `json:"post_hook"` PreProcessFn FormPreProcessFn `json:"pre_process_fn"` Callbacks Callbacks `json:"callbacks"` UpdateFn FormPostFn `json:"update_fn"` InsertFn FormPostFn `json:"insert_fn"` IsHideContinueEditCheckBox bool `json:"is_hide_continue_edit_check_box"` IsHideContinueNewCheckBox bool `json:"is_hide_continue_new_check_box"` IsHideResetButton bool `json:"is_hide_reset_button"` IsHideBackButton bool `json:"is_hide_back_button"` Layout form2.Layout `json:"layout"` HTMLContent template.HTML `json:"html_content"` Header template.HTML `json:"header"` InputWidth int `json:"input_width"` HeadWidth int `json:"head_width"` FormNewTitle template.HTML `json:"form_new_title"` FormNewBtnWord template.HTML `json:"form_new_btn_word"` FormEditTitle template.HTML `json:"form_edit_title"` FormEditBtnWord template.HTML `json:"form_edit_btn_word"` Ajax bool `json:"ajax"` AjaxSuccessJS template.JS `json:"ajax_success_js"` AjaxErrorJS template.JS `json:"ajax_error_js"` Responder Responder `json:"responder"` Wrapper ContentWrapper `json:"wrapper"` HideSideBar bool `json:"hide_side_bar"` HeaderHtml template.HTML `json:"header_html"` PageError errors.PageError `json:"page_error"` PageErrorHTML template.HTML `json:"page_error_html"` NoCompress bool `json:"no_compress"` // contains filtered or unexported fields }
FormPanel
func NewFormPanel ¶
func NewFormPanel() *FormPanel
func (*FormPanel) AddFieldTr ¶
func (*FormPanel) AddFieldWithTranslation ¶
func (*FormPanel) AddLimitFilter ¶
func (*FormPanel) AddRow ¶
func (f *FormPanel) AddRow(addFields AddFormFieldFn) *FormPanel
func (*FormPanel) AddSubstrFilter ¶
func (*FormPanel) AddTable ¶
func (f *FormPanel) AddTable(head, field string, addFields AddFormFieldFn) *FormPanel
func (*FormPanel) AddToLowerFilter ¶
func (*FormPanel) AddToTitleFilter ¶
func (*FormPanel) AddToUpperFilter ¶
func (*FormPanel) AddTrimSpaceFilter ¶
func (*FormPanel) AddXssFilter ¶
func (*FormPanel) AddXssJsFilter ¶
func (*FormPanel) EnableAjax ¶
func (*FormPanel) EnableAjaxData ¶
func (*FormPanel) FieldCustomContent ¶
func (*FormPanel) FieldDefault ¶
func (*FormPanel) FieldDefaultOptionDelimiter ¶
func (*FormPanel) FieldDisableWhenCreate ¶
FieldDisableWhenCreate means when create record the field can not be edited, displayed and submitted.
func (*FormPanel) FieldDisableWhenUpdate ¶
FieldDisableWhenUpdate means when update record the field can not be edited, displayed and submitted.
func (*FormPanel) FieldDisplay ¶
func (f *FormPanel) FieldDisplay(filter FieldFilterFn) *FormPanel
func (*FormPanel) FieldDisplayButCanNotEditWhenCreate ¶
FieldDisplayButCanNotEditWhenCreate means when create record the field can not be edited but will still be displayed and submitted.
func (*FormPanel) FieldDisplayButCanNotEditWhenUpdate ¶
FieldDisplayButCanNotEditWhenUpdate means when update record the field can not be edited but will still be displayed and submitted.
func (*FormPanel) FieldDivider ¶
func (*FormPanel) FieldEnableFileUpload ¶
func (*FormPanel) FieldHeadWidth ¶
func (*FormPanel) FieldHideLabel ¶
func (*FormPanel) FieldHideWhenCreate ¶
FieldHideWhenCreate means when create record the field can not be edited and displayed, but will be submitted.
func (*FormPanel) FieldHideWhenUpdate ¶
FieldHideWhenUpdate means when update record the field can not be edited and displayed, but will be submitted.
func (*FormPanel) FieldInputWidth ¶
func (*FormPanel) FieldLimit ¶
FieldLimit limit the field length.
func (*FormPanel) FieldNotAllowAdd ¶
FieldNotAllowAdd means when create record the field can not be edited, displayed and submitted. Deprecated: Use FieldDisableWhenCreate instead.
func (*FormPanel) FieldNotAllowEdit ¶
FieldNotAllowEdit means when update record the field can not be edited but will still be displayed and submitted. Deprecated: Use FieldDisplayButCanNotEditWhenUpdate instead.
func (*FormPanel) FieldNowWhenInsert ¶
func (*FormPanel) FieldNowWhenUpdate ¶
func (*FormPanel) FieldOnChoose ¶
FieldOnChoose set the given value of the given field when choose the value of val.
func (*FormPanel) FieldOnChooseAjax ¶
func (f *FormPanel) FieldOnChooseAjax(field, url string, handler Handler, custom ...template.HTML) *FormPanel
FieldOnChooseAjax set the url and handler that will be called when field be choosed. The handler will return the option of the field. It will help to link two or more form items. For example:
FieldOnChooseAjax("city", "/search/city", func(ctx *context.Context) (success bool, msg string, data interface{}) { return true, "ok", selection.Data{ Results: selection.Options{ {Text: "GuangZhou", ID: "1"}, {Text: "ShenZhen", ID: "2"}, {Text: "BeiJing", ID: "3"}, {Text: "ShangHai", ID: "4"}, } } })
When you choose the country, it trigger the action of ajax which be sent to the given handler, and return the city options to the field city.
func (*FormPanel) FieldOnChooseCustom ¶
FieldOnChooseCustom set the js that will be called when filter option be selected.
func (*FormPanel) FieldOnChooseDisable ¶
FieldOnChooseDisable disable the fields when value to be chosen.
func (*FormPanel) FieldOnChooseHide ¶
FieldOnChooseHide hide the fields when value to be chosen.
func (*FormPanel) FieldOnChooseMap ¶
FieldOnChooseMap set the actions that will be taken when filter option be selected. For example:
map[string]types.LinkField{ "men": {Field: "ip", Value:"127.0.0.1"}, "women": {Field: "ip", Hide: true}, "other": {Field: "ip", Disable: true} }
mean when choose men, the value of field ip will be set to 127.0.0.1, when choose women, field ip will be hidden, and when choose other, field ip will be disabled.
func (*FormPanel) FieldOnChooseOptionsHide ¶
FieldOnChooseOptionsHide display the fields when value to be chosen.
func (*FormPanel) FieldOnChooseOptionsShow ¶
FieldOnChooseOptionsShow display the fields when values to be chosen.
func (*FormPanel) FieldOnChooseShow ¶
FieldFilterOnChooseShow display the fields when value to be chosen.
func (*FormPanel) FieldOnSearch ¶
FieldOnSearch set the url and the corresponding handler which has some backend logic and return the options of the field. For example:
FieldOnSearch("/search/city", func(ctx *context.Context) (success bool, msg string, data interface{}) { return true, "ok", selection.Data{ Results: selection.Options{ {Text: "GuangZhou", ID: "1"}, {Text: "ShenZhen", ID: "2"}, {Text: "BeiJing", ID: "3"}, {Text: "ShangHai", ID: "4"}, } } }, 1000)
func (*FormPanel) FieldOptionExt ¶
FieldOptionExt set the option extension js of the field.
func (*FormPanel) FieldOptionExt2 ¶
func (*FormPanel) FieldOptionExtJS ¶
func (*FormPanel) FieldOptionExtJS2 ¶
func (*FormPanel) FieldOptionInitFn ¶
func (f *FormPanel) FieldOptionInitFn(fn OptionInitFn) *FormPanel
func (*FormPanel) FieldOptions ¶
func (f *FormPanel) FieldOptions(options FieldOptions) *FormPanel
FieldOptions set options for a filterable field to select. It will work when you set the FormType of the field to SelectSingle/Select/SelectBox.
func (*FormPanel) FieldOptionsFromTable ¶
func (f *FormPanel) FieldOptionsFromTable(table, textFieldName, valueFieldName string, process ...OptionTableQueryProcessFn) *FormPanel
FieldOptionsFromTable set options for a filterable field to select. The options is from other table. For example,
`FieldOptionsFromTable("roles", "name", "id")`
will generate the sql like:
`select id, name from roles`.
And the `id` will be the value of options, `name` is the text to be shown.
func (*FormPanel) FieldOptionsTableProcessFn ¶
func (f *FormPanel) FieldOptionsTableProcessFn(fn OptionProcessFn) *FormPanel
func (*FormPanel) FieldPlaceholder ¶
func (*FormPanel) FieldPostFilterFn ¶
func (f *FormPanel) FieldPostFilterFn(post PostFieldFilterFn) *FormPanel
func (*FormPanel) FieldRowWidth ¶
func (*FormPanel) FieldSubstr ¶
FieldSubstr intercept string of the field.
func (*FormPanel) FieldToLower ¶
FieldToLower update the field to a string with all Unicode letters mapped to their lower case.
func (*FormPanel) FieldToTitle ¶
FieldToTitle update the field to a string that begin words mapped to their Unicode title case.
func (*FormPanel) FieldToUpper ¶
FieldToUpper update the field to a string with all Unicode letters mapped to their upper case.
func (*FormPanel) FieldTrimSpace ¶
FieldTrimSpace trim space of the field.
func (*FormPanel) FieldValue ¶
func (*FormPanel) FieldWidth ¶
func (*FormPanel) FieldXssFilter ¶
FieldXssFilter escape field with html.Escape.
func (*FormPanel) FieldsWithDefaultValue ¶
func (f *FormPanel) FieldsWithDefaultValue(sql ...func() *db.SQL) FormFields
func (*FormPanel) FieldsWithValue ¶
func (*FormPanel) GetNewFormFields ¶
func (f *FormPanel) GetNewFormFields(sql ...func() *db.SQL) (FormFields, []FormFields, []string)
func (*FormPanel) GroupField ¶
func (f *FormPanel) GroupField(sql ...func() *db.SQL) ([]FormFields, []string)
func (*FormPanel) GroupFieldWithValue ¶
func (*FormPanel) HideBackButton ¶
func (*FormPanel) HideContinueEditCheckBox ¶
func (*FormPanel) HideContinueNewCheckBox ¶
func (*FormPanel) HideResetButton ¶
func (*FormPanel) OperationURL ¶
func (*FormPanel) Set400Error ¶
func (*FormPanel) Set403Error ¶
func (*FormPanel) Set404Error ¶
func (*FormPanel) Set500Error ¶
func (*FormPanel) SetAjaxSuccessJS ¶
func (*FormPanel) SetDescription ¶
func (*FormPanel) SetFooterHtml ¶
func (*FormPanel) SetFormEditBtnWord ¶
func (*FormPanel) SetFormEditTitle ¶
func (*FormPanel) SetFormNewBtnWord ¶
func (*FormPanel) SetFormNewTitle ¶
func (*FormPanel) SetHTMLContent ¶
func (*FormPanel) SetHeadWidth ¶
func (*FormPanel) SetHeaderHtml ¶
func (*FormPanel) SetHideSideBar ¶
func (*FormPanel) SetInputWidth ¶
func (*FormPanel) SetInsertFn ¶
func (f *FormPanel) SetInsertFn(fn FormPostFn) *FormPanel
func (*FormPanel) SetNoCompress ¶
func (*FormPanel) SetPostHook ¶
func (f *FormPanel) SetPostHook(fn FormPostFn) *FormPanel
func (*FormPanel) SetPostValidator ¶
func (f *FormPanel) SetPostValidator(va FormPostFn) *FormPanel
func (*FormPanel) SetPreProcessFn ¶
func (f *FormPanel) SetPreProcessFn(fn FormPreProcessFn) *FormPanel
func (*FormPanel) SetPrimaryKey ¶
func (f *FormPanel) SetPrimaryKey(name string, typ db.DatabaseType) *FormPanel
func (*FormPanel) SetResponder ¶
func (*FormPanel) SetTabGroups ¶
func (*FormPanel) SetTabHeaders ¶
func (*FormPanel) SetUpdateFn ¶
func (f *FormPanel) SetUpdateFn(fn FormPostFn) *FormPanel
func (*FormPanel) SetWrapper ¶
func (f *FormPanel) SetWrapper(wrapper ContentWrapper) *FormPanel
type FormPostFn ¶
type GetPanelFn ¶
type GroupFieldHeaders ¶
type GroupFieldHeaders []string
type GroupFormFields ¶
type GroupFormFields []FormFields
type ImgAttribute ¶
type ImgAttribute interface { SetWidth(value string) ImgAttribute SetHeight(value string) ImgAttribute WithModal() ImgAttribute SetSrc(value template.HTML) ImgAttribute GetContent() template.HTML }
type InfoPanel ¶
type InfoPanel struct { Ctx *context.Context FieldList FieldList Table string Title string Description string // Warn: may be deprecated future. TabGroups TabGroups TabHeaders TabHeaders Sort Sort SortField string PageSizeList []int DefaultPageSize int ExportType int ExportProcessFn ExportProcessFn IsHideNewButton bool IsHideExportButton bool IsHideEditButton bool IsHideDeleteButton bool IsHideDetailButton bool IsHideFilterButton bool IsHideRowSelector bool IsHidePagination bool IsHideFilterArea bool IsHideQueryInfo bool FilterFormLayout form.Layout FilterFormHeadWidth int FilterFormInputWidth int Wheres Wheres WhereRaws WhereRaw Callbacks Callbacks Buttons Buttons TableLayout string DeleteHook DeleteFn PreDeleteFn DeleteFn DeleteFn DeleteFn DeleteHookWithRes DeleteFnWithRes GetDataFn GetDataFn ActionButtons Buttons ActionButtonFold bool DisplayGeneratorRecords map[string]struct{} QueryFilterFn QueryFilterFn UpdateParametersFns []UpdateParametersFn Wrapper ContentWrapper // column operation buttons Action template.HTML HeaderHtml template.HTML PageError errors.PageError PageErrorHTML template.HTML NoCompress bool HideSideBar bool AutoRefresh uint // contains filtered or unexported fields }
InfoPanel
func (*InfoPanel) AddActionButton ¶
func (*InfoPanel) AddActionButtonFront ¶
func (*InfoPanel) AddActionIconButton ¶
func (*InfoPanel) AddButtonRaw ¶
func (*InfoPanel) AddColumn ¶
func (i *InfoPanel) AddColumn(head string, fun FieldFilterFn) *InfoPanel
func (*InfoPanel) AddColumnButtons ¶
func (*InfoPanel) AddField ¶
func (i *InfoPanel) AddField(head, field string, typeName db.DatabaseType) *InfoPanel
func (*InfoPanel) AddFieldTr ¶
func (*InfoPanel) AddFieldWithTranslation ¶
func (*InfoPanel) AddFilter ¶
func (i *InfoPanel) AddFilter(head, field string, typeName db.DatabaseType, fn UpdateParametersFn, filterType ...FilterType) *InfoPanel
func (*InfoPanel) AddLimitFilter ¶
func (*InfoPanel) AddSelectBox ¶
func (*InfoPanel) AddSubstrFilter ¶
func (*InfoPanel) AddToLowerFilter ¶
func (*InfoPanel) AddToTitleFilter ¶
func (*InfoPanel) AddToUpperFilter ¶
func (*InfoPanel) AddTrimSpaceFilter ¶
func (*InfoPanel) AddUpdateParametersFn ¶
func (i *InfoPanel) AddUpdateParametersFn(fn UpdateParametersFn) *InfoPanel
func (*InfoPanel) AddXssFilter ¶
func (*InfoPanel) AddXssJsFilter ¶
func (*InfoPanel) ExportValue ¶
func (*InfoPanel) FieldAsDeleteParam ¶
func (*InfoPanel) FieldAsDetailParam ¶
func (*InfoPanel) FieldAsEditParam ¶
func (*InfoPanel) FieldCarousel ¶
func (i *InfoPanel) FieldCarousel(fn FieldGetImgArrFn, size ...int) *InfoPanel
func (*InfoPanel) FieldCopyable ¶
func (*InfoPanel) FieldDisplay ¶
func (i *InfoPanel) FieldDisplay(filter FieldFilterFn) *InfoPanel
func (*InfoPanel) FieldDot ¶
func (i *InfoPanel) FieldDot(icons map[string]FieldDotColor, defaultDot FieldDotColor) *InfoPanel
func (*InfoPanel) FieldDownLoadable ¶
func (*InfoPanel) FieldEditAble ¶
func (*InfoPanel) FieldEditOptions ¶
func (i *InfoPanel) FieldEditOptions(options FieldOptions, extra ...map[string]string) *InfoPanel
func (*InfoPanel) FieldFileSize ¶
func (*InfoPanel) FieldFilterOnChoose ¶
FieldFilterOnChoose set the given value of the given field when choose the value of val.
func (*InfoPanel) FieldFilterOnChooseAjax ¶
FieldFilterOnChooseAjax set the url and handler that will be called when field be choosed. The handler will return the option of the field. It will help to link two or more form items. For example:
FieldFilterOnChooseAjax("city", "/search/city", func(ctx *context.Context) (success bool, msg string, data interface{}) { return true, "ok", selection.Data{ Results: selection.Options{ {Text: "GuangZhou", ID: "1"}, {Text: "ShenZhen", ID: "2"}, {Text: "BeiJing", ID: "3"}, {Text: "ShangHai", ID: "4"}, } } })
When you choose the country, it trigger the action of ajax which be sent to the given handler, and return the city options to the field city.
func (*InfoPanel) FieldFilterOnChooseCustom ¶
FieldFilterOnChooseCustom set the js that will be called when filter option be selected.
func (*InfoPanel) FieldFilterOnChooseDisable ¶
FieldFilterOnChooseDisable disable the fields when value to be chosen.
func (*InfoPanel) FieldFilterOnChooseHide ¶
FieldFilterOnChooseHide hide the fields when value to be chosen.
func (*InfoPanel) FieldFilterOnChooseMap ¶
FieldFilterOnChooseMap set the actions that will be taken when filter option be selected. For example:
map[string]types.LinkField{ "men": {Field: "ip", Value:"127.0.0.1"}, "women": {Field: "ip", Hide: true}, "other": {Field: "ip", Disable: true} }
mean when choose men, the value of field ip will be set to 127.0.0.1, when choose women, field ip will be hidden, and when choose other, field ip will be disabled.
func (*InfoPanel) FieldFilterOnChooseShow ¶
FieldFilterOnChooseShow display the fields when value to be chosen.
func (*InfoPanel) FieldFilterOnSearch ¶
FieldFilterOnSearch set the url and the corresponding handler which has some backend logic and return the options of the field. For example:
FieldFilterOnSearch("/search/city", func(ctx *context.Context) (success bool, msg string, data interface{}) { return true, "ok", selection.Data{ Results: selection.Options{ {Text: "GuangZhou", ID: "1"}, {Text: "ShenZhen", ID: "2"}, {Text: "BeiJing", ID: "3"}, {Text: "ShangHai", ID: "4"}, } } }, 1000)
func (*InfoPanel) FieldFilterOptionExt ¶
FieldFilterOptionExt set the option extension js of the field.
func (*InfoPanel) FieldFilterOptions ¶
func (i *InfoPanel) FieldFilterOptions(options FieldOptions) *InfoPanel
FieldFilterOptions set options for a filterable field to select. It will work when you set the FormType of the field to SelectSingle/Select/SelectBox.
func (*InfoPanel) FieldFilterOptionsFromTable ¶
func (i *InfoPanel) FieldFilterOptionsFromTable(table, textFieldName, valueFieldName string, process ...OptionTableQueryProcessFn) *InfoPanel
FieldFilterOptionsFromTable set options for a filterable field to select. The options is from other table. For example,
`FieldFilterOptionsFromTable("roles", "name", "id")`
will generate the sql like:
`select id, name from roles`.
And the `id` will be the value of options, `name` is the text to be shown.
func (*InfoPanel) FieldFilterProcess ¶
FieldFilterProcess process the field content. For example:
FieldFilterProcess(func(val string) string { return val + "ms" })
func (*InfoPanel) FieldFilterable ¶
func (i *InfoPanel) FieldFilterable(filterType ...FilterType) *InfoPanel
FieldFilterable set a field filterable which will display in the filter box.
func (*InfoPanel) FieldFixed ¶
func (*InfoPanel) FieldHideForList ¶
FieldHide hide field for only the table.
func (*InfoPanel) FieldImage ¶
func (*InfoPanel) FieldJoin ¶
FieldJoin gets the field of the concatenated table.
Join { BaseTable: "users", Field: "role_id", Table: "roles", JoinField: "id", }
It will generate the join table sql like:
select ... from users left join roles on roles.id = users.role_id
func (*InfoPanel) FieldLabel ¶
func (i *InfoPanel) FieldLabel(args ...FieldLabelParam) *InfoPanel
func (*InfoPanel) FieldLimit ¶
FieldLimit limit the field length.
func (*InfoPanel) FieldLoading ¶
func (*InfoPanel) FieldProgressBar ¶
func (i *InfoPanel) FieldProgressBar(data ...FieldProgressBarData) *InfoPanel
func (*InfoPanel) FieldQrcode ¶
func (*InfoPanel) FieldSortable ¶
func (*InfoPanel) FieldSubstr ¶
FieldSubstr intercept string of the field.
func (*InfoPanel) FieldToLower ¶
FieldToLower update the field to a string with all Unicode letters mapped to their lower case.
func (*InfoPanel) FieldToTitle ¶
FieldToTitle update the field to a string that begin words mapped to their Unicode title case.
func (*InfoPanel) FieldToUpper ¶
FieldToUpper update the field to a string with all Unicode letters mapped to their upper case.
func (*InfoPanel) FieldTrimSpace ¶
FieldTrimSpace trim space of the field.
func (*InfoPanel) FieldWidth ¶
func (*InfoPanel) FieldXssFilter ¶
FieldXssFilter escape field with html.Escape.
func (*InfoPanel) GetPageSizeList ¶
func (*InfoPanel) HideCheckBoxColumn ¶
func (*InfoPanel) HideColumn ¶
func (*InfoPanel) HideDeleteButton ¶
func (*InfoPanel) HideDetailButton ¶
func (*InfoPanel) HideEditButton ¶
func (*InfoPanel) HideExportButton ¶
func (*InfoPanel) HideFilterArea ¶
func (*InfoPanel) HideFilterButton ¶
func (*InfoPanel) HideNewButton ¶
func (*InfoPanel) HidePagination ¶
func (*InfoPanel) HideQueryInfo ¶
func (*InfoPanel) HideRowSelector ¶
func (*InfoPanel) IsExportValue ¶
func (*InfoPanel) OperationURL ¶
OperationURL get the operation api url.
func (*InfoPanel) Set400Error ¶
func (*InfoPanel) Set403Error ¶
func (*InfoPanel) Set404Error ¶
func (*InfoPanel) Set500Error ¶
func (*InfoPanel) SetActionButtonFold ¶
func (*InfoPanel) SetAutoRefresh ¶
func (*InfoPanel) SetDefaultPageSize ¶
func (*InfoPanel) SetDeleteFn ¶
func (*InfoPanel) SetDeleteHook ¶
func (*InfoPanel) SetDeleteHookWithRes ¶
func (i *InfoPanel) SetDeleteHookWithRes(fn DeleteFnWithRes) *InfoPanel
func (*InfoPanel) SetDescription ¶
func (*InfoPanel) SetExportProcessFn ¶
func (i *InfoPanel) SetExportProcessFn(fn ExportProcessFn) *InfoPanel
func (*InfoPanel) SetFilterFormHeadWidth ¶
func (*InfoPanel) SetFilterFormInputWidth ¶
func (*InfoPanel) SetFilterFormLayout ¶
func (*InfoPanel) SetFooterHtml ¶
func (*InfoPanel) SetGetDataFn ¶
func (*InfoPanel) SetHeaderHtml ¶
func (*InfoPanel) SetHideSideBar ¶
func (*InfoPanel) SetNoCompress ¶
func (*InfoPanel) SetPageSizeList ¶
func (*InfoPanel) SetPreDeleteFn ¶
func (*InfoPanel) SetPrimaryKey ¶
func (i *InfoPanel) SetPrimaryKey(name string, typ db.DatabaseType) *InfoPanel
func (*InfoPanel) SetQueryFilterFn ¶
func (i *InfoPanel) SetQueryFilterFn(fn QueryFilterFn) *InfoPanel
func (*InfoPanel) SetSortAsc ¶
func (*InfoPanel) SetSortDesc ¶
func (*InfoPanel) SetSortField ¶
func (*InfoPanel) SetTabGroups ¶
func (*InfoPanel) SetTabHeaders ¶
func (*InfoPanel) SetTableFixed ¶
func (*InfoPanel) SetWrapper ¶
func (i *InfoPanel) SetWrapper(wrapper ContentWrapper) *InfoPanel
type Join ¶
Join store join table info. For example:
Join { BaseTable: "users", Field: "role_id", Table: "roles", JoinField: "id", }
It will generate the join table sql like:
... left join roles on roles.id = users.role_id ...
func (Join) GetTableName ¶
type LabelAttribute ¶
type LabelAttribute interface { SetContent(value template.HTML) LabelAttribute SetColor(value template.HTML) LabelAttribute SetType(value string) LabelAttribute GetContent() template.HTML }
type LinkAttribute ¶
type LinkAttribute interface { OpenInNewTab() LinkAttribute SetURL(value string) LinkAttribute SetAttributes(attr template.HTMLAttr) LinkAttribute SetClass(class template.HTML) LinkAttribute NoPjax() LinkAttribute SetTabTitle(value template.HTML) LinkAttribute SetContent(value template.HTML) LinkAttribute GetContent() template.HTML }
type NavDropDownButton ¶
type NavDropDownButton struct {}
func GetDropDownButton ¶
func GetDropDownButton(title template.HTML, icon string, items []*NavDropDownItemButton, names ...string) *NavDropDownButton
func (*NavDropDownButton) AddItem ¶
func (n *NavDropDownButton) AddItem(item *NavDropDownItemButton)
func (*NavDropDownButton) SetItems ¶
func (n *NavDropDownButton) SetItems(items []*NavDropDownItemButton)
type NavDropDownItemButton ¶
type NavDropDownItemButton struct {
}func GetDropDownItemButton ¶
func GetDropDownItemButton(title template.HTML, action Action, names ...string) *NavDropDownItemButton
type NewPageParam ¶
type NewPageParam struct { User models.UserModel Menu *menu.Menu UpdateMenu bool Panel Panel Logo template.HTML Assets template.HTML Buttons Buttons Iframe bool TmplHeadHTML template.HTML TmplFootJS template.HTML }
func (*NewPageParam) NavButtonsAndJS ¶
type NilAction ¶
type NilAction struct{}
func (*NilAction) BtnAttribute ¶
func (*NilAction) FooterContent ¶
func (*NilAction) GetCallbacks ¶
func (*NilAction) SetBtnData ¶
func (def *NilAction) SetBtnData(data interface{})
type OptionArrInitFn ¶
type OptionArrInitFn func(val FieldModel) []FieldOptions
type OptionInitFn ¶
type OptionInitFn func(val FieldModel) FieldOptions
type OptionProcessFn ¶
type OptionProcessFn func(options FieldOptions) FieldOptions
type OptionTable ¶
type OptionTable struct { Table string TextField string ValueField string QueryProcessFn OptionTableQueryProcessFn ProcessFn OptionProcessFn }
type Page ¶
type Page struct { // User is the login user. User models.UserModel // Menu is the left side menu of the template. Menu menu.Menu // Panel is the main content of template. Panel Panel // System contains some system info. System SystemInfo // UrlPrefix is the prefix of url. UrlPrefix string // Title is the title of the web page. Title string // Logo is the logo of the template. Logo template.HTML // MiniLogo is the downsizing logo of the template. MiniLogo template.HTML // ColorScheme is the color scheme of the template. ColorScheme string // IndexUrl is the home page url of the site. IndexUrl string // AssetUrl is the cdn link of assets CdnUrl string // Custom html in the tag head. CustomHeadHtml template.HTML // Custom html after body. CustomFootHtml template.HTML TmplHeadHTML template.HTML TmplFootJS template.HTML // Components assets AssetsList template.HTML FooterInfo template.HTML // Load as Iframe or not Iframe bool // Whether update menu or not UpdateMenu bool // contains filtered or unexported fields }
Page used in the template as a top variable.
func NewPagePanel ¶
type PaginatorAttribute ¶
type PaginatorAttribute interface { SetCurPageStartIndex(value string) PaginatorAttribute SetCurPageEndIndex(value string) PaginatorAttribute SetTotal(value string) PaginatorAttribute SetPreviousClass(value string) PaginatorAttribute SetPreviousUrl(value string) PaginatorAttribute SetPages(value []map[string]string) PaginatorAttribute SetPageSizeList(value []string) PaginatorAttribute SetNextClass(value string) PaginatorAttribute SetNextUrl(value string) PaginatorAttribute SetOption(value map[string]template.HTML) PaginatorAttribute SetUrl(value string) PaginatorAttribute SetExtraInfo(value template.HTML) PaginatorAttribute SetEntriesInfo(value template.HTML) PaginatorAttribute GetContent() template.HTML }
type Panel ¶
type Panel struct { Title template.HTML Description template.HTML Content template.HTML CSS template.CSS JS template.JS Url string // Whether to toggle the sidebar MiniSidebar bool // Auto refresh page switch. AutoRefresh bool // Refresh page intervals, the unit is second. RefreshInterval []int Callbacks Callbacks }
Panel contains the main content of the template which used as pjax.
func (Panel) AddComponent ¶
func (Panel) GetContent ¶
type PopupAttribute ¶
type PopupAttribute interface { SetID(value string) PopupAttribute SetTitle(value template.HTML) PopupAttribute SetDraggable() PopupAttribute SetWidth(width string) PopupAttribute SetHeight(height string) PopupAttribute SetBody(value template.HTML) PopupAttribute SetSize(value string) PopupAttribute GetContent() template.HTML }
type PostFieldFilterFn ¶
type PostFieldFilterFn func(value PostFieldModel) interface{}
PostFieldFilterFn is filter function of data.
type PostFieldModel ¶
type PostFieldModel struct { ID string Value FieldModelValue Row map[string]string // Post type PostType PostType }
PostFieldModel contains ID and value of the single query result and the current row data.
func (PostFieldModel) IsCreate ¶
func (m PostFieldModel) IsCreate() bool
func (PostFieldModel) IsUpdate ¶
func (m PostFieldModel) IsUpdate() bool
type QueryFilterFn ¶
type QueryFilterFn func(param parameter.Parameters, conn db.Connection) (ids []string, stopQuery bool)
type RowAttribute ¶
type RowAttribute interface { SetContent(value template.HTML) RowAttribute AddContent(value template.HTML) RowAttribute GetContent() template.HTML }
type SystemInfo ¶
SystemInfo contains basic info of system.
type TabHeaders ¶
type TabHeaders []string
func (TabHeaders) Add ¶
func (t TabHeaders) Add(header string) TabHeaders
type TableAttribute ¶
type TableAttribute interface { SetThead(value Thead) TableAttribute SetInfoList(value []map[string]InfoItem) TableAttribute SetType(value string) TableAttribute SetName(name string) TableAttribute SetMinWidth(value string) TableAttribute SetHideThead() TableAttribute SetSticky(sticky bool) TableAttribute SetLayout(value string) TableAttribute SetStyle(style string) TableAttribute GetContent() template.HTML }
type TableRowData ¶
type TabsAttribute ¶
type TreeAttribute ¶
type TreeAttribute interface { SetTree(value []menu.Item) TreeAttribute SetEditUrl(value string) TreeAttribute SetOrderUrl(value string) TreeAttribute SetUrlPrefix(value string) TreeAttribute SetDeleteUrl(value string) TreeAttribute GetContent() template.HTML GetTreeHeader() template.HTML }
type TreeViewAttribute ¶
type TreeViewAttribute interface { SetTree(value TreeViewData) TreeViewAttribute SetUrlPrefix(value string) TreeViewAttribute SetID(id string) TreeViewAttribute GetContent() template.HTML }
type TreeViewData ¶
type TreeViewData struct { Data TreeViewItems `json:"data,omitempty"` Levels int `json:"levels,omitempty"` BackColor string `json:"backColor,omitempty"` BorderColor string `json:"borderColor,omitempty"` CheckedIcon string `json:"checkedIcon,omitempty"` CollapseIcon string `json:"collapseIcon,omitempty"` Color string `json:"color,omitempty"` EmptyIcon string `json:"emptyIcon,omitempty"` EnableLinks bool `json:"enableLinks,omitempty"` ExpandIcon string `json:"expandIcon,omitempty"` MultiSelect bool `json:"multiSelect,omitempty"` NodeIcon string `json:"nodeIcon,omitempty"` OnhoverColor string `json:"onhoverColor,omitempty"` SelectedIcon string `json:"selectedIcon,omitempty"` SearchResultColor string `json:"searchResultColor,omitempty"` SelectedBackColor string `json:"selectedBackColor,omitempty"` SelectedColor string `json:"selectedColor,omitempty"` ShowBorder bool `json:"showBorder,omitempty"` ShowCheckbox bool `json:"showCheckbox,omitempty"` ShowIcon bool `json:"showIcon,omitempty"` ShowTags bool `json:"showTags,omitempty"` UncheckedIcon string `json:"uncheckedIcon,omitempty"` SearchResultBackColor string `json:"searchResultBackColor,omitempty"` HighlightSearchResults bool `json:"highlightSearchResults,omitempty"` }
type TreeViewItem ¶
type TreeViewItem struct { Text string `json:"text,omitempty"` Icon string `json:"icon,omitempty"` SelectedIcon string `json:"selected_icon,omitempty"` Color string `json:"color,omitempty"` BackColor string `json:"backColor,omitempty"` Href string `json:"href,omitempty"` Selectable bool `json:"selectable,omitempty"` State TreeViewItemState `json:"state,omitempty"` Tags []string `json:"tags,omitempty"` Nodes TreeViewItems `json:"nodes,omitempty"` }
type TreeViewItemState ¶
type TreeViewItems ¶
type TreeViewItems []TreeViewItem
type UpdateParametersFn ¶
type UpdateParametersFn func(param *parameter.Parameters)