From: Bill Erickson <berickxx@gmail.com> Date: Thu, 26 Oct 2017 16:25:51 +0000 (-0400) Subject: LP#1727487 Webstaff Items Out uses display fields X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=526584fa959bf9f03ae6adfb5ef2446d5b9b1d0b;p=evergreen%2Fjoelewis.git LP#1727487 Webstaff Items Out uses display fields Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Conflicts: Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Dan Wells <dbw2@calvin.edu> --- diff --git a/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 index 4efa432bca..2f705cea6e 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 @@ -90,7 +90,7 @@ <eg-grid-field label="[% l('Fines Stopped') %]" path='stop_fines'></eg-grid-field> <eg-grid-field label="[% l('Title') %]" path="target_copy.call_number.record.simple_record.title" name="title"> <a target="_self" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item.target_copy().call_number().record().id()}}"> - {{item.target_copy().call_number().record().simple_record().title()}} + {{item.target_copy().call_number().record().wide_display_entry().title()}} </a> </eg-grid-field> <eg-grid-field path="*" hidden></eg-grid-field> @@ -102,7 +102,7 @@ <eg-grid-field path="target_copy.call_number.prefix.label" label="[% l('CN Prefix') %]" hidden></eg-grid-field> <eg-grid-field path="target_copy.call_number.suffix.label" label="[% l('CN Suffix') %]" hidden></eg-grid-field> <eg-grid-field path="target_copy.call_number.record.*" hidden></eg-grid-field> - <eg-grid-field path="target_copy.call_number.record.simple_record.*" hidden></eg-grid-field> + <eg-grid-field path="target_copy.call_number.record.wide_display_entry.*" hidden></eg-grid-field> </eg-grid> </div> diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js index ac189f95a5..e3e4617b3c 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js @@ -5,10 +5,12 @@ angular.module('egPatronApp') .controller('PatronItemsOutCtrl', - ['$scope','$q','$routeParams','$timeout','egCore','egUser','patronSvc','$location', - 'egGridDataProvider','$uibModal','egCirc','egConfirmDialog','egBilling','$window', -function($scope, $q, $routeParams, $timeout, egCore , egUser, patronSvc , $location, - egGridDataProvider , $uibModal , egCirc , egConfirmDialog , egBilling , $window) { + ['$scope','$q','$routeParams','$timeout','egCore','egUser','patronSvc', + '$location','egGridDataProvider','$uibModal','egCirc','egConfirmDialog', + 'egBilling','$window','egBibDisplay', +function($scope , $q , $routeParams , $timeout , egCore , egUser , patronSvc , + $location , egGridDataProvider , $uibModal , egCirc , egConfirmDialog , + egBilling , $window , egBibDisplay) { // list of noncatatloged circulations. Define before initTab to // avoid any possibility of race condition, since they are loaded @@ -108,7 +110,7 @@ function($scope, $q, $routeParams, $timeout, egCore , egUser, patronSvc , $ circ : ['target_copy', 'workstation', 'checkin_workstation'], acp : ['call_number', 'holds_count', 'status', 'circ_lib'], acn : ['record', 'owning_lib', 'prefix', 'suffix'], - bre : ['simple_record'] + bre : ['wide_display_entry'] }, // avoid fetching the MARC blob by specifying which // fields on the bre to select. More may be needed. @@ -125,12 +127,17 @@ function($scope, $q, $routeParams, $timeout, egCore , egUser, patronSvc , $ }).then(deferred.resolve, null, function(circ) { circ.circ_lib(egCore.org.get(circ.circ_lib())); // local fleshing + // Translate bib display field JSON blobs to JS. + egBibDisplay.mwdeJSONToJS( + circ.target_copy().call_number().record().wide_display_entry()); + if (circ.target_copy().call_number().id() == -1) { // dummy-up a record for precat items - circ.target_copy().call_number().record().simple_record({ + circ.target_copy().call_number().record().wide_display_entry({ title : function() {return circ.target_copy().dummy_title()}, author : function() {return circ.target_copy().dummy_author()}, - isbn : function() {return circ.target_copy().dummy_isbn()} + // ISBN is a multi=true field. + isbn : function() {return [circ.target_copy().dummy_isbn()]} }) } @@ -353,8 +360,8 @@ function($scope, $q, $routeParams, $timeout, egCore , egUser, patronSvc , $ circ : egCore.idl.toHash(circ), copy : egCore.idl.toHash(circ.target_copy()), call_number : egCore.idl.toHash(circ.target_copy().call_number()), - title : circ.target_copy().call_number().record().simple_record().title(), - author : circ.target_copy().call_number().record().simple_record().author(), + title : circ.target_copy().call_number().record().wide_display_entry().title(), + author : circ.target_copy().call_number().record().wide_display_entry().author() }) });