mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-28 22:00:25 -04:00
Don't show tutorial level link if tutorial level doesn't exist for a ladder level.
This commit is contained in:
parent
0de5e715c7
commit
4a2f2700bc
2 changed files with 8 additions and 6 deletions
app
|
@ -14,10 +14,11 @@ block modal-body-content
|
|||
|
||||
div#normal-view
|
||||
|
||||
p.tutorial-suggestion
|
||||
strong(data-i18n="ladder.tutorial_not_sure") Not sure what's going on?
|
||||
|
|
||||
a(href="/play/level/#{levelID}-tutorial", data-i18n="ladder.tutorial_play_first") Play the tutorial first.
|
||||
if tutorialLevelExists
|
||||
p.tutorial-suggestion
|
||||
strong(data-i18n="ladder.tutorial_not_sure") Not sure what's going on?
|
||||
|
|
||||
a(href="/play/level/#{levelID}-tutorial", data-i18n="ladder.tutorial_play_first") Play the tutorial first.
|
||||
|
||||
a(href="/play/level/#{levelID}?team=#{teamID}")
|
||||
div.play-option
|
||||
|
|
|
@ -22,7 +22,7 @@ module.exports = class LadderPlayModal extends View
|
|||
@otherTeam = if team is 'ogres' then 'humans' else 'ogres'
|
||||
@startLoadingChallengersMaybe()
|
||||
@wizardType = ThangType.loadUniversalWizard()
|
||||
|
||||
|
||||
# PART 1: Load challengers from the db unless some are in the matches
|
||||
|
||||
startLoadingChallengersMaybe: ->
|
||||
|
@ -72,6 +72,7 @@ module.exports = class LadderPlayModal extends View
|
|||
ctx.teamName = _.string.titleize @team
|
||||
ctx.teamID = @team
|
||||
ctx.otherTeamID = @otherTeam
|
||||
ctx.tutorialLevelExists = @tutorialLevelExists
|
||||
|
||||
teamsList = teamDataFromLevel @level
|
||||
teams = {}
|
||||
|
@ -118,7 +119,7 @@ module.exports = class LadderPlayModal extends View
|
|||
url: "/db/level/#{tutorialLevelID}/exists"
|
||||
success: success
|
||||
error: failure
|
||||
|
||||
|
||||
# Choosing challengers
|
||||
|
||||
getChallengers: ->
|
||||
|
|
Loading…
Add table
Reference in a new issue