This commit is contained in:
Nick Winter 2014-03-16 10:06:47 -07:00
commit 125ffa9f43
2 changed files with 46 additions and 49 deletions

View file

@ -1,19 +1,16 @@
// TODO: refactor to be like other modals extends /templates/modal/modal_base
.modal-dialog block modal-header-content
.modal-header
button(type='button', data-dismiss="modal", aria-hidden="true").close ×
h3 h3
span(data-i18n="play_level.victory_title_prefix") span(data-i18n="play_level.victory_title_prefix")
span= levelName span= levelName
span(data-i18n="play_level.victory_title_suffix") Complete span(data-i18n="play_level.victory_title_suffix") Complete
.modal-body block modal-body-content
img.victory-banner(src="/images/level/victory.png", alt="") img.victory-banner(src="/images/level/victory.png", alt="")
div!= body div!= body
.modal-footer block modal-footer-content
if readyToRank if readyToRank
button.btn.btn-success.rank-game-button(data-i18n="play_level.victory_rank_my_game") Rank My Game button.btn.btn-success.rank-game-button(data-i18n="play_level.victory_rank_my_game") Rank My Game
else if level.get('type') === 'ladder' else if level.get('type') === 'ladder'
@ -47,7 +44,6 @@
iframe.github-star-button(src="http://ghbtns.com/github-btn.html?user=codecombat&repo=codecombat&type=watch&count=true", allowtransparency="true", frameborder="0", scrolling="0", width="110", height="20") iframe.github-star-button(src="http://ghbtns.com/github-btn.html?user=codecombat&repo=codecombat&type=watch&count=true", allowtransparency="true", frameborder="0", scrolling="0", width="110", height="20")
if showHourOfCodeDoneButton if showHourOfCodeDoneButton
.modal-footer
h3.pull-left(data-i18n="play_level.victory_hour_of_code_done") Are You Done? h3.pull-left(data-i18n="play_level.victory_hour_of_code_done") Are You Done?
a(href="http://code.org/api/hour/finish") a(href="http://code.org/api/hour/finish")
strong(data-i18n="play_level.victory_hour_of_code_done_yes") Yes, I'm finished with my Hour of Code! strong(data-i18n="play_level.victory_hour_of_code_done_yes") Yes, I'm finished with my Hour of Code!

View file

@ -17,6 +17,7 @@ UserSchema.pre('init', (next) ->
return next() unless jsonschema.properties? return next() unless jsonschema.properties?
for prop, sch of jsonschema.properties for prop, sch of jsonschema.properties
@set(prop, sch.default) if sch.default? @set(prop, sch.default) if sch.default?
@set('permissions', ['admin']) if not isProduction
next() next()
) )