From df5cc7561eacee316fda5756756f1e50260c13af Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 22 Jan 2014 10:12:37 -0500 Subject: [PATCH] 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 --- Open-ILS/src/templates/opac/parts/result/table.tt2 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; -%] -- 2.11.0