diff --git a/app/templates/artisans/level-guides-view.jade b/app/templates/artisans/level-guides-view.jade index 5178081f5..bd64503d0 100644 --- a/app/templates/artisans/level-guides-view.jade +++ b/app/templates/artisans/level-guides-view.jade @@ -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 diff --git a/app/views/artisans/LevelGuidesView.coffee b/app/views/artisans/LevelGuidesView.coffee index 3dd9bf752..40e5b8fb2 100644 --- a/app/views/artisans/LevelGuidesView.coffee +++ b/app/views/artisans/LevelGuidesView.coffee @@ -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'