codecombat/app/templates/admin/school-licenses.jade
2016-08-17 21:08:23 -07:00

39 lines
1.4 KiB
Text

extends /templates/base-flat
//- DO NOT TRANSLATE
block content
if !me.isAdmin()
div You must be logged in as an admin to view this page.
else if !view.schools
h3 Loading...
else
h3 School Active Licenses
.small Max: total licenses
.small Used: licenses redeemed
.small Activity: level sessions created in last 30 days
table.table.table-condensed
thead
th School
th Max
th Used 
th Activity
tr
td(style="height:26px;").range-container
each rangeKey in view.rangeKeys
span.range-background(style="left:#{rangeKey.startScale}%;width:#{rangeKey.width}%;background-color:#{rangeKey.color}")
span.range-dates(style="left:#{rangeKey.startScale}%;width:#{rangeKey.width}%;") #{rangeKey.name}
td(colspan=3)
each school in view.schools
each prepaid in school.prepaids
tr
td.range-container
span.range-background(style="left:#{prepaid.startScale}%;width:#{prepaid.rangeScale}%;")
span.range-dates(style="left:#{prepaid.startScale}%;")
span.spr #{prepaid.startDate.substring(0, 10)}
strong.spr #{school.name}
span #{prepaid.endDate.substring(0, 10)}
td #{prepaid.max} 
td #{prepaid.used}
td= school.activity