mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-01 15:50:11 -04:00
Add direct link to play game/web-dev creations while coding them
This commit is contained in:
parent
5d26b03918
commit
6ae89e31f1
3 changed files with 12 additions and 0 deletions
app
|
@ -21,4 +21,13 @@
|
|||
.btn.btn-small.btn-illustrated.hints-button
|
||||
span(data-i18n="play_level.hints")
|
||||
|
||||
if view.options.level.isType('game-dev', 'web-dev')
|
||||
- var url = '/play/' + view.options.level.get('type') + '-level/' + view.options.level.get('slug') + '/' + view.options.session.id;
|
||||
- if (view.options.courseID) url += '?course=' + view.options.courseID;
|
||||
a.btn.btn-small.btn-illustrated(href=url)
|
||||
if view.options.level.isType('game-dev')
|
||||
span(data-i18n='') Game
|
||||
else
|
||||
span(data-i18n='') Webpage
|
||||
|
||||
.clearfix
|
||||
|
|
|
@ -54,6 +54,8 @@ module.exports = class Spell
|
|||
supermodel: @supermodel
|
||||
codeLanguage: @language
|
||||
level: options.level
|
||||
session: options.session
|
||||
courseID: options.courseID
|
||||
@topBarView.render()
|
||||
Backbone.Mediator.publish 'tome:spell-created', spell: @
|
||||
|
||||
|
|
|
@ -122,6 +122,7 @@ module.exports = class TomeView extends CocoView
|
|||
levelID: @options.levelID
|
||||
level: @options.level
|
||||
god: @options.god
|
||||
courseID: @options.courseID
|
||||
|
||||
for thangID, spellKeys of @thangSpells
|
||||
thang = @fakeProgrammableThang ? world.getThangByID thangID
|
||||
|
|
Loading…
Add table
Reference in a new issue