From 582b74ab5c5c38384e68cea94cd68b728f208d86 Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Mon, 7 Jul 2014 12:48:24 -0700 Subject: [PATCH] Added StoryBoard administration module. This adds the storyboard administration module, with a placeholder dashboard that indicates that future functionality is coming. Change-Id: Ibb9fc799e6434691b3bb80ef47948d1f5f501014 --- bower.json | 5 +-- src/app/admin/module.js | 42 ++++++++++++++++++++++ src/app/admin/template/index.html | 25 +++++++++++++ src/app/storyboard/module.js | 3 +- src/app/storyboard/template/side_menu.html | 8 +++++ 5 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 src/app/admin/module.js create mode 100644 src/app/admin/template/index.html diff --git a/bower.json b/bower.json index 4c326feb..3318c860 100644 --- a/bower.json +++ b/bower.json @@ -2,7 +2,7 @@ "name": "storyboard-webclient", "version": "0.0.1", "dependencies": { - "font-awesome": "4.0", + "font-awesome": "4.1.0", "angular": "1.2.18", "angular-resource": "1.2.18", "angular-sanitize": "1.2.18", @@ -18,6 +18,7 @@ "angular-scenario": "1.2.18" }, "resolutions": { - "angular": "1.2.18" + "angular": "1.2.18", + "font-awesome": "4.1.0" } } diff --git a/src/app/admin/module.js b/src/app/admin/module.js new file mode 100644 index 00000000..a7d9a04a --- /dev/null +++ b/src/app/admin/module.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2014 Hewlett-Packard Development Company, L.P. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * The StoryBoard administration module. + */ +angular.module('sb.admin', [ 'sb.services', 'sb.templates', 'ui.router']) + .config(function ($stateProvider, $urlRouterProvider, PermissionResolver) { + 'use strict'; + + // Routing Defaults. + $urlRouterProvider.when('/admin', '/admin/index'); + + // Declare the states for this module. + $stateProvider + .state('admin', { + abstract: true, + template: '
', + url: '/admin', + resolve: { + isSuperuser: PermissionResolver + .requirePermission('is_superuser', true) + } + }) + .state('admin.index', { + url: '/index', + templateUrl: 'app/admin/template/index.html' + }); + }); \ No newline at end of file diff --git a/src/app/admin/template/index.html b/src/app/admin/template/index.html new file mode 100644 index 00000000..e710989a --- /dev/null +++ b/src/app/admin/template/index.html @@ -0,0 +1,25 @@ + + +
+
+
+

StoryBoard Administration

+ +

No admin functions are defined yet.

+
+
+
\ No newline at end of file diff --git a/src/app/storyboard/module.js b/src/app/storyboard/module.js index b3d35ca0..e09bf08f 100644 --- a/src/app/storyboard/module.js +++ b/src/app/storyboard/module.js @@ -25,7 +25,8 @@ angular.module('storyboard', [ 'sb.services', 'sb.templates', 'sb.dashboard', 'sb.pages', 'sb.projects', 'sb.auth', 'sb.story', 'sb.profile', 'sb.notification', 'sb.search', - 'ui.router', 'ui.bootstrap', 'monospaced.elastic', 'angularMoment']) + 'sb.admin', 'ui.router', 'ui.bootstrap', 'monospaced.elastic', + 'angularMoment']) .constant('angularMomentConfig', { preprocess: 'utc', timezone: 'UTC' diff --git a/src/app/storyboard/template/side_menu.html b/src/app/storyboard/template/side_menu.html index 8b196005..adcab0cc 100644 --- a/src/app/storyboard/template/side_menu.html +++ b/src/app/storyboard/template/side_menu.html @@ -49,6 +49,14 @@ Stories + +
  • + + + + Admin + +