2014-03-02 15:43:21 -05:00
|
|
|
div#columns.row
|
2014-04-15 18:01:54 -04:00
|
|
|
for team, teamIndex in teams
|
2014-03-21 22:50:54 -04:00
|
|
|
div.column.col-md-4
|
2014-04-03 12:57:34 -04:00
|
|
|
div(id="histogram-display-#{team.name}", class="histogram-display",data-team-name=team.name)
|
2014-03-02 15:43:21 -05:00
|
|
|
table.table.table-bordered.table-condensed.table-hover
|
|
|
|
tr
|
2014-03-20 17:40:17 -04:00
|
|
|
th
|
|
|
|
th(colspan=3, style="color: #{team.primaryColor}")
|
2014-03-02 15:43:21 -05:00
|
|
|
span= team.name
|
2014-03-12 23:59:19 -04:00
|
|
|
span
|
2014-03-12 15:51:38 -04:00
|
|
|
span(data-i18n="ladder.leaderboard") Leaderboard
|
2014-03-02 15:43:21 -05:00
|
|
|
tr
|
2014-03-20 17:40:17 -04:00
|
|
|
th
|
2014-03-12 16:25:14 -04:00
|
|
|
th(data-i18n="general.score") Score
|
2014-03-12 15:51:38 -04:00
|
|
|
th(data-i18n="general.name").name-col-cell Name
|
2014-03-02 15:43:21 -05:00
|
|
|
th
|
|
|
|
|
2014-03-20 17:40:17 -04:00
|
|
|
- var topSessions = team.leaderboard.topPlayers.models;
|
2014-03-21 22:50:54 -04:00
|
|
|
- var showJustTop = team.leaderboard.inTopSessions() || me.get('anonymous');
|
2014-04-15 18:01:54 -04:00
|
|
|
- if(!showJustTop && topSessions.length == 20) topSessions = topSessions.slice(0, 10);
|
2014-03-20 17:40:17 -04:00
|
|
|
for session, rank in topSessions
|
2014-03-02 15:43:21 -05:00
|
|
|
- var myRow = session.get('creator') == me.id
|
2014-04-15 18:01:54 -04:00
|
|
|
tr(class=myRow ? "success" : "", data-player-id=session.get('creator'), data-session-id=session.id)
|
2014-03-08 18:43:56 -05:00
|
|
|
td.rank-cell= rank + 1
|
2014-03-03 15:27:32 -05:00
|
|
|
td.score-cell= Math.round(session.get('totalScore') * 100)
|
2014-03-02 15:43:21 -05:00
|
|
|
td.name-col-cell= session.get('creatorName') || "Anonymous"
|
2014-03-20 17:40:17 -04:00
|
|
|
td.fight-cell
|
2014-03-03 14:11:27 -05:00
|
|
|
a(href="/play/level/#{level.get('slug') || level.id}/?team=#{team.otherTeam}&opponent=#{session.id}")
|
2014-03-20 17:40:17 -04:00
|
|
|
span(data-i18n="ladder.fight") Fight!
|
|
|
|
|
2014-03-21 22:56:25 -04:00
|
|
|
if !showJustTop && team.leaderboard.nearbySessions().length
|
2014-03-20 17:40:17 -04:00
|
|
|
tr(class="active")
|
|
|
|
td(colspan=4).ellipsis-row ...
|
|
|
|
for session in team.leaderboard.nearbySessions()
|
|
|
|
- var myRow = session.get('creator') == me.id
|
2014-04-15 18:01:54 -04:00
|
|
|
tr(class=myRow ? "success" : "", data-player-id=session.get('creator'), data-session-id=session.id)
|
2014-03-20 17:40:17 -04:00
|
|
|
td.rank-cell= session.rank
|
|
|
|
td.score-cell= Math.round(session.get('totalScore') * 100)
|
|
|
|
td.name-col-cell= session.get('creatorName') || "Anonymous"
|
|
|
|
td.fight-cell
|
|
|
|
a(href="/play/level/#{level.get('slug') || level.id}/?team=#{team.otherTeam}&opponent=#{session.id}")
|
2014-03-21 22:50:54 -04:00
|
|
|
span(data-i18n="ladder.fight") Fight!
|
2014-04-15 18:01:54 -04:00
|
|
|
if teamIndex == 1
|
2014-04-21 13:40:22 -04:00
|
|
|
.btn.btn-sm.load-more-ladder-entries More
|
2014-04-15 18:01:54 -04:00
|
|
|
|
2014-03-21 22:50:54 -04:00
|
|
|
div.column.col-md-4
|
|
|
|
h4.friends-header Friends Playing
|
|
|
|
if me.get('anonymous')
|
|
|
|
div.alert.alert-info
|
|
|
|
a(data-toggle="coco-modal", data-target="modal/signup") Sign up to play with your friends!
|
|
|
|
|
|
|
|
else
|
2014-03-26 17:19:05 -04:00
|
|
|
if !onFacebook || !onGPlus
|
2014-03-21 22:50:54 -04:00
|
|
|
div.connect-buttons
|
2014-03-26 17:19:05 -04:00
|
|
|
| Connect and play against your friends!
|
|
|
|
br
|
2014-03-21 22:50:54 -04:00
|
|
|
if !onFacebook
|
|
|
|
button.btn.btn-sm.connect-facebook Facebook
|
2014-03-26 17:19:05 -04:00
|
|
|
if !onGPlus
|
|
|
|
button.btn.btn-sm.connect-google-plus Google+
|
|
|
|
|
|
|
|
if friends.length
|
|
|
|
for friend in friends
|
|
|
|
p.friend-entry
|
|
|
|
img(src=friend.imageSource).img-thumbnail
|
|
|
|
span= friend.creatorName + ' (' + friend.name + ')'
|
|
|
|
br
|
|
|
|
span= Math.round(friend.totalScore * 100)
|
|
|
|
span :
|
|
|
|
span= friend.team
|
|
|
|
br
|
|
|
|
a(href="/play/level/#{level.get('slug') || level.id}/?team=#{friend.otherTeam}&opponent=#{friend._id}")
|
|
|
|
span(data-i18n="ladder.fight") Fight!
|
|
|
|
|
2014-03-21 22:50:54 -04:00
|
|
|
else
|
2014-03-26 17:19:05 -04:00
|
|
|
p Invite your friends to join you in battle!
|