Tweaks based on CR from Rob

This commit is contained in:
Josh Callebaut 2016-08-25 15:52:49 -07:00
parent cb41100d2e
commit ff00091408
2 changed files with 19 additions and 17 deletions

View file

@ -14,21 +14,23 @@ block content
- var level = levelObj.level
tr
td.level-details
a(href='http://direct.codecombat.com/editor/level/'+level.get('slug') target="_blank")=level.get('name')
a(href='/editor/level/'+level.get('slug') target="_blank")=level.get('name')
div
ul
for problem in levelObj.problems
li.problem=problem
td(style='width:90%')
.panel.panel-default
.panel-heading
h2.panel-title
a(data-toggle='collapse' href='#'+level.get('slug')+'-overview-collapse') Overview
.panel-collapse.collapse.overview(id=level.get('slug')+'-overview-collapse')
pre=levelObj.overview ? levelObj.overview.body : 'NOPE'
.panel.panel-default
.panel-heading
h2.panel-title
a(data-toggle='collapse' href='#'+level.get('slug')+'-intro-collapse') Intro
.panel-collapse.collapse.intro(id=level.get('slug')+'-intro-collapse')
pre=levelObj.intro ? levelObj.intro.body : 'NOPE'
if levelObj.overview
.panel.panel-default
.panel-heading
h2.panel-title
a(data-toggle='collapse' href='#'+level.get('slug')+'-overview-collapse') Overview
.panel-collapse.collapse.overview(id=level.get('slug')+'-overview-collapse')
pre=levelObj.overview.body
if levelObj.intro
.panel.panel-default
.panel-heading
h2.panel-title
a(data-toggle='collapse' href='#'+level.get('slug')+'-intro-collapse') Intro
.panel-collapse.collapse.intro(id=level.get('slug')+'-intro-collapse')
pre=levelObj.intro.body

View file

@ -64,9 +64,9 @@ module.exports = class LevelGuidesView extends RootView
problems.push 'No Overview'
else
if not overview.i18n
problems.push 'Overview doesn't have i18n field'
problems.push 'Overview doesn\'t have i18n field'
if not overview.body
problems.push 'Overview doesn't have a body'
problems.push 'Overview doesn\'t have a body'
else
if level.get('campaign')?.indexOf('web') is -1
jsIndex = overview.body.indexOf('```javascript')
@ -77,9 +77,9 @@ module.exports = class LevelGuidesView extends RootView
problems.push 'No Intro'
else
if not intro.i18n
problems.push 'Intro doesn't have i18n field'
problems.push 'Intro doesn\'t have i18n field'
if not intro.body
problems.push 'Intro doesn't have a body'
problems.push 'Intro doesn\'t have a body'
else
if intro.body.indexOf('file/db') is -1
problems.push 'Intro is missing image'