LP1904754 Former precat still displays precat info
authorTerran McCanna <tmccanna@georgialibraries.org>
Fri, 18 Jun 2021 22:12:08 +0000 (18:12 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 21 Sep 2021 15:10:12 +0000 (11:10 -0400)
This fixes a display issue where the precat title and author
were still displaying once the record was no longer a precat,
which effectively duplicated the title and author.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/staff/cat/item/t_list.tt2
Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2

index 6d6e08c..cc5a57e 100644 (file)
 
   <eg-grid-field label="[% l('Location') %]"       path="location.name" visible></eg-grid-field>
   <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>
-    <span ng-show="item['dummy_title']">
-        {{item['dummy_title']}}
-    </span>
-    <span ng-hide="item['call_number.record.id'] == -1">
-        <a target="_blank" href="/eg2/staff/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"></span>
-        </a>
-    </span>
+    {{item['call_number.record.simple_record.title'] ?
+        '<a target="_blank" href="/eg2/staff/catalog/record/' + item['call_number.record.id'] + '">' + item['call_number.record.simple_record.title'] + '</a>' : item['dummy_title'] }}
   </eg-grid-field>
 
   <eg-grid-field label="[% l('Acquisition Cost') %]"     path="cost" hidden></eg-grid-field>
index aff03bf..f325321 100644 (file)
@@ -4,7 +4,7 @@
     [% l('This item has been marked as Deleted.') %]
   </div>
 
-  <div class="flex-row" ng-if="copy.dummy_title() || copy.dummy_author()">
+  <div class="flex-row" ng-if="recordId == -1">
     <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>