Revision 57607
Added by Michele Artini over 4 years ago
organizations.js | ||
---|---|---|
12 | 12 |
.when('/metadata/:msg/:id', { templateUrl: 'resources/html/edit.html', controller: 'showMetadataCtrl' }) |
13 | 13 |
.when('/relations/:id', { templateUrl: 'resources/html/relations.html', controller: 'showRelationsCtrl' }) |
14 | 14 |
.when('/similarities/:id', { templateUrl: 'resources/html/similarities.html', controller: 'showSimilaritiesCtrl' }) |
15 |
.when('/warnings', { templateUrl: 'resources/html/warnings.html', controller: 'showWarningsCtrl' }) |
|
15 | 16 |
.when('/users', { templateUrl: 'resources/html/users.html', controller: 'usersCtrl' }) |
16 | 17 |
.otherwise({ redirectTo: '/search' }); |
17 | 18 |
}); |
... | ... | |
267 | 268 |
}); |
268 | 269 |
|
269 | 270 |
|
271 |
orgsModule.controller('showWarningsCtrl', function ($scope, $http, $routeParams) { |
|
272 |
$scope.orgId = $routeParams.id; |
|
273 |
$scope.warnings = []; |
|
274 |
|
|
275 |
$http.get('api/organizations/warnings?id=' + $routeParams.id).then(function successCallback(res) { |
|
276 |
$scope.warnings = res.data; |
|
277 |
}, function errorCallback(res) { |
|
278 |
alert('ERROR: ' + res.data.error + ' (' + res.data.message + ')'); |
|
279 |
}); |
|
270 | 280 |
|
281 |
}); |
|
282 |
|
|
283 |
|
|
271 | 284 |
orgsModule.controller('usersCtrl', function ($scope, $http, $timeout, $route) { |
272 | 285 |
$scope.users = []; |
273 | 286 |
$scope.vocs = {}; |
Also available in: Unified diff
warnings