2015-09-03 14:04:40 -04:00
|
|
|
|
extends /templates/base
|
|
|
|
|
|
|
|
|
|
block content
|
|
|
|
|
|
2015-09-23 19:27:45 -04:00
|
|
|
|
if (noCourseInstance || noCourseInstanceSelected) && course
|
|
|
|
|
h1= course.get('name')
|
|
|
|
|
if noCourseInstance
|
2015-09-25 15:51:51 -04:00
|
|
|
|
p(data-i18n="courses.not_enrolled")
|
2015-09-23 19:27:45 -04:00
|
|
|
|
p
|
2015-09-25 15:51:51 -04:00
|
|
|
|
span.spr(data-i18n="courses.visit_pref")
|
|
|
|
|
a(href="/courses", data-i18n="courses.courses")
|
|
|
|
|
span.spl(data-i18n="courses.visit_suf")
|
2015-09-23 19:27:45 -04:00
|
|
|
|
else if noCourseInstanceSelected
|
2015-09-25 15:51:51 -04:00
|
|
|
|
p(data-i18n="courses.select_class")
|
2015-09-23 19:27:45 -04:00
|
|
|
|
.container-fluid
|
|
|
|
|
.row
|
|
|
|
|
.col-md-6
|
|
|
|
|
select.form-control.select-instance
|
|
|
|
|
each courseInstance in courseInstances
|
|
|
|
|
if courseInstance.get('name')
|
|
|
|
|
option(value="#{courseInstance.id}")= courseInstance.get('name')
|
|
|
|
|
else
|
2015-09-25 15:51:51 -04:00
|
|
|
|
option(value="#{courseInstance.id}", data-i18n="courses.unnamed")
|
2015-09-23 19:27:45 -04:00
|
|
|
|
.col-md-6
|
2015-09-25 15:51:51 -04:00
|
|
|
|
button.btn.btn-success.btn-select-instance(data-i18n="courses.select")
|
2015-09-13 01:01:59 -04:00
|
|
|
|
else if !course || !courseInstance
|
2015-09-25 15:51:51 -04:00
|
|
|
|
h1(data-i18n="common.loading") Loading...
|
2015-09-03 14:04:40 -04:00
|
|
|
|
else
|
2015-12-01 20:23:33 -05:00
|
|
|
|
p
|
|
|
|
|
// TODO: format this text all good and stuff
|
|
|
|
|
strong
|
2015-11-09 21:08:39 -05:00
|
|
|
|
if courseInstance.get('name')
|
2015-12-01 20:23:33 -05:00
|
|
|
|
span= courseInstance.get('name')
|
2015-11-09 21:08:39 -05:00
|
|
|
|
else if view.classroom.get('name')
|
2015-12-01 20:23:33 -05:00
|
|
|
|
span= view.classroom.get('name')
|
2015-11-09 21:08:39 -05:00
|
|
|
|
else
|
|
|
|
|
span(data-i18n='courses.unnamed_class')
|
2015-12-01 20:23:33 -05:00
|
|
|
|
|
|
|
|
|
if !view.owner.isNew() && view.getOwnerName()
|
|
|
|
|
span.spl.spr - Teacher:
|
2015-12-02 12:52:52 -05:00
|
|
|
|
//a(href="/user/#{view.owner.id}") // Don't link to profiles until we improve them
|
|
|
|
|
span
|
2015-10-27 20:47:48 -04:00
|
|
|
|
strong= view.getOwnerName()
|
2015-09-03 14:04:40 -04:00
|
|
|
|
|
2015-12-01 20:23:33 -05:00
|
|
|
|
h1
|
|
|
|
|
| #{course.get('name')}
|
|
|
|
|
if view.courseComplete
|
|
|
|
|
span.spl - Complete!
|
|
|
|
|
|
2015-09-03 14:04:40 -04:00
|
|
|
|
p
|
2015-09-13 01:01:59 -04:00
|
|
|
|
if courseInstance.get('description')
|
|
|
|
|
each line in courseInstance.get('description').split('\n')
|
|
|
|
|
div= line
|
2015-12-02 12:52:52 -05:00
|
|
|
|
|
|
|
|
|
if view.courseComplete && !view.teacherMode
|
|
|
|
|
.jumbotron
|
2015-12-02 13:59:55 -05:00
|
|
|
|
if promptForSchool
|
|
|
|
|
.row
|
|
|
|
|
.col-md-6.col-md-offset-3
|
|
|
|
|
form.form#school-form
|
|
|
|
|
.form-group
|
|
|
|
|
label.control-label(for="course-complete-school-input")
|
|
|
|
|
span.spr(data-i18n="signup.school_name") School Name and City
|
|
|
|
|
em.optional-note
|
|
|
|
|
| (
|
|
|
|
|
span(data-i18n="signup.optional") optional
|
|
|
|
|
| ):
|
|
|
|
|
.input-border
|
|
|
|
|
input#course-complete-school-input.input-large.form-control(name="schoolName", data-i18n="[placeholder]signup.school_name_placeholder")
|
|
|
|
|
button.btn.btn-primary.btn-submit.no-school(type="submit") None
|
|
|
|
|
button.btn.btn-info.btn-submit.save-school(type="submit") Save
|
2015-12-02 12:52:52 -05:00
|
|
|
|
.row
|
|
|
|
|
if view.singlePlayerMode && !me.isAnonymous()
|
2015-12-02 13:59:55 -05:00
|
|
|
|
.col-md-6.col-md-offset-3
|
2015-12-02 12:52:52 -05:00
|
|
|
|
a.btn.btn-lg.btn-success(href="/play")
|
|
|
|
|
h1 Play the Campaign
|
|
|
|
|
p You’re ready to take the next step! Explore hundreds of challenging levels, learn advanced programming skills, and compete in multiplayer arenas!
|
|
|
|
|
else if view.singlePlayerMode && me.isAnonymous()
|
|
|
|
|
.col-md-6
|
|
|
|
|
a.btn.btn-lg.btn-success.signup-button
|
|
|
|
|
h1 Create an Account
|
|
|
|
|
p Sign up for a FREE CodeCombat account and gain access to more levels, more programming skills, and more fun!
|
|
|
|
|
.col-md-6
|
|
|
|
|
a.btn.btn-lg.btn-success(href="/play")
|
|
|
|
|
h1 Preview Campaign
|
|
|
|
|
p Take a sneak peek at all that CodeCombat has to offer before signing up for your FREE account.
|
|
|
|
|
else if !view.singlePlayerMode
|
|
|
|
|
.col-md-6
|
|
|
|
|
if view.arenaLevel
|
|
|
|
|
a.btn.btn-lg.btn-success.btn-play-level(data-level-slug=view.arenaLevel.slug, data-level-id=view.arenaLevel.original)
|
|
|
|
|
h1
|
|
|
|
|
span Arena
|
|
|
|
|
| :
|
|
|
|
|
span.spl= view.arenaLevel.name
|
|
|
|
|
p= view.arenaLevel.description.replace(/!\[.*?\)/, '')
|
|
|
|
|
else
|
|
|
|
|
a.btn.btn-lg.btn-success.disabled
|
|
|
|
|
h1 Arena Coming Soon
|
|
|
|
|
p We are working on a multiplayer arena for classrooms at the end of #{course.get('name')}.
|
|
|
|
|
.col-md-6
|
|
|
|
|
if view.nextCourseInstance
|
|
|
|
|
a.btn.btn-lg.btn-success(href="/courses/#{view.nextCourse.id}/#{view.nextCourseInstance.id}")
|
|
|
|
|
h1= view.nextCourse.get('name')
|
|
|
|
|
p= view.nextCourse.get('description')
|
|
|
|
|
else if view.nextCourse
|
|
|
|
|
a.btn.btn-lg.btn-success.disabled
|
|
|
|
|
h1= view.nextCourse.get('name')
|
|
|
|
|
p
|
|
|
|
|
em NOT ENROLLED
|
|
|
|
|
p Ask your teacher to enroll you in the next course.
|
|
|
|
|
else
|
|
|
|
|
a.btn.btn-lg.btn-success(disabled=!view.nextCourse ? "disabled" : "")
|
|
|
|
|
h1 Next Course
|
|
|
|
|
p
|
|
|
|
|
em COMING SOON
|
|
|
|
|
p We are hard at work making more courses for you!
|
|
|
|
|
|
2015-12-03 19:20:53 -05:00
|
|
|
|
.available-courses-title Available Levels
|
|
|
|
|
table.table.table-striped.table-condensed
|
|
|
|
|
thead
|
2015-09-13 01:01:59 -04:00
|
|
|
|
tr
|
2015-12-03 19:20:53 -05:00
|
|
|
|
th
|
|
|
|
|
th(data-i18n="clans.status")
|
|
|
|
|
th(data-i18n="resources.level")
|
|
|
|
|
th(data-i18n="courses.concepts")
|
|
|
|
|
tbody
|
|
|
|
|
if campaign
|
|
|
|
|
- var lastLevelCompleted = true;
|
|
|
|
|
- var levelCount = 0;
|
|
|
|
|
each level, levelID in campaign.get('levels')
|
|
|
|
|
tr
|
|
|
|
|
td
|
|
|
|
|
if lastLevelCompleted || view.teacherMode
|
|
|
|
|
- var i18n = level.type === 'course-ladder' ? 'play.compete' : 'home.play';
|
|
|
|
|
button.btn.btn-success.btn-play-level(data-level-slug=level.slug, data-i18n=i18n, data-level-id=levelID)
|
|
|
|
|
td
|
|
|
|
|
if userLevelStateMap[me.id]
|
|
|
|
|
div= userLevelStateMap[me.id][levelID]
|
|
|
|
|
- lastLevelCompleted = userLevelStateMap[me.id][levelID] === 'complete'
|
|
|
|
|
else
|
|
|
|
|
- lastLevelCompleted = false
|
|
|
|
|
td= ++levelCount + '. ' + level.name.replace('Course: ', '')
|
|
|
|
|
td
|
|
|
|
|
if levelConceptMap[levelID]
|
|
|
|
|
each concept in course.get('concepts')
|
|
|
|
|
if levelConceptMap[levelID][concept]
|
|
|
|
|
span.spr.concept(data-i18n="concepts." + concept)
|