Skip to content

Commit

Permalink
Add new module to left menu
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximeSangoi committed Dec 19, 2014
1 parent ff19331 commit a52fcdd
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
9 changes: 9 additions & 0 deletions www/base/src/app/settings/settings.controller.coffee
@@ -0,0 +1,9 @@
class Settings extends Controller
constructor: ($scope, config, fieldsService) ->
# All settings definition
#

$scope.settings =
settings1: fieldsService.checkbox("Settings 1")
settings2: fieldsService.checkbox("Settings 2")
settings3: fieldsService.radio("Settings 3")
27 changes: 27 additions & 0 deletions www/base/src/app/settings/settings.route.coffee
@@ -0,0 +1,27 @@
class Settings extends Config
constructor: ($stateProvider, glMenuServiceProvider) ->

# Name of the state
name = 'settings'

# Menu configuration
glMenuServiceProvider.addGroup
name: name
caption: 'Settings'
icon: 'user'
order: 99

# Configuration
cfg =
group: name
caption: 'Settings'

# Register new state
state =
controller: "#{name}Controller"
templateUrl: "views/#{name}.html"
name: name
url: '/settings'
data: cfg

$stateProvider.state(state)
9 changes: 9 additions & 0 deletions www/base/src/app/settings/settings.tpl.jade
@@ -0,0 +1,9 @@
.container
.row
.well
h2 About this buildbot
.row
div
bbcheckbox(data="settings.settings1")
bbcheckbox(data="settings.settings2")
bbradio(data="settings.settings3")

0 comments on commit a52fcdd

Please sign in to comment.