[% INCLUDE 'staff/cat/bucket/record/t_grid_menu.tt2' %]
<!-- actions drop-down -->
- <eg-grid-action label="[% l('Show All in Catalog') %]"
- handler="showAllRecords"></eg-grid-action>
+ <eg-grid-action label="[% l('Show Selected Records in Catalog') %]"
+ handler="showRecords"></eg-grid-action>
<eg-grid-action label="[% l('Remove Selected Records') %]"
handler="detachRecords"></eg-grid-action>
});
}
- $scope.showAllRecords = function() {
- // TODO: maybe show selected would be better?
+ $scope.showRecords = function(records) {
// TODO: probably want to set a limit on the number of
// new tabs one could choose to open at once
- angular.forEach(bucketSvc.currentBucket.items(), function(rec) {
+ angular.forEach(records, function(rec) {
var url = egCore.env.basePath +
'cat/catalog/record/' +
- rec.target_biblio_record_entry();
+ rec.id;
$timeout(function() { $window.open(url, '_blank') });
});
}