<div class="form-inline">
-<label for="choose-subscription">[% l('Select subscription to work on') %]</label>
+<label for="choose-subscription-ou-filter">[% l('At') %]</label>
+<eg-org-selector selected="owning_ou" onchange="owning_ou_changed"
+ sticky-setting="serials.sub_selector.owning_ou_selector"
+>
+</eg-org-selector>
+<label for="choose-subscription">[% l('select subscription to work on') %]</label>
<select class="form-control" id="choose-subscription" ng-model="ssubId">
<option ng-repeat="ssub in subscriptions | orderBy: 'id' as filtered track by ssub.id"
value="{{ssub.id}}">
'$uibModal',
function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider ,
$uibModal) {
- egSerialsCoreSvc.fetch($scope.bibId).then(function() {
- $scope.subscriptions = egCore.idl.toTypedHash(egSerialsCoreSvc.subTree);
- });
+ if ($scope.ssubId) {
+ $scope.owning_ou = egCore.org.root();
+ }
+ $scope.owning_ou_changed = function(org) {
+ $scope.selected_owning_ou = org.id();
+ reload();
+ }
+ function reload() {
+ egSerialsCoreSvc.fetch($scope.bibId, $scope.selected_owning_ou).then(function() {
+ $scope.subscriptions = egCore.idl.toTypedHash(egSerialsCoreSvc.subTree);
+ });
+ }
}]
}
})