From 097edb99ade07c520fd72b4e332bfaff5036de5d Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 7 Oct 2015 15:22:34 +0000 Subject: [PATCH] webstaff: fetch MVR to help build record summary Although this adds another OpenSRF request, using the MVR rather than fleshing simple_record() gives us two benefits: * getting access to the edition * fields like title and author are now displayed in their proper case, rather than the normalized lowercase supplied by simple_record(). Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- .../templates/staff/cat/share/t_record_summary.tt2 | 14 +++++++------- .../web/js/ui/default/staff/cat/services/record.js | 9 ++++++++- 2 files changed, 15 insertions(+), 8 deletions(-) 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 29f0bb8862..045bd93b4f 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 @@ -36,16 +36,16 @@
[% l('Author:') %]
-
{{record.simple_record().author()}}
+
{{mvr.author()}}
[% l('Pub Date:') %]
- {{record.simple_record().pubdate()}} + {{mvr.pubdate()}}
[% l('Database ID:') %]
@@ -59,12 +59,12 @@
[% l('Edition:') %]
-
+
{{mvr.edition()}}
[% l('TCN:') %]
{{record.tcn_value()}}
@@ -75,11 +75,11 @@
[% l('Author:') %]
-
{{record.simple_record().author()}}
+
{{mvr.author()}}
[% l('Pub Date:') %]
- {{record.simple_record().pubdate()}} + {{mvr.pubdate()}}
[% l('Database ID:') %]
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 9e1cecd3e5..853a046ed3 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 @@ -150,12 +150,19 @@ angular.module('egCoreMod') egCore.pcrud.retrieve('bre', $scope.recordId, { flesh : 1, flesh_fields : { - bre : ['simple_record','creator','editor'] + bre : ['creator','editor'] } }).then(function(rec) { rec.owner(egCore.org.get(rec.owner())); $scope.record = rec; }); + egCore.net.request( + 'open-ils.search', + 'open-ils.search.biblio.record.mods_slim.retrieve.authoritative', + $scope.recordId + ).then(function(mvr) { + $scope.mvr = mvr; + }); $scope.bib_cn = null; $scope.bib_cn_tooltip = ''; var label_class = egCore.env.aous['cat.default_classification_scheme'] || 1; -- 2.43.2