示例#1
0
// Form for creating a new goal
func newGoal(action *goldorak.Action, param string, public bool) {
	action.Assign("name", param)
	action.Assign("public", "") // FIXME
	action.Template("new_goal")
}
示例#2
0
// Show the calendar
func showCalendar(action *goldorak.Action, cal *Calendar) {
	action.Assign("name", cal.Title())
	action.Assign("year", fmt.Sprint(cal.Year))
	action.Assign("month", cal.MonthAsText())
	action.Assign("prev_url", "/"+cal.Goal.Param+"/"+cal.PrevMonth().String())
	action.Assign("next_url", "/"+cal.Goal.Param+"/"+cal.NextMonth().String())
	action.Assign("current", goldorak.Pluralize(cal.CurrentStreak(), "jour"))
	action.Assign("longest", goldorak.Pluralize(cal.LongestStreak(), "jour"))
	action.Assign("rows", "") // FIXME
	action.Template("calendar")
}