Esempio n. 1
0
func (me *HtmlTemplatePage) Render(c *api.Context, w http.ResponseWriter) {
	if me.Team != nil {
		me.Team.Sanitize()
	}

	if me.User != nil {
		me.User.Sanitize(map[string]bool{})
	}

	me.SessionTokenIndex = c.SessionTokenIndex

	if err := Templates.ExecuteTemplate(w, me.TemplateName, me); err != nil {
		c.SetUnknownError(me.TemplateName, err.Error())
	}
}
Esempio n. 2
0
func (me *HtmlTemplatePage) Render(c *api.Context, w http.ResponseWriter) {
	if me.Team != nil {
		me.Team.Sanitize()
	}

	if me.User != nil {
		me.User.Sanitize(map[string]bool{})
		me.Locale = me.User.Locale
	}

	me.Props["Locale"] = me.Locale
	me.SessionTokenIndex = c.SessionTokenIndex

	me.ClientCfg["FooterHelp"] = c.T("web.footer.help")
	me.ClientCfg["FooterTerms"] = c.T("web.footer.terms")
	me.ClientCfg["FooterPrivacy"] = c.T("web.footer.privacy")
	me.ClientCfg["FooterAbout"] = c.T("web.footer.about")

	if err := Templates.ExecuteTemplate(w, me.TemplateName, me); err != nil {
		c.SetUnknownError(me.TemplateName, err.Error())
	}
}
Esempio n. 3
0
func (me *HtmlTemplatePage) Render(c *api.Context, w http.ResponseWriter) {
	if err := Templates.ExecuteTemplate(w, me.TemplateName, me); err != nil {
		c.SetUnknownError(me.TemplateName, err.Error())
	}
}