Exemplo n.º 1
0
func mainPageMegaLocals(en bool, ds *calldb.DataStore) *MegaLocals {
	locals := ds.GetMainPageLocalsFromCache(en)
	my.P("locals in toMegaLocas.go")
	my.P(locals)
	// html := my.ParseTemplateNoExtMin("mainPageMainContent", locals.MainPageCodes)
	html := minContentByLayout("mainPageMainContent", locals.MainPageCodes)

	return &MegaLocals{

		Title: template.HTML(locals.Title), Desc: locals.Desc, Keywords: locals.Keywords, NextNumbers: locals.NextNumbers,
		MainContent: html,
	}
}
Exemplo n.º 2
0
func regionMegaLocals(regionId string, en bool, ds *calldb.DataStore) *MegaLocals {
	locals := ds.GetRegionLocals(regionId, en)
	if locals == nil {
		return nil
	} else {
		html := locals.Codes
		title := my.PrepareSymbolsForHtml(locals.Title)
		my.Pat("title in regionMegaLocals")
		my.P(title)
		return &MegaLocals{
			Title: template.HTML(my.PrepareSymbolsForHtml(title)), Desc: locals.Desc, Keywords: locals.Keywords, NextNumbers: locals.NextNumbers,
			MainContent: html,
		}
	}
}
Exemplo n.º 3
0
func numbersMegaLocals(firstDigits string, en bool, ds *calldb.DataStore) (locals *MegaLocals) {
	locals := ds.GetNumberLocalsAnyWay(firstDigits, en)
	if locals == nil {
		return nil
	} else {
		if en {
			locals.LoadMoreName = "Load more"
		} else {
			locals.LoadMoreName = "Загрузить еще"
		}
		html := minContentByLayout("numbersMainContent", locals)
		return &MegaLocals{
			Title: template.HTML(locals.Title), Desc: locals.Desc, Keywords: locals.Keywords, NextNumbers: locals.NextNumbers,
			MainContent: html,
		}
	}
}