2014-11-28 20:49:41 -05:00
|
|
|
SearchView = require 'views/common/SearchView'
|
2014-05-20 06:46:37 -04:00
|
|
|
|
|
|
|
module.exports = class AchievementSearchView extends SearchView
|
2014-06-30 22:16:26 -04:00
|
|
|
id: 'editor-achievement-home-view'
|
|
|
|
modelLabel: 'Achievement'
|
2014-05-20 06:46:37 -04:00
|
|
|
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-12-20 19:02:41 -05:00
|
|
|
context.newModelsAdminOnly = true
|
2015-02-25 21:41:39 -05:00
|
|
|
context.unauthorized = true unless me.isAdmin() or me.isArtisan()
|
2014-05-31 17:19:55 -04:00
|
|
|
context
|