mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Hiding most of the ladder page if not logged in.
This commit is contained in:
parent
052d35afe7
commit
79ce16dbba
2 changed files with 54 additions and 41 deletions
|
@ -19,4 +19,6 @@
|
|||
text-overflow: ellipsis
|
||||
white-space: nowrap
|
||||
overflow: hidden
|
||||
|
||||
|
||||
#must-log-in button
|
||||
margin-right: 10px
|
|
@ -6,47 +6,58 @@ block content
|
|||
div#level-description
|
||||
!{description}
|
||||
|
||||
a(href="http://www.youtube.com/watch?v=IFvfZiJGDsw&list=HL1392928835&feature=mh_lolz").intro-button.btn.btn-primary.btn-lg Watch the Video
|
||||
|
||||
a(href="/play/level/ladder-tutorial").intro-button.btn.btn-primary.btn-lg Play the Tutorial
|
||||
if !me.get('anonymous')
|
||||
a(href="http://www.youtube.com/watch?v=IFvfZiJGDsw&list=HL1392928835&feature=mh_lolz").intro-button.btn.btn-primary.btn-lg Watch the Video
|
||||
|
||||
a(href="/play/level/ladder-tutorial").intro-button.btn.btn-primary.btn-lg Play the Tutorial
|
||||
|
||||
hr
|
||||
div#columns.row
|
||||
for team in teams
|
||||
div.column.col-md-6
|
||||
a(href="/play/ladder/#{levelID}/team/#{team.id}", style="background-color: #{team.primaryColor}").play-button.btn.btn-danger.btn-block.btn-lg
|
||||
span Play As
|
||||
span= team.name
|
||||
|
||||
if me.get('anonymous')
|
||||
div#must-log-in
|
||||
p
|
||||
strong Please log in first before playing a ladder game.
|
||||
button.btn.btn-primary(data-toggle="coco-modal", data-target="modal/login", data-i18n="login.log_in") Log In
|
||||
button.btn.btn-primary(data-toggle="coco-modal", data-target="modal/signup", data-i18n="login.sign_up") Create Account
|
||||
|
||||
table.table.table-bordered.table-condensed.table-hover
|
||||
//(style="background-color: #{team.bgColor}")
|
||||
tr
|
||||
th(colspan=3, style="color: #{team.primaryColor}")
|
||||
span= team.name
|
||||
span Leaderboard
|
||||
tr
|
||||
th Score
|
||||
th.name-col-cell Name
|
||||
th
|
||||
|
||||
for session in team.leaderboard.topPlayers.models
|
||||
- var myRow = session.get('creator') == me.id
|
||||
tr(class=myRow ? "success" : "")
|
||||
td.score-cell= session.get('totalScore').toFixed(2)
|
||||
td.name-col-cell= session.get('creatorName') || "Anonymous"
|
||||
td
|
||||
if(!myRow)
|
||||
a(href="/play/level/#{level.get('slug') || level.id}/?team=#{team.otherTeam}&opponent=#{session.id}") Battle as #{team.otherTeam}!
|
||||
else
|
||||
a(href="/play/ladder/#{levelID}/team/#{team.id}") View your #{team.id} matches.
|
||||
|
||||
unless me.attributes.anonymous
|
||||
hr
|
||||
button.btn.btn-warning.btn-lg.highlight#simulate-button(style="margin-bottom:10px;") Simulate Games!
|
||||
p(id="simulation-status-text", style="display:inline; margin-left:10px;")
|
||||
if simulationStatus
|
||||
| #{simulationStatus}
|
||||
else
|
||||
| By simulating games you can get your game ranked faster!
|
||||
if me.isAdmin()
|
||||
button.btn.btn-danger.btn-lg.highlight#simulate-all-button(style="margin-bottom:10px; float: right;") RESET AND SIMULATE GAMES
|
||||
else
|
||||
div#columns.row
|
||||
for team in teams
|
||||
div.column.col-md-6
|
||||
a(href="/play/ladder/#{levelID}/team/#{team.id}", style="background-color: #{team.primaryColor}").play-button.btn.btn-danger.btn-block.btn-lg
|
||||
span Play As
|
||||
span= team.name
|
||||
|
||||
table.table.table-bordered.table-condensed.table-hover
|
||||
//(style="background-color: #{team.bgColor}")
|
||||
tr
|
||||
th(colspan=3, style="color: #{team.primaryColor}")
|
||||
span= team.name
|
||||
span Leaderboard
|
||||
tr
|
||||
th Score
|
||||
th.name-col-cell Name
|
||||
th
|
||||
|
||||
for session in team.leaderboard.topPlayers.models
|
||||
- var myRow = session.get('creator') == me.id
|
||||
tr(class=myRow ? "success" : "")
|
||||
td.score-cell= session.get('totalScore').toFixed(2)
|
||||
td.name-col-cell= session.get('creatorName') || "Anonymous"
|
||||
td
|
||||
if(!myRow)
|
||||
a(href="/play/level/#{level.get('slug') || level.id}/?team=#{team.otherTeam}&opponent=#{session.id}") Battle as #{team.otherTeam}!
|
||||
else
|
||||
a(href="/play/ladder/#{levelID}/team/#{team.id}") View your #{team.id} matches.
|
||||
|
||||
unless me.attributes.anonymous
|
||||
hr
|
||||
button.btn.btn-warning.btn-lg.highlight#simulate-button(style="margin-bottom:10px;") Simulate Games!
|
||||
p(id="simulation-status-text", style="display:inline; margin-left:10px;")
|
||||
if simulationStatus
|
||||
| #{simulationStatus}
|
||||
else
|
||||
| By simulating games you can get your game ranked faster!
|
||||
if me.isAdmin()
|
||||
button.btn.btn-danger.btn-lg.highlight#simulate-all-button(style="margin-bottom:10px; float: right;") RESET AND SIMULATE GAMES
|
Loading…
Reference in a new issue