Skip to content
Snippets Groups Projects
Commit b8c692ca authored by Allen Gilliland's avatar Allen Gilliland
Browse files

when you switch orgs in the admin section, stay within the admin section.

parent 4d7b6561
No related branches found
No related tags found
No related merge requests found
......@@ -66,8 +66,12 @@ CorvusControllers.controller('Corvus', ['$scope', '$location', 'CorvusCore', 'Co
CorvusAlert.alertError(message);
};
$scope.changeCurrOrg = function(orgSlug) {
$location.path('/' + orgSlug + '/');
$scope.changeCurrOrg = function(orgSlug, admin) {
if (admin) {
$location.path('/' + orgSlug + '/admin/');
} else {
$location.path('/' + orgSlug + '/');
}
};
$scope.refreshCurrentUser = function() {
......
......@@ -100,7 +100,7 @@
</span>
<ul class="Dropdown-content">
<li ng-repeat="organization in userMemberOf">
<a class="link block py1" href="#" ng-click="changeCurrOrg(organization.slug)">{{organization.name}}</a>
<a class="link block py1" href="#" ng-click="changeCurrOrg(organization.slug, true)">{{organization.name}}</a>
</li>
</ul>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment