admin_tabs

package module
v0.0.0-...-4c4c20a Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 8 Imported by: 1

README

admin-tabs

Admin Tabs Plugin for https://github.com/ecletus framework

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PKG                     = path_helpers.GetCalledDir()
	KEY_TABS                = PKG + ".tabs"
	KEY_TAB                 = PKG + ".tab"
	THEME                   = "tabbed"
	SCHEME_CATEGORY         = PKG
	DEFAULT_SCHEME_CATEGORY = PKG + ".default"
)

Functions

func GetTabPath

func GetTabPath(ctx context.Context) string

func TabHandler

func TabHandler(res *admin.Resource, config *admin.RouteConfig, indexHandler admin.Handler, scope *Tab) *admin.RouteHandler

Types

type Plugin

type Plugin struct {
	plug.EventDispatcher
	AdminsKey string
}

func (*Plugin) Init

func (p *Plugin) Init(options *plug.Options)

func (*Plugin) RequireOptions

func (p *Plugin) RequireOptions() []string

type Tab

type Tab struct {
	Title    string
	Path     string
	TitleKey string
	Handler  func(t *Tabs, res *admin.Resource, context *core.Context, db *aorm.DB) *aorm.DB
	Default  bool
	Enabled  func(tabs *Tabs, ctx *admin.Context) bool
	// contains filtered or unexported fields
}

func GetTab

func GetTab(ctx context.Context) *Tab

func (*Tab) Scheme

func (s *Tab) Scheme() *admin.Scheme

func (*Tab) URL

func (s *Tab) URL(res *admin.Resource, context *core.Context) string

type Tabs

type Tabs struct {
	Resource *admin.Resource
	Tabs     []*Tab
	ByPath   map[string]*Tab
	// contains filtered or unexported fields
}

func PrepareResource

func PrepareResource(res *admin.Resource) *Tabs

func (*Tabs) Register

func (t *Tabs) Register(scheme *admin.Scheme)

Jump to

Keyboard shortcuts

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