action_bar.go
func (bar *ActionBar) Render(w http.ResponseWriter, r *http.Request) template.HTML {
	var (
		actions, inlineActions []ActionInterface
		context                = bar.Admin.NewContext(w, r)
	)
	for _, action := range bar.actions {
		if action.InlineAction() {
			inlineActions = append(inlineActions, action)
		} else {
			actions = append(actions, action)
		}
	}
	context.Context.CurrentUser = bar.Admin.Auth.GetCurrentUser(context)
	result := map[string]interface{}{
		"EditMode":      bar.EditMode(w, r),
		"Auth":          bar.Admin.Auth,
		"CurrentUser":   context.Context.CurrentUser,
		"Actions":       actions,
		"InlineActions": inlineActions,
		"RouterPrefix":  bar.Admin.GetRouter().Prefix,
	}
	return context.Render("action_bar/action_bar", result)
}
func (bar *ActionBar) Render(w http.ResponseWriter, r *http.Request) template.HTML {
	var (
		actions, inlineActions []ActionInterface
		context                = bar.Admin.NewContext(w, r)
	)
	for _, action := range bar.actions {
		if action.InlineAction() {
			inlineActions = append(inlineActions, action)
		} else {
			actions = append(actions, action)
		}
	}
	context.Context.CurrentUser = bar.Admin.Auth.GetCurrentUser(context)
	result := map[string]interface{}{
		"EditMode":      bar.EditMode(w, r),
		"Auth":          bar.Admin.Auth,
		"CurrentUser":   context.Context.CurrentUser,
		"Actions":       actions,
		"InlineActions": inlineActions,
		"RouterPrefix":  bar.Admin.GetRouter().Prefix,
	}
	return context.Render("action_bar/action_bar", result)
}
// Render will return the HTML of the bar, used this function to render the bar in frontend page's template or layout