Improved logging (winston) and admin-only'd the achievement editor

This commit is contained in:
Ruben Vereecken 2014-05-31 23:55:26 +02:00
parent 5aa211cabd
commit 7096a07ce8
4 changed files with 3 additions and 10 deletions
app
templates/kinds
views

View file

@ -37,6 +37,7 @@ block content
h3(data-i18n="play_level.tip_reticulating") Reticulating Splines...
.progress.progress-striped.active
.progress-bar
else
.alert.alert-danger
span Admin only. Turn around.

View file

@ -46,7 +46,6 @@ module.exports = class AchievementEditView extends View
@treema = @$el.find('#achievement-treema').treema(options)
@treema.build()
console.log @treema
pushChangesToPreview: =>
'TODO' # TODO might want some intrinsic preview thing

View file

@ -8,13 +8,6 @@ module.exports = class AchievementSearchView extends SearchView
tableTemplate: require 'templates/editor/achievement/table'
projection: ['name', 'description', 'collection', 'slug']
initialize: ->
console.log me.isAdmin()
unless me.isAdmin()
NotFoundView = require '../../not_found'
return new NotFoundView
else super()
getRenderData: ->
context = super()
context.currentEditor = 'editor.achievement_title'

View file

@ -38,8 +38,8 @@ module.exports = class RootView extends CocoView
me.set(val, me.get(val) + 1)
console.debug me.get(val)
me.save()
test = new Achievement(_id:'537ce4855c91b8d1dda7fda8')
test.fetch(success:@showNewAchievement)
#test = new Achievement(_id:'537ce4855c91b8d1dda7fda8')
#test.fetch(success:@showNewAchievement)
showNewAchievement: (achievement) ->
currentLevel = me.level()