lp1801137 Item Status Precat Information
authorKyle Huckins <khuckins@catalyte.io>
Wed, 11 Mar 2020 21:07:11 +0000 (21:07 +0000)
committerJane Sandberg <sandbej@linnbenton.edu>
Sun, 19 Apr 2020 17:36:49 +0000 (10:36 -0700)
- Display precat title, author, and isbn in place of
regular title, author, and isbn fields in Item Status
list view when working with precat items.
- Add Dummy Title and Dummy Author fields to Item Status
Detail view when looking at a precat item.

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Signed-off-by: Jennifer Pringle <jennifer.pringle@bc.libraries.coop>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>

Open-ILS/src/templates/staff/cat/item/t_list.tt2
Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2

index ca61728..9ffb879 100644 (file)
   <eg-grid-field label="[% l('Item Status') %]"    path="status.name" visible></eg-grid-field>
   <eg-grid-field label="[% l('Title') %]"       
     path="call_number.record.simple_record.title" visible>
-    <a target="_blank" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item['call_number.record.id']}}">
-      {{item['call_number.record.simple_record.title']}} <span ng-show="item['call_number.record.id']" class="glyphicon glyphicon-new-window"/>
-    </a>
+    <span ng-show="item['dummy_title']">
+        {{item['dummy_title']}}
+    </span>
+    <span ng-hide="item['call_number.record.id'] == -1">
+        <a target="_blank" href="[% ctx.base_path %]/staff/cat/catalog/record/{{item['call_number.record.id']}}">
+          {{item['call_number.record.simple_record.title']}} <span ng-show="item['call_number.record.id']" class="glyphicon glyphicon-new-window"/>
+        </a>
+    </span>
   </eg-grid-field>
 
   <eg-grid-field label="[% l('Acquisition Cost') %]"     path="cost" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Age-Based Hold Protection') %]"  path="age_protect.name" hidden></eg-grid-field>
-  <eg-grid-field label="[% l('Author') %]"               path="call_number.record.simple_record.author"  hidden></eg-grid-field>
+  <eg-grid-field label="[% l('Author') %]"               path="call_number.record.simple_record.author"  hidden>
+    {{item['call_number.record.simple_record.author'] || item['dummy_author']}}
+  </eg-grid-field>
   <eg-grid-field label="[% l('Checkin Date') %]"         path="_circ_summary.last_checkin_time" datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Checkin Scan Date') %]"    path="_circ_summary.last_checkin_scan_time" datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Checkin Workstation') %]"  path="_circ_summary.last_checkin_workstation" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Holdable?') %]"             path="holdable" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Holds Count') %]"           path="holds_count" hidden></eg-grid-field>
   <eg-grid-field label="[% l('In-House Uses') %]"         path="_inHouseUseCount" hidden></eg-grid-field>
-  <eg-grid-field label="[% l('ISBN') %]"                  path="call_number.record.simple_record.isbn" hidden></eg-grid-field>
+  <eg-grid-field label="[% l('ISBN') %]"                  path="call_number.record.simple_record.isbn" hidden>
+    {{item['call_number.record.simple_record.isbn'] || item['dummy_isbn']}}
+  </eg-grid-field>
   <eg-grid-field label="[% l('Loan Duration') %]"         path="loan_duration" hidden>
     <span>{{item['loan_duration'] | string_pick:'[% l('Short') %]':'[% l('Normal') %]':'[% l('Extended') %]'}}</span>
   </eg-grid-field>
index 865ee4e..1b5f30f 100644 (file)
@@ -4,6 +4,14 @@
     [% l('This item has been marked as Deleted.') %]
   </div>
 
+  <div class="flex-row" ng-if="copy.dummy_title() || copy.dummy_author()">
+    <div class="flex-cell" ng-if="copy.dummy_title()">[% l('Precat Title') %]</div>
+    <div class="flex-cell well" ng-if="copy.dummy_title()">{{copy.dummy_title()}}</div>
+    
+    <div class="flex-cell" ng-if="copy.dummy_author()">[% l('Precat Author') %]</div>
+    <div class="flex-cell well" ng-if="copy.dummy_author()">{{copy.dummy_author()}}</div>
+  </div>
+
   <div class="flex-row">
     <div class="flex-cell">[% l('Barcode') %]</div>
     <div class="flex-cell well">{{copy.barcode()}}</div>
@@ -59,7 +67,7 @@
   <div class="flex-row">
     <div class="flex-cell">[% l('ISBN') %]</div>
     <div class="flex-cell well">
-      {{copy.call_number().record().simple_record().isbn()}}
+      {{copy.call_number().record().simple_record().isbn() || copy.dummy_isbn()}}
     </div>
 
     <div class="flex-cell">[% l('Loan Duration') %]</div>