@(leaderboards: lila.mod.Gamify.Leaderboards, history: List[lila.mod.Gamify.HistoryMonth])(implicit ctx: Context) @import lila.mod.Gamify.Period @title = @{ "Moderator hall of fame" } @yearHeader(year: Int) = @{ Html(s""" $year Champions of the past Score Actions taken Reports closed """) } @mod.layout( title = title, active = "gamify", moreCss = cssTag("mod-gamify.css")) {

@title

@champion(leaderboards.daily.headOption, "reward1", Period.Day)
@champion(leaderboards.weekly.headOption, "reward2", Period.Week)
@champion(leaderboards.monthly.headOption, "reward3", Period.Month)
@history.headOption.filterNot(_.date.getMonthOfYear == 12).map { h => @yearHeader(h.date.getYear) } @history.map { h => @if(h.date.getMonthOfYear == 12) { @yearHeader(h.date.getYear) } }
@h.date.monthOfYear.getAsText @userIdLink(h.champion.modId.some, withOnline = false) @h.champion.score.localize @h.champion.action.localize @h.champion.report.localize
}