From bd564c42a74dc493ea2bb3ad63130a02da13876b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 25 Jan 2021 15:03:11 -0500 Subject: [PATCH] LP1881607 E-resource relationship labels 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 Signed-off-by: Elaine Hardy Signed-off-by: Jane Sandberg --- .../app/staff/share/bib-summary/bib-summary.component.html | 13 +++++++++---- .../src/perlmods/lib/OpenILS/Application/Search/Biblio.pm | 6 +++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/share/bib-summary/bib-summary.component.html b/Open-ILS/src/eg2/src/app/staff/share/bib-summary/bib-summary.component.html index 5fbd0b69e1..a325481dfa 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/bib-summary/bib-summary.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/bib-summary/bib-summary.component.html @@ -120,13 +120,18 @@
  • -
    - Electronic Resource: +
    + + Resource: + Version of Resource: + Related Resource: + +
    - {{url.label}} + +
    {{url.note}}
    -
    {{url.note}}
  • diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index 03ae377616..5aec63549d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -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; } -- 2.11.0