small improvents
This commit is contained in:
parent
22b28cb023
commit
37348fce3a
3 changed files with 20 additions and 6 deletions
|
@ -176,10 +176,12 @@ module.controller('RealmDropdownCtrl', function($scope, Realm, Current, Auth, $l
|
|||
var show = false;
|
||||
for (var key in Current.realms) {
|
||||
if (typeof Current.realms[key] != "function") {
|
||||
if (Current.realms[key] == Current.realm) {
|
||||
$scope.currentRealmId = key;
|
||||
}
|
||||
show = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Auth.loggedIn && show;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
</ul>
|
||||
</li>
|
||||
</ul> -->
|
||||
<h3 data-ng-show="showNav()"><span class="gray pull-left">Realm: </span></h3>
|
||||
<ul class="nav pull-left" data-ng-show="showNav()">
|
||||
<li class="divider-vertical-right"><a href="#/realms/{{currentRealmId}}">Realm</a></li>
|
||||
</ul>
|
||||
<select class="nav pull-left" data-ng-show="showNav()" ng-change="changeRealm()" ng-model="current.realm" ng-options="name for (id, name) in current.realms">
|
||||
</select>
|
||||
<!-- <select class="nav pull-left" ng-options="r.name for r in current.realms"></select> -->
|
||||
|
@ -30,7 +32,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
<ul class="nav pull-right" data-ng-show="auth.loggedIn">
|
||||
<li class="divider-vertical-left" data-ng-class="path[0] == 'realms' && 'active'"
|
||||
<li class="divider-vertical-left" data-ng-class="path[0] == 'create' && path[1] == 'realm' && 'active'"
|
||||
data-ng-show="auth.loggedIn"><a href="#/create/realm">New Realm</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
<div data-ng-hide="createRealm">
|
||||
<nav id="local-nav">
|
||||
<ul class="nav nav-list">
|
||||
<li data-ng-class="!path[2] && 'active'"><a href="#/realms/{{realm.id}}">Realm Settings</a>
|
||||
<li data-ng-class="!path[2] && 'active'"><a href="#/realms/{{realm.id}}">Realm Settings</a></li>
|
||||
<li data-ng-class="path[2] == 'roles' && 'active'"><a href="#/realms/{{realm.id}}/roles">Realm Roles</a>
|
||||
<ul class="sub-items">
|
||||
<li data-ng-class="path[0] == 'create' && path[1] == 'role' && 'active'"><a
|
||||
href="#/create/role/{{realm.id}}">Add Role</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-ng-class="path[2] == 'users' && 'active'"><a href="#/realms/{{realm.id}}/users">Realm Users</a>
|
||||
<ul class="sub-items">
|
||||
<li data-ng-class="path[0] == 'create' && path[1] == 'user' && 'active'"><a
|
||||
href="#/create/user/{{realm.id}}">Add User</a></li>
|
||||
<li data-ng-class="path[0] == 'find' && path[1] == 'user' && 'active'"><a
|
||||
href="#/find/user/{{realm.id}}">Find User</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-ng-class="path[2] == 'roles' && 'active'"><a href="#/realms/{{realm.id}}/roles">Realm Roles</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
Loading…
Reference in a new issue