mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-24 22:42:25 -05:00
20 lines
704 B
CoffeeScript
20 lines
704 B
CoffeeScript
|
SearchView = require 'views/common/SearchView'
|
||
|
|
||
|
module.exports = class PollSearchView extends SearchView
|
||
|
id: 'editor-poll-home-view'
|
||
|
modelLabel: 'Poll'
|
||
|
model: require 'models/Poll'
|
||
|
modelURL: '/db/poll'
|
||
|
tableTemplate: require 'templates/editor/poll/poll-search-table'
|
||
|
projection: ['name', 'description', 'slug', 'priority', 'created']
|
||
|
|
||
|
getRenderData: ->
|
||
|
context = super()
|
||
|
context.currentEditor = 'editor.poll_title'
|
||
|
context.currentNew = 'editor.new_poll_title'
|
||
|
context.currentNewSignup = 'editor.new_poll_title_login'
|
||
|
context.currentSearch = 'editor.poll_search_title'
|
||
|
context.newModelsAdminOnly = true
|
||
|
context.unauthorized = true unless me.isAdmin()
|
||
|
context
|