<div class="flex-row">
<div class="flex-cell strong-text">[% l('Bib Call #:') %]</div>
- <div class="flex-cell flex-2"><!-- FIXME: no bib call no on simple rec --></div>
+ <div class="flex-cell flex-2"><span tooltip-html-unsafe="{{bib_cn_tooltip}}">{{bib_cn}}<span></div>
<div class="flex-cell strong-text"></div>
<div class="flex-cell"></div>
},
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, {
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] + '<br>';
+ }
+ }
+ $scope.bib_cn_tooltip = $sce.trustAsHtml(tooltip);
+ }
+ });
}
$scope.$watch('recordId',