func SearchAnswersNew(r render.Render, db *mgo.Database, req *http.Request, session sessions.Session) {
	lastGameIdSearched := session.Get("last_game_id_searched")

	templateData := map[string]interface{}{"metatitle": "Battle Answers", "currentPath": req.URL.Path,
		"lastGameIdSearched": lastGameIdSearched, "games": models.GetGameRecs(db, nil)}
	r.HTML(200, "search_answers/new", templateData)
}
Exemplo n.º 2
0
/////////////////////////////////////////////////////////////////////////////////////////////
// Controller Actions
/////////////////////////////////////////////////////////////////////////////////////////////
func GamesIndex(r render.Render, db *mgo.Database, req *http.Request) {
	var recs []models.GameRec

	recs = models.GetGameRecs(db, nil)

	templateData := map[string]interface{}{"metatitle": "Battle Answers", "currentPath": req.URL.Path,
		"recs": populateGameDisplays(db, recs)}
	r.HTML(200, "games/index", templateData)
}
func BattleAnswersNew(r render.Render, db *mgo.Database, req *http.Request) {
	templateData := map[string]interface{}{"metatitle": "Battle Answers", "currentPath": req.URL.Path,
		"games": models.GetGameRecs(db, nil)}
	r.HTML(200, "battle_answers/new", templateData)
}