link to admin user list

This commit is contained in:
Athou
2013-04-10 16:55:51 +02:00
parent 59d10acbb6
commit ae42170090
2 changed files with 74 additions and 63 deletions

View File

@@ -192,8 +192,9 @@ module.controller('CategoryTreeCtrl', function($scope, $timeout, $stateParams,
}); });
}); });
module.controller('ToolbarCtrl', function($scope, $http, $state, $stateParams, module.controller('ToolbarCtrl',
$route, $location, SettingsService, EntryService, SubscriptionService, function($scope, $http, $state, $stateParams, $route, $location,
SettingsService, EntryService, SubscriptionService,
SessionService) { SessionService) {
function totalActiveAjaxRequests() { function totalActiveAjaxRequests() {
@@ -208,14 +209,14 @@ module.controller('ToolbarCtrl', function($scope, $http, $state, $stateParams,
}); });
$scope.settingsService = SettingsService; $scope.settingsService = SettingsService;
$scope.$watch('settingsService.settings.readingMode', function(newValue, $scope.$watch('settingsService.settings.readingMode', function(
oldValue) { newValue, oldValue) {
if (newValue && oldValue && newValue != oldValue) { if (newValue && oldValue && newValue != oldValue) {
SettingsService.save(); SettingsService.save();
} }
}); });
$scope.$watch('settingsService.settings.readingOrder', function(newValue, $scope.$watch('settingsService.settings.readingOrder', function(
oldValue) { newValue, oldValue) {
if (newValue && oldValue && newValue != oldValue) { if (newValue && oldValue && newValue != oldValue) {
SettingsService.save(); SettingsService.save();
} }
@@ -247,7 +248,8 @@ module.controller('ToolbarCtrl', function($scope, $http, $state, $stateParams,
$scope.toggleOrder = function() { $scope.toggleOrder = function() {
var settings = $scope.settingsService.settings; var settings = $scope.settingsService.settings;
settings.readingOrder = settings.readingOrder == 'asc' ? 'desc' : 'asc'; settings.readingOrder = settings.readingOrder == 'asc' ? 'desc'
: 'asc';
}; };
$scope.toAdmin = function() { $scope.toAdmin = function() {
@@ -473,7 +475,7 @@ module.controller('ManageUsersCtrl', function($scope, $state, $location,
$state.transitionTo('admin.useradd'); $state.transitionTo('admin.useradd');
}; };
$scope.back = function() { $scope.back = function() {
$location.path('/'); $location.path('/admin');
}; };
}); });
@@ -551,7 +553,7 @@ module.controller('SettingsCtrl', function($scope, $location, SettingsService) {
}; };
}); });
module.controller('ManageSettingsCtrl', function($scope, $location, module.controller('ManageSettingsCtrl', function($scope, $location, $state,
AdminSettingsService) { AdminSettingsService) {
$scope.settings = AdminSettingsService.get(); $scope.settings = AdminSettingsService.get();
@@ -564,4 +566,8 @@ module.controller('ManageSettingsCtrl', function($scope, $location,
$location.path('/'); $location.path('/');
}); });
}; };
$scope.toUsers = function() {
$state.transitionTo('admin.userlist');
};
}); });

View File

@@ -1,6 +1,11 @@
<div class="row"> <div class="row">
<div class="page-header"> <div class="page-header">
<h1>Application settings</h1> <h1>
Application settings
<small>
<a ng-click="toUsers()" class="pointer">Manage users</a>
</small>
</h1>
</div> </div>
<div> <div>