mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
link to admin user list
This commit is contained in:
@@ -192,71 +192,73 @@ 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,
|
||||||
SessionService) {
|
SettingsService, EntryService, SubscriptionService,
|
||||||
|
SessionService) {
|
||||||
|
|
||||||
function totalActiveAjaxRequests() {
|
function totalActiveAjaxRequests() {
|
||||||
return ($http.pendingRequests.length + $.active);
|
return ($http.pendingRequests.length + $.active);
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.session = SessionService.get();
|
$scope.session = SessionService.get();
|
||||||
|
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
$scope.$watch(totalActiveAjaxRequests, function() {
|
$scope.$watch(totalActiveAjaxRequests, function() {
|
||||||
$scope.loading = (totalActiveAjaxRequests() !== 0);
|
$scope.loading = (totalActiveAjaxRequests() !== 0);
|
||||||
});
|
|
||||||
|
|
||||||
$scope.settingsService = SettingsService;
|
|
||||||
$scope.$watch('settingsService.settings.readingMode', function(newValue,
|
|
||||||
oldValue) {
|
|
||||||
if (newValue && oldValue && newValue != oldValue) {
|
|
||||||
SettingsService.save();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$scope.$watch('settingsService.settings.readingOrder', function(newValue,
|
|
||||||
oldValue) {
|
|
||||||
if (newValue && oldValue && newValue != oldValue) {
|
|
||||||
SettingsService.save();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$scope.refresh = function() {
|
|
||||||
$scope.$emit('emitReload');
|
|
||||||
};
|
|
||||||
$scope.markAllAsRead = function() {
|
|
||||||
$scope.$emit('emitMarkAll', {
|
|
||||||
type : $stateParams._type,
|
|
||||||
id : $stateParams._id,
|
|
||||||
read : true
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.keywords = $stateParams._keywords;
|
|
||||||
$scope.search = function() {
|
|
||||||
if ($scope.keywords == $stateParams._keywords) {
|
|
||||||
$scope.refresh();
|
|
||||||
} else {
|
|
||||||
$state.transitionTo('feeds.search', {
|
|
||||||
_keywords : $scope.keywords
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
};
|
|
||||||
$scope.showButtons = function() {
|
|
||||||
return !$stateParams._keywords;
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.toggleOrder = function() {
|
|
||||||
var settings = $scope.settingsService.settings;
|
|
||||||
settings.readingOrder = settings.readingOrder == 'asc' ? 'desc' : 'asc';
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.toAdmin = function() {
|
$scope.settingsService = SettingsService;
|
||||||
$location.path('admin');
|
$scope.$watch('settingsService.settings.readingMode', function(
|
||||||
};
|
newValue, oldValue) {
|
||||||
$scope.toSettings = function() {
|
if (newValue && oldValue && newValue != oldValue) {
|
||||||
$location.path('settings');
|
SettingsService.save();
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
|
$scope.$watch('settingsService.settings.readingOrder', function(
|
||||||
|
newValue, oldValue) {
|
||||||
|
if (newValue && oldValue && newValue != oldValue) {
|
||||||
|
SettingsService.save();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$scope.refresh = function() {
|
||||||
|
$scope.$emit('emitReload');
|
||||||
|
};
|
||||||
|
$scope.markAllAsRead = function() {
|
||||||
|
$scope.$emit('emitMarkAll', {
|
||||||
|
type : $stateParams._type,
|
||||||
|
id : $stateParams._id,
|
||||||
|
read : true
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.keywords = $stateParams._keywords;
|
||||||
|
$scope.search = function() {
|
||||||
|
if ($scope.keywords == $stateParams._keywords) {
|
||||||
|
$scope.refresh();
|
||||||
|
} else {
|
||||||
|
$state.transitionTo('feeds.search', {
|
||||||
|
_keywords : $scope.keywords
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$scope.showButtons = function() {
|
||||||
|
return !$stateParams._keywords;
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.toggleOrder = function() {
|
||||||
|
var settings = $scope.settingsService.settings;
|
||||||
|
settings.readingOrder = settings.readingOrder == 'asc' ? 'desc'
|
||||||
|
: 'asc';
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.toAdmin = function() {
|
||||||
|
$location.path('admin');
|
||||||
|
};
|
||||||
|
$scope.toSettings = function() {
|
||||||
|
$location.path('settings');
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
module.controller('FeedListCtrl', function($scope, $stateParams, $http, $route,
|
module.controller('FeedListCtrl', function($scope, $stateParams, $http, $route,
|
||||||
$window, EntryService, SettingsService, SubscriptionService) {
|
$window, EntryService, SettingsService, SubscriptionService) {
|
||||||
@@ -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');
|
||||||
|
};
|
||||||
});
|
});
|
||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user