2014-11-29 14:39:37 -05:00
extends /templates/core/modal-base
2014-09-30 19:14:47 -04:00
block modal-header-content
2014-12-07 17:03:11 -05:00
#victory-header.out
#victory-title
2014-12-09 22:23:11 -05:00
if !me.get('preferredLanguage') || me.get('preferredLanguage').split('-')[0] == 'en'
2014-12-07 17:03:11 -05:00
img(src="/images/pages/play/level/modal/victory_word.png", draggable="false")
else
h1(data-i18n="play_level.victory") Victory
2014-09-30 19:14:47 -04:00
block modal-body-content
2015-08-04 14:35:10 -04:00
if victoryText
#victory-text= victoryText
#level-feedback
div.rating.secret
div.rating-label(data-i18n="play_level.victory_rate_the_level") Rate the level:
i.glyphicon.glyphicon-star-empty
i.glyphicon.glyphicon-star-empty
i.glyphicon.glyphicon-star-empty
i.glyphicon.glyphicon-star-empty
i.glyphicon.glyphicon-star-empty
if !me.get('anonymous')
span.review-label.secret(data-i18n="play_level.victory_review") Tell us more!
.review.secret
br
textarea(data-i18n="[placeholder]play_level.victory_review_placeholder")
.clearfix
2014-09-30 19:14:47 -04:00
for achievement in achievements
2014-10-10 16:11:35 -04:00
- var animate = achievement.completed && !achievement.completedAWhileAgo
.achievement-panel(class=achievement.completedAWhileAgo ? 'earned' : '' data-achievement-id=achievement.id data-animate=animate)
2014-09-30 19:14:47 -04:00
- var rewards = achievement.get('rewards') || {};
2014-10-10 16:11:35 -04:00
2015-02-09 16:05:53 -05:00
div.achievement-description= achievement.description
2014-10-10 16:11:35 -04:00
div.achievement-rewards
2015-01-07 21:36:02 -05:00
- var worth = achievement.worth;
2015-02-18 21:01:22 -05:00
- var previousWorth = achievement.previousWorth;
2015-01-07 21:36:02 -05:00
- var gems = achievement.gems;
2015-02-18 21:01:22 -05:00
- var previousGems = achievement.previousGems;
2014-10-10 16:11:35 -04:00
if worth
2015-02-18 21:01:22 -05:00
.reward-panel.numerical.xp(data-number=worth, data-number-unit='xp', data-previous-number=previousWorth || 0)
2014-10-20 22:01:00 -04:00
.reward-image-container(class=animate ? 'pending-reward-image' : 'show')
2014-10-10 16:11:35 -04:00
img(src="/images/pages/play/level/modal/reward_icon_xp.png")
2014-10-17 23:47:32 -04:00
.reward-text= animate ? '+0' : '+'+worth
2014-10-10 16:11:35 -04:00
2015-01-07 21:36:02 -05:00
if gems
2015-02-18 21:01:22 -05:00
.reward-panel.numerical.gems(data-number=gems, data-number-unit='gem', data-previous-number=previousGems || 0)
2014-10-20 22:01:00 -04:00
.reward-image-container(class=animate ? 'pending-reward-image' : 'show')
2014-10-10 16:11:35 -04:00
img(src="/images/pages/play/level/modal/reward_icon_gems.png")
2015-01-07 21:36:02 -05:00
.reward-text= animate ? '+0' : '+'+gems
2014-10-10 16:11:35 -04:00
if rewards.heroes
for hero in rewards.heroes
- var hero = thangTypes[hero];
2014-10-20 22:01:00 -04:00
.reward-panel.hero(data-hero-thang-type=hero.get('original'))
.reward-image-container(class=animate ? 'pending-reward-image' : 'show')
2014-10-10 16:11:35 -04:00
img(src=hero.getPortraitURL())
2014-10-20 22:01:00 -04:00
.reward-text= animate ? 'New Hero' : hero.get('name')
2014-10-10 16:11:35 -04:00
if rewards.items
for item in rewards.items
- var item = thangTypes[item];
2014-10-20 22:01:00 -04:00
.reward-panel.item(data-item-thang-type=item.get('original'))
.reward-image-container(class=animate ? 'pending-reward-image' : 'show')
2014-10-10 16:11:35 -04:00
img(src=item.getPortraitURL())
2015-04-19 00:10:35 -04:00
if animate
.reward-text(data-i18n="play_level.victory_new_item") New Item
else
.reward-text= i18n(item.attributes, 'name')
2014-10-10 16:11:35 -04:00
2014-09-30 19:14:47 -04:00
block modal-footer-content
2014-12-07 17:03:11 -05:00
#totals
.total-wrapper#xp-wrapper
.total-count#xp-total 0
.total-label
span.spr(data-i18n="play_level.victory_experience_gained") XP Gained
| -
span.spl.spr(data-i18n="general.player_level") Level
span.level= me.level()
.xp-bar-outer
.xp-bar-already-achieved
.xp-bar-total
.total-wrapper#gem-wrapper
.total-count#gem-total 0
.total-label(data-i18n="play_level.victory_gems_gained") Gems Gained
2014-10-22 18:42:51 -04:00
2014-12-07 17:03:11 -05:00
if me.get('anonymous')
.sign-up-poke.hide
.sign-up-blurb(data-i18n="play_level.victory_sign_up_poke") Want to save your code? Create a free account!
2014-12-08 16:45:01 -05:00
button.btn.btn-illustrated.btn-warning.sign-up-button.btn-lg(data-dismiss="modal", data-i18n="play_level.victory_sign_up") Sign Up to Save Progress
2014-10-13 17:18:33 -04:00
2014-12-07 17:03:11 -05:00
button.btn.btn-illustrated.btn-lg.btn-warning.hide#saving-progress-label(disabled, data-i18n="play_level.victory_saving_progress") Saving Progress
2014-10-19 20:38:10 -04:00
2014-10-22 18:42:51 -04:00
.next-level-buttons
if readyToRank
.ladder-submission-view
else if level.get('type') === 'hero-ladder'
2014-12-07 17:03:11 -05:00
button.btn.btn-illustrated.btn-primary.btn-lg.return-to-ladder-button(data-href="/play/ladder/#{level.get('slug')}#my-matches", data-dismiss="modal", data-i18n="play_level.victory_return_to_ladder") Return to Ladder
2014-10-22 18:42:51 -04:00
else
2014-12-07 17:03:11 -05:00
button.btn.btn-illustrated.btn-success.btn-lg.world-map-button.next-level-button.hide#continue-button(data-i18n="play_level.victory_play_continue") Continue
2014-11-27 12:44:08 -05:00
2015-04-13 19:26:58 -04:00
if !me.get('anonymous') && !showHourOfCodeDoneButton && showLeaderboard
button.btn.btn-illustrated.btn-success.leaderboard-button.btn-lg(data-dismiss="modal", data-i18n="leaderboard.view_other_solutions") View Other Solutions
2015-08-04 14:35:10 -04:00
else if showReturnToCourse
button.btn.btn-illustrated.btn-warning.return-to-course-button.btn-lg(data-dismiss="modal", data-i18n="play_level.victory_go_home") Go Home
2015-04-13 19:26:58 -04:00
2014-11-27 12:44:08 -05:00
if showHourOfCodeDoneButton
.hour-of-code-done
a.image-link(href="http://code.org/api/hour/finish")
img(src="/images/level/csedweek-logo-final-small.jpg", alt="CS Ed Week Hour of Code", title="I'm finished with my Hour of Code", width=80)
strong(data-i18n="play_level.victory_hour_of_code_done") Are You Done?
a.text-link(href="http://code.org/api/hour/finish")
2015-04-07 14:19:22 -04:00
span(data-i18n="play_level.victory_hour_of_code_done_yes") Yes, I am finished with my Hour of Code!
.clearfix
.offer.lost-viking
p
img.pull-left(src="/file/db/level/55144b509f0c4854051769c1/viking1.png")
img.pull-right(src="/file/db/level/55144b509f0c4854051769c1/viking_2.png")
2015-04-16 21:35:40 -04:00
span(data-i18n="play_level.victory_viking_code_school")
2015-04-07 14:19:22 -04:00
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
2015-08-12 13:25:56 -04:00
.offer.a-mayhem-of-munchkins
p
2015-08-19 15:16:48 -04:00
img.pull-left(src="/file/db/level/55ca29439bc1892c835b0137/bloc_warrior.png")
img.pull-right(src="/file/db/level/55ca29439bc1892c835b0137/bloc_logo.png")
2015-08-12 13:25:56 -04:00
span(data-i18n="play_level.victory_bloc")
2015-09-18 11:27:37 -04:00
button.btn.btn-illustrated.btn-warning.btn-lg.world-map-button.skip-offer-button(data-i18n="play_level.victory_play_continue") Continue
2015-08-12 13:25:56 -04:00
button.btn.btn-illustrated.btn-primary.btn-lg.world-map-button.continue-from-offer-button(data-i18n="play_level.victory_bloc_cta")