Merge "Added StoryBoard administration module."
This commit is contained in:
commit
388f3dbd06
@ -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"
|
||||
}
|
||||
}
|
||||
|
42
src/app/admin/module.js
Normal file
42
src/app/admin/module.js
Normal file
@ -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: '<div ui-view></div>',
|
||||
url: '/admin',
|
||||
resolve: {
|
||||
isSuperuser: PermissionResolver
|
||||
.requirePermission('is_superuser', true)
|
||||
}
|
||||
})
|
||||
.state('admin.index', {
|
||||
url: '/index',
|
||||
templateUrl: 'app/admin/template/index.html'
|
||||
});
|
||||
});
|
25
src/app/admin/template/index.html
Normal file
25
src/app/admin/template/index.html
Normal file
@ -0,0 +1,25 @@
|
||||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h1>StoryBoard Administration</h1>
|
||||
|
||||
<p>No admin functions are defined yet. </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -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'
|
||||
|
@ -49,6 +49,14 @@
|
||||
<small class="visible-lg visible-md">Stories</small>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-divider" permission="is_superuser"></li>
|
||||
<li active-path="^\/admin.*" permission="is_superuser">
|
||||
<a href="#!/admin">
|
||||
<i class="fa fa-sliders fa-lg visible-sm visible-xs"></i>
|
||||
<i class="fa fa-sliders fa-3x visible-lg visible-md"></i>
|
||||
<small class="visible-lg visible-md">Admin</small>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="list-unstyled nav-bottom visible-md visible-lg">
|
||||
<li active-path="^\/page\/about.*$">
|
||||
|
Loading…
x
Reference in New Issue
Block a user