From: Dan Scott Date: Thu, 5 Mar 2015 17:53:08 +0000 (-0500) Subject: Revert "Add the ability to link to sameAs and exampleOfWork entities" X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ffd6f7cf6a0d8fec88449a0271334aaab28804c8;p=contrib%2FConifer.git Revert "Add the ability to link to sameAs and exampleOfWork entities" This reverts commit 2183cd4e370c2a921bfcc0580618992970ef6121. --- diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index 34d19a1617..1d734b8cd4 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -152,27 +152,17 @@ # These are URIs that link out to related works for linked data purposes, # such as OCLC Work Entities like http://worldcat.org/entity/work/id/415491 - - # We differentiate between http://schema.org/sameAs relations, which - # are roughly the same as the work we're describing here, and - # http://schema.org/exampleOfWork which point to a broader work, of which - # this is a more specific edition or manifestation. - args.links.sameAs = []; - args.links.exampleOfWork = []; + args.links = []; FOR link_node IN xml.findnodes('//*[@tag="024"]/*[@code="2" and text()="uri"]'); my_parent = link_node.parentNode(); FOR link IN my_parent.findnodes('./*[@code="a"]'); link_uri = link.textContent | trim; - IF link_uri.search('worldcat.org/entity/work'); - args.links.exampleOfWork.push(link_uri); - ELSE; - args.links.sameAs.push(link_uri); - END; + args.links.push(link_uri); END; END; FOR lccn IN xml.findnodes('//*[@tag="010"]/*[@code="a"]'); lccn_num = lccn.textContent | trim; - args.links.sameAs.push('http://lccn.loc.gov/' _ lccn_num); + args.links.push('http://lccn.loc.gov/' _ lccn_num); END; FOR oclcnum IN xml.findnodes('//*[@tag="035"]/*[@code="a"]'); oclcnum = oclcnum.textContent | trim; @@ -182,9 +172,9 @@ oclcnum = oclcnum | remove('ocm'); oclcnum = oclcnum | remove('ocn'); oclcnum = oclcnum | remove('on') | trim; - args.links.sameAs.push('http://www.worldcat.org/oclc/' _ oclcnum); + args.links.push('http://www.worldcat.org/oclc/' _ oclcnum); END; - args.links.sameAs = args.links.sameAs.unique; + args.links = args.links.unique; args.issns = []; FOR sub IN xml.findnodes('//*[@tag="022"]/*[@code="a"]'); diff --git a/Open-ILS/src/templates/opac/parts/record/body.tt2 b/Open-ILS/src/templates/opac/parts/record/body.tt2 index 616ede0f15..d758846eca 100644 --- a/Open-ILS/src/templates/opac/parts/record/body.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/body.tt2 @@ -5,12 +5,9 @@ ctx.record_attrs = attrs; # capture for JS %]
-[%- FOREACH link IN args.links.sameAs; %] +[%- FOREACH link IN args.links; %] [%- END; %] -[%- FOREACH link IN args.links.exampleOfWork; %] - -[%- END; %] [%- INCLUDE "opac/parts/record/navigation.tt2" %] [%- IF ctx.bib_is_dead %]