mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Set up /courses for individuals without any course instances
This commit is contained in:
parent
b734beb852
commit
d255802e38
3 changed files with 12 additions and 1 deletions
|
@ -88,6 +88,10 @@ block content
|
|||
+course-instance-body(courseInstance)
|
||||
.clearfix
|
||||
|
||||
else
|
||||
.text-center
|
||||
button#start-new-game-btn.btn.btn-success.btn-lg Start New Game
|
||||
|
||||
h3.text-uppercase Join A Class
|
||||
hr
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ module.exports = class ChooseLanguageModal extends ModalView
|
|||
'click .lang-choice-btn': 'onClickLanguageChoiceButton'
|
||||
|
||||
initialize: (options) ->
|
||||
options ?= {}
|
||||
@logoutFirst = options.logoutFirst
|
||||
|
||||
onClickLanguageChoiceButton: (e) ->
|
||||
|
|
|
@ -5,6 +5,7 @@ template = require 'templates/courses/courses-view'
|
|||
StudentLogInModal = require 'views/courses/StudentLogInModal'
|
||||
StudentSignUpModal = require 'views/courses/StudentSignUpModal'
|
||||
ChangeCourseLanguageModal = require 'views/courses/ChangeCourseLanguageModal'
|
||||
ChooseLanguageModal = require 'views/courses/ChooseLanguageModal'
|
||||
CourseInstance = require 'models/CourseInstance'
|
||||
CocoCollection = require 'collections/CocoCollection'
|
||||
Course = require 'models/Course'
|
||||
|
@ -62,7 +63,12 @@ module.exports = class CoursesView extends RootView
|
|||
@joinClass()
|
||||
|
||||
onClickStartNewGameButton: ->
|
||||
if me.isAnonymous()
|
||||
@openSignUpModal()
|
||||
else
|
||||
modal = new ChooseLanguageModal()
|
||||
@openModalView(modal)
|
||||
@listenToOnce modal, 'set-language', @startHourOfCodePlay
|
||||
|
||||
onClickLogInButton: ->
|
||||
modal = new StudentLogInModal()
|
||||
|
|
Loading…
Reference in a new issue