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=7835e819554fdbb55825082fef933ca1bac69b6e;p=working%2FEvergreen.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 --- 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 0e3ab44848..35c2b86929 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 69427d1d11..fd2e09731b 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 @@ -9,8 +9,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; @@ -96,7 +98,10 @@ function($scope, egCore, egGridDataProvider , egConfirmDialog, egAlertDialog) flesh_fields : { acp : ['call_number','location'], acn : ['record'], - 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 } @@ -110,6 +115,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; @@ -153,7 +163,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);