From: Dan Scott Date: Fri, 10 May 2013 16:42:24 +0000 (-0400) Subject: TPAC: Avoid showing URIs from 856 if we have OpenURL results X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6a6fca11b34e3ae56a56487522846931fea8d268;p=contrib%2FConifer.git TPAC: Avoid showing URIs from 856 if we have OpenURL results There is already a lot of logic to deduplicate OpenURL results versus URIs in 856 fields, but in practice URIs in 856s tend to be subject to bitrot, while SFX generally should be trustworthy. Thus, don't generate electronic resources for 856s if we have OpenURL results. Another optimization might be to hide the 856 results in case SFX is wrong, then give users the ability to show them, but that might be something we only want to enable in the staff client... Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index a38bd54f7e..cd484ac31f 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -100,9 +100,11 @@ [%- END %] [%- END %] -[%- merged_uris = args.uris.merge(args.online_res); -num_uris = merged_uris.size; -IF num_uris > 0; +[%- # Avoid showing URLs from 856 fields if we have OpenURL results + IF openurls.size == 0; + merged_uris = args.uris.merge(args.online_res); + num_uris = merged_uris.size; + IF num_uris > 0; -%]

[% l("Electronic resources") %]

@@ -114,7 +116,8 @@ IF num_uris > 0; [%- END %] [%- IF num_uris > 1 %][% END %]
-[%- END %] +[%- END; + END; %] [%- # Hold/copy summary IF ctx.copy_summary.0.count %]