LP1881607 E-resource relationship labels
authorBill Erickson <berickxx@gmail.com>
Mon, 25 Jan 2021 20:03:11 +0000 (15:03 -0500)
committerJane Sandberg <sandbej@linnbenton.edu>
Sun, 16 May 2021 03:32:42 +0000 (20:32 -0700)
Display the relationship designation for 856 URL's in the staff catalog.

See Second Indicator:

https://www.loc.gov/marc/bibliographic/bd856.html

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Elaine Hardy <ehardy@georgialibraries.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/eg2/src/app/staff/share/bib-summary/bib-summary.component.html
Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm

index 5fbd0b6..a325481 100644 (file)
           <ng-container *ngIf="expand && summary.eResourceUrls.length">
             <li class="list-group-item" *ngFor="let url of summary.eResourceUrls">
               <div class="d-flex">
-                <div class="flex-1 font-weight-bold" i18n>
-                  Electronic Resource:
+                <div class="flex-1 font-weight-bold">
+                  <ng-container [ngSwitch]="url.ind2">
+                    <ng-container *ngSwitchCase="'0'" i18n>Resource:</ng-container>
+                    <ng-container *ngSwitchCase="'1'" i18n>Version of Resource:</ng-container>
+                    <ng-container *ngSwitchCase="'2'" i18n>Related Resource:</ng-container>
+                    <ng-container *ngSwitchDefault i18n></ng-container>
+                  </ng-container>
                 </div>
                 <div class="flex-5">
-                  <a href="{{url.href}}">{{url.label}}</a>
+                  <div><a href="{{url.href}}">{{url.label}}</a></div>
+                  <div class="pt-1">{{url.note}}</div>
                 </div>
-                <div class="flex-4">{{url.note}}</div>
               </div>
             </li>
           </ng-container>
index 03ae377..5aec635 100644 (file)
@@ -2976,8 +2976,7 @@ sub record_urls {
 
         my $marc_doc = $U->marc_xml_to_doc($bib->marc);
 
-        for my $node ($marc_doc->findnodes(
-            '//*[@tag="856" and @ind1="4" and (@ind2="0" or @ind2="1")]')) {
+        for my $node ($marc_doc->findnodes('//*[@tag="856" and @ind1="4"]')) {
 
             # asset.uri's
             next if $node->findnodes('./*[@code="9" or @code="w" or @code="n"]');
@@ -2999,7 +2998,8 @@ sub record_urls {
                 push(@urls, {
                     href => $href,
                     label => ($first && $label) ?  $label->textContent : $href,
-                    note => ($first && $notes) ? $notes->textContent : ''
+                    note => ($first && $notes) ? $notes->textContent : '',
+                    ind2 => $node->getAttribute('ind2')
                 });
                 $first = 0;
             }