codecombat/app/templates/play/modal/leaderboard-tab-view.jade

34 lines
1.4 KiB
Text
Raw Normal View History

2015-01-31 00:36:36 -05:00
h1
span.spr(data-i18n="leaderboard.top") Top Players by
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")
th
2015-01-31 00:36:36 -05:00
tbody
for row, rank in topScores
- var isMyRow = row.creator == me.id
- 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
td.viewable-cell
if viewable
.glyphicon.glyphicon-eye-open
else
.glyphicon.glyphicon-eye-close
2015-01-31 00:36:36 -05:00
else if loading
h3(data-i18n="common.loading")
else
h3 No scores yet.