Added controller for overviews.

This commit is contained in:
Martin Edenhofer 2012-11-07 09:10:17 +01:00
parent 4a6681697f
commit c4895b3fdf
2 changed files with 32 additions and 1 deletions

View file

@ -0,0 +1,31 @@
$ = jQuery.sub()
class Index extends App.Controller
constructor: ->
super
# check authentication
return if !@authenticate()
new App.ControllerGenericIndex(
el: @el,
id: @id,
genericObject: 'TextModule',
pageData: {
title: 'TextModules',
home: 'text_modules',
object: 'TextModule',
objects: 'TextModules',
navupdate: '#text_modules',
notes: [
'TextModules are ...'
],
buttons: [
{ name: 'New TextModule', 'data-type': 'new', class: 'primary' },
],
},
)
App.Config.set( 'overviews', Index, 'Routes' )
App.Config.set( 'Overview', { prio: 2300, parent: '#admin', name: 'Overviews', target: '#overviews', role: ['Admin'] }, 'NavBar' )

View file

@ -27,5 +27,5 @@ class Index extends App.Controller
) )
App.Config.set( 'text_modules', Index, 'Routes' ) App.Config.set( 'text_modules', Index, 'Routes' )
App.Config.set( 'AdminTextModule', { prio: 2300, parent: '#admin', name: 'Text Modules', target: '#text_modules', role: ['Admin'] }, 'NavBar' ) App.Config.set( 'TextModule', { prio: 2300, parent: '#admin', name: 'Text Modules', target: '#text_modules', role: ['Admin'] }, 'NavBar' )