From: Galen Charlton Date: Wed, 7 Oct 2015 14:59:09 +0000 (+0000) Subject: webstaff: teach record summary how to display the bib call number X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=47897d2f5fa09565a2b95b9627fcbb7d277956c9;p=working%2FEvergreen.git webstaff: teach record summary how to display the bib call number Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/templates/staff/cat/share/t_record_summary.tt2 b/Open-ILS/src/templates/staff/cat/share/t_record_summary.tt2 index 6f9f030592..29f0bb8862 100644 --- a/Open-ILS/src/templates/staff/cat/share/t_record_summary.tt2 +++ b/Open-ILS/src/templates/staff/cat/share/t_record_summary.tt2 @@ -91,7 +91,7 @@
[% l('Bib Call #:') %]
-
+
{{bib_cn}}
diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/record.js b/Open-ILS/web/js/ui/default/staff/cat/services/record.js index c54bc951d2..9e1cecd3e5 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/services/record.js +++ b/Open-ILS/web/js/ui/default/staff/cat/services/record.js @@ -143,8 +143,8 @@ angular.module('egCoreMod') }, templateUrl : './cat/share/t_record_summary', controller : - ['$scope','egCore', - function($scope , egCore) { + ['$scope','egCore','$sce', + function($scope , egCore , $sce) { function loadRecord() { egCore.pcrud.retrieve('bre', $scope.recordId, { @@ -156,6 +156,29 @@ angular.module('egCoreMod') rec.owner(egCore.org.get(rec.owner())); $scope.record = rec; }); + $scope.bib_cn = null; + $scope.bib_cn_tooltip = ''; + var label_class = egCore.env.aous['cat.default_classification_scheme'] || 1; + egCore.net.request( + 'open-ils.cat', + 'open-ils.cat.biblio.record.marc_cn.retrieve', + $scope.recordId, + label_class + ).then(function(cn_array) { + var tooltip = ''; + if (cn_array.length > 0) { + for (var field in cn_array[0]) { + $scope.bib_cn = cn_array[0][field]; + } + for (var i in cn_array) { + for (var field in cn_array[i]) { + tooltip += + field + ' : ' + cn_array[i][field] + '
'; + } + } + $scope.bib_cn_tooltip = $sce.trustAsHtml(tooltip); + } + }); } $scope.$watch('recordId',