Documentation
¶
Index ¶
- Constants
- Variables
- func AddGlobalDisplayProcessFn(f DisplayProcessFn)
- type Action
- type AlertAttribute
- type Attribute
- type BoxAttribute
- type Button
- type ButtonAttribute
- type Buttons
- type ColAttribute
- type DataTableAttribute
- type DeleteFn
- type DisplayProcessFn
- 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 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) ToDisplay(value FieldModel) interface{}
- type FieldFilterFn
- type FieldList
- type FieldModel
- type FieldModelValue
- type FieldOptions
- type FilterOperator
- type FilterType
- type FormAttribute
- type FormField
- type FormFields
- type FormPanel
- func (f *FormPanel) AddField(head, field string, filedType db.DatabaseType, formType form2.Type) *FormPanel
- func (f *FormPanel) AddLimitFilter(limit int) *FormPanel
- func (f *FormPanel) AddSubstrFilter(start int, end int) *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) 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) FieldDisplay(filter FieldFilterFn) *FormPanel
- func (f *FormPanel) FieldFormType(formType form2.Type) *FormPanel
- func (f *FormPanel) FieldHelpMsg(s template.HTML) *FormPanel
- func (f *FormPanel) FieldHide() *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) FieldOptionExt(m map[string]interface{}) *FormPanel
- func (f *FormPanel) FieldOptions(options []map[string]string) *FormPanel
- func (f *FormPanel) FieldPostFilterFn(post PostFieldFilterFn) *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) FieldXssFilter() *FormPanel
- func (f *FormPanel) SetDescription(desc string) *FormPanel
- func (f *FormPanel) SetFooterHtml(footer template.HTML) *FormPanel
- func (f *FormPanel) SetHeaderHtml(header template.HTML) *FormPanel
- func (f *FormPanel) SetInsertFn(po FormPostFn) *FormPanel
- func (f *FormPanel) SetPostHook(po FormPostFn) *FormPanel
- func (f *FormPanel) SetPostValidator(va FormPostFn) *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(po FormPostFn) *FormPanel
- type FormPostFn
- type GetPanelFn
- type ImgAttribute
- type InfoPanel
- func (i *InfoPanel) AddButton(title template.HTML, icon string, action Action, color ...template.HTML) *InfoPanel
- func (i *InfoPanel) AddField(head, field string, typeName db.DatabaseType) *InfoPanel
- func (i *InfoPanel) AddLimitFilter(limit int) *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) AddXssFilter() *InfoPanel
- func (i *InfoPanel) AddXssJsFilter() *InfoPanel
- func (i *InfoPanel) FieldDisplay(filter FieldFilterFn) *InfoPanel
- func (i *InfoPanel) FieldEditAble(editType ...table.Type) *InfoPanel
- func (i *InfoPanel) FieldEditOptions(options []map[string]string) *InfoPanel
- func (i *InfoPanel) FieldFilterOptionExt(m map[string]interface{}) *InfoPanel
- func (i *InfoPanel) FieldFilterOptions(options []map[string]string) *InfoPanel
- func (i *InfoPanel) FieldFilterable(filterType ...FilterType) *InfoPanel
- func (i *InfoPanel) FieldFixed() *InfoPanel
- func (i *InfoPanel) FieldHide() *InfoPanel
- func (i *InfoPanel) FieldJoin(join Join) *InfoPanel
- func (i *InfoPanel) FieldLimit(limit int) *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) HideDeleteButton() *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) HideRowSelector() *InfoPanel
- func (i *InfoPanel) SetAction(action template.HTML) *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) SetDescription(desc string) *InfoPanel
- func (i *InfoPanel) SetFilterFormLayout(layout form.Layout) *InfoPanel
- func (i *InfoPanel) SetFooterHtml(footer template.HTML) *InfoPanel
- func (i *InfoPanel) SetHeaderHtml(header template.HTML) *InfoPanel
- func (i *InfoPanel) SetPageSizeList(pageSizeList []int) *InfoPanel
- func (i *InfoPanel) SetPreDeleteFn(fn DeleteFn) *InfoPanel
- func (i *InfoPanel) SetSortAsc() *InfoPanel
- func (i *InfoPanel) SetSortDesc() *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) SetTitle(title string) *InfoPanel
- func (i *InfoPanel) Where(field string, operator string, arg interface{}) *InfoPanel
- type Join
- type LabelAttribute
- type Page
- type PaginatorAttribute
- type Panel
- type PopupAttribute
- type PostFieldFilterFn
- type PostFieldModel
- type RowAttribute
- type Sort
- type SystemInfo
- type TabGroups
- type TabHeaders
- type TableAttribute
- type TabsAttribute
- type TreeAttribute
- type Where
Constants ¶
View Source
const DefaultPageSize = 10
Variables ¶
View Source
var DefaultPageSizeList = []int{10, 20, 30, 50, 100}
Functions ¶
func AddGlobalDisplayProcessFn ¶ added in v1.0.7
func AddGlobalDisplayProcessFn(f DisplayProcessFn)
Types ¶
type AlertAttribute ¶
type AlertAttribute interface {
SetTheme(value string) AlertAttribute
SetTitle(value template.HTML) AlertAttribute
SetContent(value template.HTML) AlertAttribute
GetContent() template.HTML
}
type Attribute ¶
Attribute is the component interface of template. Every component of template should implement it.
type BoxAttribute ¶
type BoxAttribute interface {
SetHeader(value template.HTML) BoxAttribute
SetBody(value template.HTML) BoxAttribute
SetNoPadding() BoxAttribute
SetTitle(value template.HTML) BoxAttribute
WithHeadBorder() BoxAttribute
SetHeadColor(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 Button ¶ added in v1.1.0
type ButtonAttribute ¶ added in v1.1.2
type ButtonAttribute interface {
SetContent(value template.HTML) ButtonAttribute
SetOrientationRight() ButtonAttribute
SetOrientationLeft() ButtonAttribute
SetMarginLeft(int) ButtonAttribute
SetMarginRight(int) ButtonAttribute
SetThemePrimary() ButtonAttribute
SetSmallSize() 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 ColAttribute ¶
type ColAttribute interface {
SetSize(value map[string]string) ColAttribute
SetContent(value template.HTML) ColAttribute
AddContent(value template.HTML) ColAttribute
GetContent() template.HTML
}
type DataTableAttribute ¶
type DataTableAttribute interface {
GetDataTableHeader() template.HTML
SetThead(value []map[string]string) DataTableAttribute
SetInfoList(value []map[string]template.HTML) DataTableAttribute
SetEditUrl(value string) DataTableAttribute
SetDeleteUrl(value string) DataTableAttribute
SetNewUrl(value string) DataTableAttribute
SetPrimaryKey(value string) DataTableAttribute
SetAction(action template.HTML) DataTableAttribute
SetIsTab(value bool) DataTableAttribute
SetButtons(btns template.HTML) DataTableAttribute
SetHideFilterArea(value bool) DataTableAttribute
SetActionJs(aj template.JS) DataTableAttribute
SetInfoUrl(value string) DataTableAttribute
SetHasFilter(hasFilter bool) DataTableAttribute
SetExportUrl(value string) DataTableAttribute
SetUpdateUrl(value string) DataTableAttribute
GetContent() template.HTML
}
type DisplayProcessFn ¶ added in v1.0.0
type DisplayProcessFnChains ¶ added in v1.0.0
type DisplayProcessFnChains []DisplayProcessFn
func AddLimit ¶ added in v1.0.7
func AddLimit(limit int) DisplayProcessFnChains
func AddSubstr ¶ added in v1.0.7
func AddSubstr(start int, end int) DisplayProcessFnChains
func AddToLower ¶ added in v1.0.7
func AddToLower() DisplayProcessFnChains
func AddToTitle ¶ added in v1.0.7
func AddToTitle() DisplayProcessFnChains
func AddToUpper ¶ added in v1.0.7
func AddToUpper() DisplayProcessFnChains
func AddTrimSpace ¶ added in v1.0.7
func AddTrimSpace() DisplayProcessFnChains
func AddXssFilter ¶ added in v1.0.7
func AddXssFilter() DisplayProcessFnChains
func AddXssJsFilter ¶ added in v1.0.7
func AddXssJsFilter() DisplayProcessFnChains
func (DisplayProcessFnChains) Add ¶ added in v1.0.0
func (d DisplayProcessFnChains) Add(f DisplayProcessFn) DisplayProcessFnChains
func (DisplayProcessFnChains) Append ¶ added in v1.0.9
func (d DisplayProcessFnChains) Append(f DisplayProcessFnChains) DisplayProcessFnChains
func (DisplayProcessFnChains) Copy ¶ added in v1.0.7
func (d DisplayProcessFnChains) Copy() DisplayProcessFnChains
func (DisplayProcessFnChains) Valid ¶ added in v1.0.0
func (d DisplayProcessFnChains) Valid() bool
type Field ¶ added in v1.0.0
type Field struct {
Head string
Field string
TypeName db.DatabaseType
Join Join
Width int
Sortable bool
EditAble bool
Fixed bool
Filterable bool
Hide bool
EditType table.Type
EditOptions []map[string]string
FilterType form.Type
FilterOptions FieldOptions
FilterOperator FilterOperator
FilterOptionExt template.JS
FilterHead string
FilterHelpMsg template.HTML
FieldDisplay
}
Field is the table field.
func (Field) GetEditOptions ¶ added in v1.0.8
type FieldDisplay ¶ added in v1.0.0
type FieldDisplay struct {
Display FieldFilterFn
DisplayProcessChains DisplayProcessFnChains
}
func (FieldDisplay) AddLimit ¶ added in v1.0.0
func (f FieldDisplay) AddLimit(limit int) DisplayProcessFnChains
func (FieldDisplay) AddSubstr ¶ added in v1.0.0
func (f FieldDisplay) AddSubstr(start int, end int) DisplayProcessFnChains
func (FieldDisplay) AddToLower ¶ added in v1.0.0
func (f FieldDisplay) AddToLower() DisplayProcessFnChains
func (FieldDisplay) AddToTitle ¶ added in v1.0.0
func (f FieldDisplay) AddToTitle() DisplayProcessFnChains
func (FieldDisplay) AddToUpper ¶ added in v1.0.0
func (f FieldDisplay) AddToUpper() DisplayProcessFnChains
func (FieldDisplay) AddTrimSpace ¶ added in v1.0.0
func (f FieldDisplay) AddTrimSpace() DisplayProcessFnChains
func (FieldDisplay) ToDisplay ¶ added in v1.0.0
func (f FieldDisplay) ToDisplay(value FieldModel) interface{}
type FieldFilterFn ¶ added in v1.0.0
type FieldFilterFn func(value FieldModel) interface{}
FieldDisplay is filter function of data.
type FieldList ¶ added in v1.1.4
type FieldList []Field
func (FieldList) GetFieldByFieldName ¶ added in v1.1.4
type FieldModel ¶ added in v1.0.0
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{}
}
FieldModel is the single query result.
type FieldModelValue ¶ added in v1.0.0
type FieldModelValue []string
func (FieldModelValue) First ¶ added in v1.0.0
func (r FieldModelValue) First() string
func (FieldModelValue) Value ¶ added in v1.0.0
func (r FieldModelValue) Value() string
type FieldOptions ¶ added in v1.0.9
func (FieldOptions) SetSelected ¶ added in v1.0.9
func (fo FieldOptions) SetSelected(val interface{}, labels []string) FieldOptions
type FilterOperator ¶ added in v1.1.2
type FilterOperator string
const ( FilterOperatorLike FilterOperator = "like" FilterOperatorGreater FilterOperator = ">" FilterOperatorGreaterOrEqual FilterOperator = ">=" FilterOperatorEqual FilterOperator = "=" FilterOperatorNotEqual FilterOperator = "!=" FilterOperatorLess FilterOperator = "<" FilterOperatorLessOrEqual FilterOperator = "<=" FilterOperatorFree FilterOperator = "free" )
func GetOperatorFromValue ¶ added in v1.1.2
func GetOperatorFromValue(value string) FilterOperator
func (FilterOperator) AddOrNot ¶ added in v1.1.2
func (o FilterOperator) AddOrNot() bool
func (FilterOperator) Label ¶ added in v1.1.2
func (o FilterOperator) Label() template.HTML
func (FilterOperator) String ¶ added in v1.1.2
func (o FilterOperator) String() string
func (FilterOperator) Valid ¶ added in v1.1.2
func (o FilterOperator) Valid() bool
func (FilterOperator) Value ¶ added in v1.1.2
func (o FilterOperator) Value() string
type FilterType ¶ added in v1.1.2
type FormAttribute ¶
type FormAttribute interface {
SetHeader(value template.HTML) FormAttribute
SetContent(value []FormField) FormAttribute
SetTabContents(value [][]FormField) FormAttribute
SetTabHeaders(value []string) FormAttribute
SetPrefix(value string) FormAttribute
SetUrl(value string) FormAttribute
SetPrimaryKey(value string) FormAttribute
SetInfoUrl(value string) FormAttribute
SetMethod(value string) FormAttribute
SetTitle(value template.HTML) FormAttribute
SetLayout(layout form.Layout) FormAttribute
SetToken(value string) FormAttribute
GetBoxHeader() template.HTML
GetBoxHeaderNoButton() template.HTML
GetContent() template.HTML
}
type FormField ¶ added in v1.0.0
type FormField struct {
Field string
TypeName db.DatabaseType
Head string
FormType form2.Type
Default string
Value string
Value2 string
Options FieldOptions
DefaultOptionDelimiter string
Label template.HTML
CustomContent template.HTML
CustomJs template.JS
CustomCss template.CSS
Editable bool
NotAllowAdd bool
Must bool
Hide bool
HelpMsg template.HTML
OptionExt template.JS
FieldDisplay
PostFilterFn PostFieldFilterFn
}
FormField is the form field with different options.
type FormFields ¶ added in v1.0.0
type FormFields []FormField
func (FormFields) Copy ¶ added in v1.0.0
func (f FormFields) Copy() FormFields
func (FormFields) FindByFieldName ¶ added in v1.0.0
func (f FormFields) FindByFieldName(field string) FormField
type FormPanel ¶
type FormPanel struct {
FieldList FormFields
// Warn: may be deprecated in the future.
TabGroups TabGroups
TabHeaders TabHeaders
Table string
Title string
Description string
Validator FormPostFn
PostHook FormPostFn
UpdateFn FormPostFn
InsertFn FormPostFn
HeaderHtml template.HTML
// contains filtered or unexported fields
}
FormPanel
func NewFormPanel ¶ added in v1.0.0
func NewFormPanel() *FormPanel
func (*FormPanel) AddLimitFilter ¶ added in v1.0.9
func (*FormPanel) AddSubstrFilter ¶ added in v1.0.9
func (*FormPanel) AddToLowerFilter ¶ added in v1.0.9
func (*FormPanel) AddToTitleFilter ¶ added in v1.0.9
func (*FormPanel) AddToUpperFilter ¶ added in v1.0.9
func (*FormPanel) AddTrimSpaceFilter ¶ added in v1.0.9
func (*FormPanel) AddXssFilter ¶ added in v1.0.9
func (*FormPanel) AddXssJsFilter ¶ added in v1.0.9
func (*FormPanel) FieldCustomContent ¶ added in v1.0.6
func (*FormPanel) FieldCustomCss ¶ added in v1.0.6
func (*FormPanel) FieldCustomJs ¶ added in v1.0.6
func (*FormPanel) FieldDefault ¶ added in v1.0.1
func (*FormPanel) FieldDefaultOptionDelimiter ¶ added in v1.0.0
func (*FormPanel) FieldDisplay ¶ added in v1.0.0
func (f *FormPanel) FieldDisplay(filter FieldFilterFn) *FormPanel
func (*FormPanel) FieldFormType ¶ added in v1.0.0
func (*FormPanel) FieldHelpMsg ¶ added in v1.0.9
func (*FormPanel) FieldLimit ¶ added in v1.0.0
func (*FormPanel) FieldNotAllowAdd ¶ added in v1.0.0
func (*FormPanel) FieldNotAllowEdit ¶ added in v1.0.2
func (*FormPanel) FieldOptionExt ¶ added in v1.1.0
func (*FormPanel) FieldOptions ¶ added in v1.0.0
func (*FormPanel) FieldPostFilterFn ¶ added in v1.0.0
func (f *FormPanel) FieldPostFilterFn(post PostFieldFilterFn) *FormPanel
func (*FormPanel) FieldSubstr ¶ added in v1.0.0
func (*FormPanel) FieldToLower ¶ added in v1.0.0
func (*FormPanel) FieldToTitle ¶ added in v1.0.0
func (*FormPanel) FieldToUpper ¶ added in v1.0.0
func (*FormPanel) FieldTrimSpace ¶ added in v1.0.0
func (*FormPanel) FieldValue ¶ added in v1.0.0
func (*FormPanel) FieldXssFilter ¶ added in v1.0.7
func (*FormPanel) SetDescription ¶ added in v1.0.0
func (*FormPanel) SetFooterHtml ¶ added in v1.0.0
func (*FormPanel) SetHeaderHtml ¶ added in v1.0.0
func (*FormPanel) SetInsertFn ¶ added in v1.1.0
func (f *FormPanel) SetInsertFn(po FormPostFn) *FormPanel
func (*FormPanel) SetPostHook ¶ added in v1.0.0
func (f *FormPanel) SetPostHook(po FormPostFn) *FormPanel
func (*FormPanel) SetPostValidator ¶ added in v1.0.0
func (f *FormPanel) SetPostValidator(va FormPostFn) *FormPanel
func (*FormPanel) SetTabGroups ¶ added in v1.0.0
func (*FormPanel) SetTabHeaders ¶ added in v1.0.0
func (*FormPanel) SetUpdateFn ¶ added in v1.1.0
func (f *FormPanel) SetUpdateFn(po FormPostFn) *FormPanel
type FormPostFn ¶ added in v1.1.0
type GetPanelFn ¶ added in v1.0.9
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 {
FieldList FieldList
Table string
Title string
Description string
// Warn: may be deprecated future.
TabGroups TabGroups
TabHeaders TabHeaders
Sort Sort
PageSizeList []int
DefaultPageSize int
IsHideNewButton bool
IsHideExportButton bool
IsHideEditButton bool
IsHideDeleteButton bool
IsHideFilterButton bool
IsHideRowSelector bool
IsHidePagination bool
IsHideFilterArea bool
FilterFormLayout form.Layout
Wheres []Where
Buttons Buttons
DeleteHook DeleteFn
PreDeleteFn DeleteFn
DeleteFn DeleteFn
Action template.HTML
HeaderHtml template.HTML
// contains filtered or unexported fields
}
InfoPanel
func NewInfoPanel ¶ added in v1.0.0
func NewInfoPanel() *InfoPanel
func (*InfoPanel) AddField ¶ added in v1.0.0
func (i *InfoPanel) AddField(head, field string, typeName db.DatabaseType) *InfoPanel
func (*InfoPanel) AddLimitFilter ¶ added in v1.0.9
func (*InfoPanel) AddSubstrFilter ¶ added in v1.0.9
func (*InfoPanel) AddToLowerFilter ¶ added in v1.0.9
func (*InfoPanel) AddToTitleFilter ¶ added in v1.0.9
func (*InfoPanel) AddToUpperFilter ¶ added in v1.0.9
func (*InfoPanel) AddTrimSpaceFilter ¶ added in v1.0.9
func (*InfoPanel) AddXssFilter ¶ added in v1.0.9
func (*InfoPanel) AddXssJsFilter ¶ added in v1.0.9
func (*InfoPanel) FieldDisplay ¶ added in v1.0.0
func (i *InfoPanel) FieldDisplay(filter FieldFilterFn) *InfoPanel
func (*InfoPanel) FieldEditAble ¶ added in v1.0.8
func (*InfoPanel) FieldEditOptions ¶ added in v1.0.8
func (*InfoPanel) FieldFilterOptionExt ¶ added in v1.1.2
func (*InfoPanel) FieldFilterOptions ¶ added in v1.1.2
func (*InfoPanel) FieldFilterable ¶ added in v1.0.0
func (i *InfoPanel) FieldFilterable(filterType ...FilterType) *InfoPanel
func (*InfoPanel) FieldFixed ¶ added in v1.0.0
func (*InfoPanel) FieldLimit ¶ added in v1.0.0
func (*InfoPanel) FieldSortable ¶ added in v1.0.0
func (*InfoPanel) FieldSubstr ¶ added in v1.0.0
func (*InfoPanel) FieldToLower ¶ added in v1.0.0
func (*InfoPanel) FieldToTitle ¶ added in v1.0.0
func (*InfoPanel) FieldToUpper ¶ added in v1.0.0
func (*InfoPanel) FieldTrimSpace ¶ added in v1.0.0
func (*InfoPanel) FieldWidth ¶ added in v1.0.0
func (*InfoPanel) FieldXssFilter ¶ added in v1.0.7
func (*InfoPanel) GetPageSizeList ¶ added in v1.0.8
func (*InfoPanel) HideDeleteButton ¶ added in v1.0.2
func (*InfoPanel) HideEditButton ¶ added in v1.0.2
func (*InfoPanel) HideExportButton ¶ added in v1.0.2
func (*InfoPanel) HideFilterArea ¶ added in v1.1.4
func (*InfoPanel) HideFilterButton ¶ added in v1.0.2
func (*InfoPanel) HideNewButton ¶ added in v1.0.2
func (*InfoPanel) HidePagination ¶ added in v1.0.2
func (*InfoPanel) HideRowSelector ¶ added in v1.0.2
func (*InfoPanel) SetDefaultPageSize ¶ added in v1.0.8
func (*InfoPanel) SetDeleteFn ¶ added in v1.1.0
func (*InfoPanel) SetDeleteHook ¶ added in v1.1.0
func (*InfoPanel) SetDescription ¶ added in v1.0.0
func (*InfoPanel) SetFilterFormLayout ¶ added in v1.1.4
func (*InfoPanel) SetFooterHtml ¶ added in v1.0.0
func (*InfoPanel) SetHeaderHtml ¶ added in v1.0.0
func (*InfoPanel) SetPageSizeList ¶ added in v1.0.8
func (*InfoPanel) SetPreDeleteFn ¶ added in v1.1.0
func (*InfoPanel) SetSortAsc ¶ added in v1.0.8
func (*InfoPanel) SetSortDesc ¶ added in v1.0.8
func (*InfoPanel) SetTabGroups ¶ added in v1.0.0
func (*InfoPanel) SetTabHeaders ¶ added in v1.0.0
type LabelAttribute ¶
type LabelAttribute interface {
SetContent(value template.HTML) LabelAttribute
SetColor(value template.HTML) LabelAttribute
SetType(value string) LabelAttribute
GetContent() template.HTML
}
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
// Components assets
AssetsList template.HTML
}
Page used in the template as a top variable.
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
GetContent() template.HTML
}
type PopupAttribute ¶ added in v1.0.0
type PopupAttribute interface {
SetID(value string) PopupAttribute
SetTitle(value template.HTML) PopupAttribute
SetBody(value template.HTML) PopupAttribute
SetSize(value string) PopupAttribute
GetContent() template.HTML
}
type PostFieldFilterFn ¶ added in v1.0.0
type PostFieldFilterFn func(value PostFieldModel) string
PostFieldFilterFn is filter function of data.
type PostFieldModel ¶ added in v1.0.0
type PostFieldModel struct {
ID string
Value FieldModelValue
Row map[string]interface{}
}
PostFieldModel contains ID and value of the single query result and the current row data.
type RowAttribute ¶
type RowAttribute interface {
SetContent(value template.HTML) RowAttribute
AddContent(value template.HTML) RowAttribute
GetContent() template.HTML
}
type SystemInfo ¶
type SystemInfo struct {
Version string
}
SystemInfo contains basic info of system.
type TabHeaders ¶ added in v1.0.0
type TabHeaders []string
func (TabHeaders) Add ¶ added in v1.0.0
func (t TabHeaders) Add(header string) TabHeaders
type TableAttribute ¶
type TableAttribute interface {
SetThead(value []map[string]string) TableAttribute
SetInfoList(value []map[string]template.HTML) TableAttribute
SetType(value string) TableAttribute
SetMinWidth(value int) TableAttribute
GetContent() template.HTML
}
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
}
Click to show internal directories.
Click to hide internal directories.