LP#1727487 Webstaff record summary uses display fields
authorBill Erickson <berickxx@gmail.com>
Thu, 26 Oct 2017 19:55:46 +0000 (15:55 -0400)
committerDan Wells <dbw2@calvin.edu>
Wed, 28 Feb 2018 21:17:42 +0000 (16:17 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/templates/staff/cat/share/t_record_summary.tt2
Open-ILS/web/js/ui/default/staff/cat/services/record.js

index e11eead..c98b087 100644 (file)
     <div class="flex-cell flex-2">
       <a target="_self" 
         href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.id()}}">
-        {{mvr.title()}}
+        {{rec_display.title}}
       </a>
     </div>
 
     <div class="flex-cell strong-text">[% l('Author:') %]</div>
-    <div class="flex-cell flex-2">{{mvr.author()}}</div>
+    <div class="flex-cell flex-2">{{rec_display.author}}</div>
 
     <div class="flex-cell strong-text">[% l('Pub Date:') %]</div>
     <div class="flex-cell">
-      {{mvr.pubdate()}}
+      {{rec_display.pubdate}}
     </div>
 
     <div class="flex-cell strong-text">[% l('Database ID:') %]</div>
     <div class="flex-cell flex-2">
       <a target="_self" 
         href="[% ctx.base_path %]/staff/cat/catalog/record/{{record.id()}}">
-        {{mvr.title()}}
+        {{rec_display.title}}
       </a>
     </div>
 
     <div class="flex-cell strong-text">[% l('Edition:') %]</div>
-    <div class="flex-cell">{{mvr.edition()}}</div>
+    <div class="flex-cell">{{rec_display.edition}}</div>
 
     <div class="flex-cell strong-text">[% l('TCN:') %]</div>
     <div class="flex-cell">{{record.tcn_value()}}</div>
 
   <div class="flex-row">
     <div class="flex-cell strong-text">[% l('Author:') %]</div>
-    <div class="flex-cell flex-2">{{mvr.author()}}</div>
+    <div class="flex-cell flex-2">{{rec_display.author}}</div>
 
     <div class="flex-cell strong-text">[% l('Pub Date:') %]</div>
     <div class="flex-cell">
-      {{mvr.pubdate()}}
+      {{rec_display.pubdate}}
     </div>
 
     <div class="flex-cell strong-text">[% l('Database ID:') %]</div>
index ba66c00..22df857 100644 (file)
@@ -143,25 +143,20 @@ angular.module('egCoreMod')
         },
         templateUrl : './cat/share/t_record_summary',
         controller : 
-                   ['$scope','egCore','$sce',
-            function($scope , egCore , $sce) {
+                   ['$scope','egCore','$sce','egBibDisplay',
+            function($scope , egCore , $sce , egBibDisplay) {
 
                 function loadRecord() {
                     egCore.pcrud.retrieve('bre', $scope.recordId, {
                         flesh : 1,
                         flesh_fields : {
-                            bre : ['creator','editor']
+                            bre : ['creator','editor','flat_display_entries']
                         }
                     }).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.rec_display = 
+                            egBibDisplay.mfdeToHash(rec.flat_display_entries());
                     });
                     $scope.bib_cn = null;
                     $scope.bib_cn_tooltip = '';