From: Dan Scott Date: Wed, 22 Jan 2014 15:12:37 +0000 (-0500) Subject: TPAC: Link library in results page to library page X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=df5cc7561eacee316fda5756756f1e50260c13af;p=evergreen%2Fmasslnc.git TPAC: Link library in results page to library page Dan Wells noticed that the links on results pages went to a different location (potentially, depending on the "prefer external library uri" OUS) than the links on record pages. Make things consistent. Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index b481b5f06b..ff2766ba08 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -248,9 +248,15 @@ END; [%- + org_name = ctx.get_aou(copy.circ_lib).name; + org_sname = ctx.get_aou(copy.circ_lib).shortname; lib_url = ctx.get_org_setting(copy.circ_lib, 'lib.info_url'); - IF lib_url; ''; END; - copy.library | html; + prefer_external_url = ctx.get_org_setting(copy.circ_lib, 'lib.prefer_external_url'); + UNLESS lib_url && prefer_external_url; + lib_url = mkurl(ctx.opac_root _ '/library/' _ ctx.get_aou(copy.circ_lib).shortname, {}, 1); + END; + IF lib_url; ''; END; + ''; org_name | html; ''; IF lib_url; ''; END; -%]