Added profile side menu and submenu
I'm making space in the UI to allow a user to manage their own Auth tokens, which fits more under the purview of profile and preferences. I figure it makes more sense in the sidebar under admin than in the dropdown in the header. Change-Id: I57fec47ae71b4e91acc28f279e5751fd4e164b95
This commit is contained in:
parent
8cf3d9ff4f
commit
131afcc2af
@ -35,11 +35,18 @@ angular.module('sb.profile',
|
||||
$stateProvider
|
||||
.state('profile', {
|
||||
abstract: true,
|
||||
template: '<div ui-view></div>',
|
||||
url: '/profile',
|
||||
resolve: {
|
||||
isLoggedIn: SessionResolver.requireLoggedIn,
|
||||
currentUser: SessionResolver.requireCurrentUser
|
||||
},
|
||||
views : {
|
||||
'submenu@': {
|
||||
templateUrl: 'app/profile/template/profile_submenu.html'
|
||||
},
|
||||
'@': {
|
||||
template: '<div ui-view></div>'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('profile.preferences', {
|
||||
|
23
src/app/profile/template/profile_submenu.html
Normal file
23
src/app/profile/template/profile_submenu.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<ul class="nav nav-pills nav-stacked text-center">
|
||||
<li active-path="^\/profile/preferences.*">
|
||||
<a href="#!/profile/preferences" title="Preferences">
|
||||
<i class="fa fa-sb-profile-preferences fa-lg"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
@ -68,13 +68,6 @@
|
||||
<i class="fa fa-caret-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li active-path="^\/profile\/preferences*">
|
||||
<a href="#!/profile/preferences">
|
||||
<i class="fa fa-gear"></i>
|
||||
Preferences
|
||||
</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="#!/auth/deauthorize">
|
||||
<i class="fa fa-sign-out"></i>
|
||||
|
@ -49,11 +49,18 @@
|
||||
<small class="visible-lg visible-md">Stories</small>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-divider" permission="is_superuser"></li>
|
||||
<li class="nav-divider" ng-if="isLoggedIn"></li>
|
||||
<li active-path="^\/profile.*" ng-if="isLoggedIn">
|
||||
<a href="#!/profile">
|
||||
<i class="fa fa-sb-profile fa-lg visible-sm visible-xs"></i>
|
||||
<i class="fa fa-sb-profile fa-3x visible-lg visible-md"></i>
|
||||
<small class="visible-lg visible-md">Profile</small>
|
||||
</a>
|
||||
</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>
|
||||
<i class="fa fa-sb-admin fa-lg visible-sm visible-xs"></i>
|
||||
<i class="fa fa-sb-admin fa-3x visible-lg visible-md"></i>
|
||||
<small class="visible-lg visible-md">Admin</small>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -26,3 +26,6 @@
|
||||
.@{fa-css-prefix}-sb-project:before { content: @fa-var-cube; }
|
||||
.@{fa-css-prefix}-sb-project-group:before { content: @fa-var-cubes; }
|
||||
.@{fa-css-prefix}-sb-team:before { content: @fa-var-users; }
|
||||
.@{fa-css-prefix}-sb-admin:before { content: @fa-var-gears; }
|
||||
.@{fa-css-prefix}-sb-profile:before { content: @fa-var-user; }
|
||||
.@{fa-css-prefix}-sb-profile-preferences:before { content: @fa-var-gear; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user