2015-01-31 00:36:36 -05:00
|
|
|
h1
|
2015-02-09 14:57:28 -05:00
|
|
|
span.spr(data-i18n="leaderboard.top_players") Top Players by
|
2015-01-31 00:36:36 -05:00
|
|
|
span(data-i18n="leaderboard.#{scoreType.replace('-', '_')}")
|
|
|
|
span.spr ,
|
|
|
|
span(data-i18n="leaderboard.#{timespan}")
|
|
|
|
|
|
|
|
if topScores
|
|
|
|
table.table.table-bordered.table-condensed.table-hover
|
|
|
|
thead
|
|
|
|
tr
|
|
|
|
th(colspan=4, data-i18n="general.player")
|
|
|
|
th(data-i18n="general.score")
|
|
|
|
th(data-i18n="general.when")
|
2015-01-31 13:04:02 -05:00
|
|
|
th
|
2015-01-31 00:36:36 -05:00
|
|
|
tbody
|
|
|
|
for row, rank in topScores
|
|
|
|
- var isMyRow = row.creator == me.id
|
2015-01-31 13:04:02 -05:00
|
|
|
- var viewable = rank >= 5 || me.isAdmin();
|
|
|
|
tr(class=isMyRow ? "success" : "" + (viewable ? " viewable" : ""), data-player-id=row.creator, data-session-id=row.session, title=viewable ? "View solution" : "Can't view top 5 solutions")
|
2015-01-31 00:36:36 -05:00
|
|
|
td.rank-cell= rank + 1
|
|
|
|
td.code-language-cell(style="background-image: url(/images/common/code_languages/#{row.codeLanguage}_small.png)" title=_.string.capitalize(row.codeLanguage))
|
|
|
|
td.hero-portrait-cell(style="background-image: url(/file/db/thang.type/#{row.hero}/portrait.png)")
|
|
|
|
td.name-col-cell= row.creatorName || "Anonymous"
|
|
|
|
td.score-cell= row.score
|
|
|
|
td.ago-cell= row.ago
|
2015-01-31 13:04:02 -05:00
|
|
|
td.viewable-cell
|
|
|
|
if viewable
|
2015-04-07 18:19:18 -04:00
|
|
|
if (me.get('preferredLanguage', true) || 'en-US').substr(0, 2) == 'en'
|
|
|
|
.btn.btn-xs.btn-info Watch
|
|
|
|
else
|
|
|
|
.glyphicon.glyphicon-eye-close
|
2015-01-31 13:04:02 -05:00
|
|
|
else
|
|
|
|
.glyphicon.glyphicon-eye-close
|
2015-01-31 00:36:36 -05:00
|
|
|
else if loading
|
|
|
|
h3(data-i18n="common.loading")
|
|
|
|
else
|
2015-02-09 14:57:28 -05:00
|
|
|
h3 No scores yet.
|