From: Dan Scott Date: Tue, 17 Dec 2013 21:29:35 +0000 (-0500) Subject: Link from copies to library info page X-Git-Tag: sprint4-merge-nov22~2413 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=21b326f5ce113e95626f8912d76751c25f064155;p=working%2FEvergreen.git 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 --- 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; -%]