From 21b326f5ce113e95626f8912d76751c25f064155 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 17 Dec 2013 16:29:35 -0500 Subject: [PATCH] Link from copies to library info page In the absence of a specific lib.info_url org unit setting, link to the library info page. If we _do_ have a lib.info_url org unit setting, link from the library info page to to the external web site. Rather than wrapping everything in the table cell as the seller, focus on the and give it an explicit Library typeof attribute; then we can offer up the name of the library as the name attribute, should the crawler be too lazy to follow the link. Signed-off-by: Dan Scott Signed-off-by: Dan Wells --- .../src/templates/opac/parts/record/copy_table.tt2 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 index 9c8407ba88..736ee0673f 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 @@ -93,12 +93,16 @@ END; # FOREACH bib [%- IF serial_holdings %] [%- copy_info.holding_label | html; -%] - [%- ELSE %] + [%- ELSE %] [%- org_name = ctx.get_aou(copy_info.circ_lib).name; + org_sname = ctx.get_aou(copy_info.circ_lib).shortname; lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url'); - IF lib_url; ''; END; - org_name | html; + UNLESS lib_url; + lib_url = mkurl(ctx.opac_root _ '/library/' _ ctx.get_aou(copy_info.circ_lib).shortname, {}, 1); + END; + IF lib_url; ''; END; + ''; org_name | html; ''; IF lib_url; ''; END; -%] -- 2.43.2