From: Bill Erickson Date: Thu, 26 Oct 2017 19:17:45 +0000 (-0400) Subject: LP#1727487 Webstaff In-House-Use uses display fields X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2fcd2d03891dba2474fb137e40aa1c8964311d10;p=evergreen%2Fmasslnc.git LP#1727487 Webstaff In-House-Use uses display fields Replace reporter.simple_record data with metabib display fields. Use flat_display_entries instead of wide_display_entry partially as an example, but also because it requires slightly less data munging on the DB side. Signed-off-by: Bill Erickson Signed-off-by: Kathy Lussier Conflicts: Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js Signed-off-by: Kathy Lussier Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2 b/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2 index 988955758a..df39540e1c 100644 --- a/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2 +++ b/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2 @@ -8,6 +8,7 @@ [% BLOCK APP_JS %] + [% INCLUDE 'staff/circ/share/circ_strings.tt2' %] [% END %] diff --git a/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js b/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js index 6d0d3522fd..8899aca582 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js @@ -8,8 +8,10 @@ angular.module('egInHouseUseApp', }) .controller('InHouseUseCtrl', - ['$scope','egCore','egGridDataProvider','egConfirmDialog', 'egAlertDialog', -function($scope, egCore, egGridDataProvider , egConfirmDialog, egAlertDialog) { + ['$scope','egCore','egGridDataProvider','egConfirmDialog', + 'egAlertDialog','egBibDisplay', +function($scope , egCore , egGridDataProvider , egConfirmDialog, + egAlertDialog , egBibDisplay) { var countCap; var countMax; @@ -95,7 +97,10 @@ function($scope, egCore, egGridDataProvider , egConfirmDialog, egAlertDialog) flesh_fields : { acp : ['call_number','location'], acn : ['record', 'prefix', 'suffix'], - bre : ['simple_record'] + // We don't need to display a wide range of bib + // fields in this UI. Fetch the flat display since + // it requires less DB-side munging (and as an example). + bre : ['flat_display_entries'] }, select : { bre : ['id'] } // avoid fleshing MARC } @@ -109,6 +114,11 @@ function($scope, egCore, egGridDataProvider , egConfirmDialog, egAlertDialog) coArgs.copyid = copy.id(); + copy.call_number().record().flat_display_entries( + egBibDisplay.mfdeToHash( + copy.call_number().record().flat_display_entries()) + ); + // LP1507807: Display the copy alert if the setting is on. if ($scope.copyAlert && copy.alert_message()) { egAlertDialog.open(copy.alert_message()).result; @@ -152,7 +162,7 @@ function($scope, egCore, egGridDataProvider , egConfirmDialog, egAlertDialog) var item = {num_uses : resp.length}; item.copy = data.copy; item.title = data.title || - data.copy.call_number().record().simple_record().title(); + data.copy.call_number().record().flat_display_entries().title; item.index = checkouts.length; checkouts.unshift(item);