Add shareable to admin classroom levels page

This commit is contained in:
Matt Lott 2016-07-24 08:09:12 -07:00
parent 9962ff83d4
commit 9ad7376edf

View file

@ -4,17 +4,26 @@ extends /templates/base
block content block content
h3 Classroom Levels
if !me.isAdmin() if !me.isAdmin()
div You must be logged in as an admin to view this page. div You must be logged in as an admin to view this page.
else else
p p
- var levelsTotal = 0; - var levelsTotal = 0;
table.table.table-striped.table-condensed
tr
th Levels
th Course
each course in view.courses.models each course in view.courses.models
- var campaign = view.campaigns.get(course.get('campaignID')); - var campaign = view.campaigns.get(course.get('campaignID'));
- var levels = campaign.getLevels().models; - var levels = campaign.getLevels().models;
- levelsTotal += levels.length; - levelsTotal += levels.length;
div #{levels.length} #{course.get('name')} tr
div #{levelsTotal} levels total td= levels.length
td= course.get('name')
tr
td= levelsTotal
td All
each course in view.courses.models each course in view.courses.models
- var campaign = view.campaigns.get(course.get('campaignID')); - var campaign = view.campaigns.get(course.get('campaignID'));
- var levels = campaign.getLevels().models; - var levels = campaign.getLevels().models;
@ -29,6 +38,7 @@ block content
th Type th Type
th Practice th Practice
th Practice Threshold (m) th Practice Threshold (m)
th Shareable
each level, levelIndex in levels each level, levelIndex in levels
- var levelNumber = campaign.getLevelNumber(level.get('original'), levelIndex + 1) - var levelNumber = campaign.getLevelNumber(level.get('original'), levelIndex + 1)
tr tr
@ -37,3 +47,4 @@ block content
td= level.get('type') td= level.get('type')
td= level.get('practice') td= level.get('practice')
td= level.get('practiceThresholdMinutes') td= level.get('practiceThresholdMinutes')
td= level.get('shareable')