mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-25 21:43:47 -04:00
Courses UI: Add teachers mode button to landing page
This commit is contained in:
parent
a1927bf8cc
commit
545567a24b
2 changed files with 11 additions and 1 deletions
app
|
@ -49,9 +49,11 @@ block content
|
|||
.col-md-12
|
||||
button.btn.btn-success.btn-lg.btn-buy Buy this course
|
||||
|
||||
br
|
||||
if !studentMode
|
||||
br
|
||||
button.btn.btn-warning.btn-student Students Click Here
|
||||
else
|
||||
button.btn.btn-warning.btn-teacher Teachers Click Here
|
||||
|
||||
h1.center Courses on CodeCombat
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ module.exports = class CoursesView extends RootView
|
|||
'click .btn-enroll': 'onClickEnroll'
|
||||
'click .btn-enter': 'onClickEnter'
|
||||
'click .btn-student': 'onClickStudent'
|
||||
'click .btn-teacher': 'onClickTeacher'
|
||||
'hidden.bs.modal #continueModal': 'onHideContinueModal'
|
||||
|
||||
constructor: (options) ->
|
||||
|
@ -107,5 +108,12 @@ module.exports = class CoursesView extends RootView
|
|||
navigationEvent = route: route, viewClass: viewClass, viewArgs: viewArgs
|
||||
Backbone.Mediator.publish 'router:navigate', navigationEvent
|
||||
|
||||
onClickTeacher: (e) ->
|
||||
route = "/courses/mock1?student=false"
|
||||
viewClass = require 'views/courses/mock1/CoursesView'
|
||||
viewArgs = [studentMode: false]
|
||||
navigationEvent = route: route, viewClass: viewClass, viewArgs: viewArgs
|
||||
Backbone.Mediator.publish 'router:navigate', navigationEvent
|
||||
|
||||
onHideContinueModal: (e) ->
|
||||
$('#continueModal .row-pick-class').hide()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue