2014-05-20 06:46:37 -04:00
|
|
|
SearchView = require 'views/kinds/SearchView'
|
|
|
|
|
|
|
|
module.exports = class AchievementSearchView extends SearchView
|
|
|
|
id: "editor-achievement-home-view"
|
|
|
|
modelLabel: "Achievement"
|
|
|
|
model: require 'models/Achievement'
|
|
|
|
modelURL: '/db/achievement'
|
|
|
|
tableTemplate: require 'templates/editor/achievement/table'
|
2014-05-21 07:52:09 -04:00
|
|
|
projection: ['name', 'description', 'collection', 'slug']
|
2014-05-20 06:46:37 -04:00
|
|
|
|
|
|
|
getRenderData: ->
|
|
|
|
context = super()
|
|
|
|
context.currentEditor = 'editor.achievement_title'
|
|
|
|
context.currentNew = 'editor.new_achievement_title'
|
2014-05-31 17:19:55 -04:00
|
|
|
context.currentNewSignup = 'editor.new_achievement_title_login'
|
2014-05-20 06:46:37 -04:00
|
|
|
context.currentSearch = 'editor.achievement_search_title'
|
2014-05-31 17:55:26 -04:00
|
|
|
context.unauthorized = true unless me.isAdmin()
|
2014-05-20 06:46:37 -04:00
|
|
|
@$el.i18n()
|
2014-05-31 17:19:55 -04:00
|
|
|
context
|