codecombat/app/templates/play/ladder/simulate_tab.jade

55 lines
2.6 KiB
Text
Raw Normal View History

p(id="simulation-status-text")
if simulationStatus
| #{simulationStatus}
else
span(data-i18n="ladder.simulation_explanation") By simulating games you can get your game ranked faster!
span.spl(data-i18n="ladder.simulation_explanation_leagues") You will mainly help simulate games for allied players in your clans and courses.
p
button(data-i18n="ladder.simulate_games").btn.btn-warning.btn-lg.highlight#simulate-button Simulate Games!
p.simulation-count
2015-10-13 11:05:47 -04:00
span.spr(data-i18n="ladder.games_simulated_by") Games simulated by you:
span#simulated-by-you= me.get('simulatedBy') || 0
//p.simulation-count
// span.spr(data-i18n="ladder.games_simulated_for") Games simulated for you:
// span#simulated-for-you= me.get('simulatedFor') || 0
2015-10-13 11:05:47 -04:00
//p.simulation-count
// span.spr(data-i18n="ladder.games_in_queue") Games currently in the queue:
// span#games-in-queue= numberOfGamesInQueue || 0
2015-10-13 11:05:47 -04:00
table.table.table-bordered.table-condensed.table-hover
2014-08-07 07:10:42 -04:00
thead
tr
th
th(data-i18n="general.player").name-col-cell Player
th(data-i18n="ladder.games_simulated") Games simulated
//th(data-i18n="ladder.games_played") Games played
//th(data-i18n="ladder.ratio") Ratio
2014-08-07 07:10:42 -04:00
tbody
- var topSimulators = simulatorsLeaderboardData.topSimulators.models;
- var showJustTop = simulatorsLeaderboardData.inTopSimulators() || me.get('anonymous');
- if(!showJustTop) topSimulators = topSimulators.slice(0, 10);
for user, rank in topSimulators
- var myRow = user.id == me.id
tr(class=myRow ? "success" : "")
2014-08-07 07:10:42 -04:00
td.simulator-leaderboard-cell= rank + 1
td.name-col-cell= user.get('name') || "Anonymous"
td.simulator-leaderboard-cell= user.get('simulatedBy')
//td.simulator-leaderboard-cell= user.get('simulatedFor')
//td.simulator-leaderboard-cell= Math.round((user.get('simulatedBy') / user.get('simulatedFor')) * 10) / 10
2014-08-07 07:10:42 -04:00
if !showJustTop && simulatorsLeaderboardData.nearbySimulators().length
tr(class="active")
td(colspan=5).ellipsis-row ...
for user in simulatorsLeaderboardData.nearbySimulators()
- var myRow = user.id == me.id
- var ratio = user.get('simulatedBy') / user.get('simulatedFor');
tr(class=myRow ? "success" : "")
td.simulator-leaderboard-cell= user.rank
td.name-col-cell= user.get('name') || "Anonymous"
td.simulator-leaderboard-cell= user.get('simulatedBy')
//td.simulator-leaderboard-cell= user.get('simulatedFor')
//td.simulator-leaderboard-cell= _.isNaN(ratio) || ratio == Infinity ? '' : ratio.toFixed(1)