Added a Bloc coupon code after A Mayhem of Munchkins.

This commit is contained in:
Nick Winter 2015-08-12 10:25:56 -07:00
parent ccf889480f
commit 49dc71a157
3 changed files with 11 additions and 0 deletions
app
locale
templates/play/level/modal
views/play/level/modal

View file

@ -255,6 +255,8 @@
victory_new_item: "New Item"
victory_viking_code_school: "Holy smokes, that was a hard level you just beat! If you aren't already a software developer, you should be. You just got fast-tracked for acceptance with Viking Code School, where you can take your skills to the next level and become a professional web developer in 14 weeks."
victory_become_a_viking: "Become a Viking"
victory_bloc: "Great work! Your skills are improving, and someone's taking notice. If you've considered becoming a software developer, this may be your lucky day. Bloc is an online bootcamp that pairs you 1-on-1 with an expert mentor who will help train you into a professional developer! By beating A Mayhem of Munchkins, you're now eligible for a $500 price reduction with the code: CCRULES"
victory_bloc_cta: "Meet your mentor learn about Bloc"
guide_title: "Guide"
tome_minion_spells: "Your Minions' Spells" # Only in old-style levels.
tome_read_only_spells: "Read-Only Spells" # Only in old-style levels.

View file

@ -120,3 +120,9 @@ block modal-footer-content
img.pull-right(src="/file/db/level/55144b509f0c4854051769c1/viking_2.png")
span(data-i18n="play_level.victory_viking_code_school")
button.btn.btn-illustrated.btn-primary.btn-lg.world-map-button.continue-from-offer-button(data-i18n="play_level.victory_become_a_viking") Become a Viking
.offer.a-mayhem-of-munchkins
p
img.pull-left(src="/file/db/level/55ca29439bc1892c835b0137/bloc-mentor.png")
img.pull-right(src="/file/db/level/55ca29439bc1892c835b0137/bloc-logo-square-100x100-white.png")
span(data-i18n="play_level.victory_bloc")
button.btn.btn-illustrated.btn-primary.btn-lg.world-map-button.continue-from-offer-button(data-i18n="play_level.victory_bloc_cta")

View file

@ -419,6 +419,8 @@ module.exports = class HeroVictoryModal extends ModalView
navigationEvent = route: nextLevelLink, viewClass: viewClass, viewArgs: viewArgs
if @level.get('slug') is 'lost-viking' and not (me.get('age') in ['0-13', '14-17'])
@showOffer navigationEvent
else if @level.get('slug') is 'a-mayhem-of-munchkins' and not (me.get('age') in ['0-13']) and not options.showLeaderboard
@showOffer navigationEvent
else
Backbone.Mediator.publish 'router:navigate', navigationEvent
@ -447,6 +449,7 @@ module.exports = class HeroVictoryModal extends ModalView
onClickContinueFromOffer: (e) ->
url = {
'lost-viking': 'http://www.vikingcodeschool.com/codecombat?utm_source=codecombat&utm_medium=viking_level&utm_campaign=affiliate&ref=Code+Combat+Elite'
'a-mayhem-of-munchkins': 'https://www.bloc.io/web-developer-career-track?utm_campaign=affiliate&utm_source=codecombat&utm_medium=bloc_level'
}[@level.get('slug')]
Backbone.Mediator.publish 'router:navigate', @navigationEventUponCompletion
window.open url, '_blank' if url