Added controller for overviews.
This commit is contained in:
parent
4a6681697f
commit
c4895b3fdf
2 changed files with 32 additions and 1 deletions
31
app/assets/javascripts/app/controllers/overview.js.coffee
Normal file
31
app/assets/javascripts/app/controllers/overview.js.coffee
Normal 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' )
|
||||||
|
|
|
@ -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' )
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue