From: Dan Scott Date: Sun, 27 Oct 2013 04:16:20 +0000 (-0400) Subject: Link from copies to library info page X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=79f11781437afe26d08e52946bd670614b1da9d4;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. Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/templates/opac/library.tt2 b/Open-ILS/src/templates/opac/library.tt2 index 7321457ade..52c8008ff6 100644 --- a/Open-ILS/src/templates/opac/library.tt2 +++ b/Open-ILS/src/templates/opac/library.tt2 @@ -3,9 +3,16 @@ INCLUDE "opac/parts/topnav.tt2"; ctx.page_title = l("Library details: [_1]", ctx.library.name); -%] - [% INCLUDE "opac/parts/searchbar.tt2" %] + [%- INCLUDE "opac/parts/searchbar.tt2" %]
-

[% ctx.library.name %]

+

[% ctx.library.name | html %]

+ + [%- + lib_url = ctx.get_org_setting(ctx.library.id, 'lib.info_url'); + IF lib_url; + ''; + END; + -%] [%- IF ctx.hours_schema; %]

[% l('Opening hours') %]

@@ -23,10 +30,10 @@ [%- IF (ctx.library.email OR ctx.library.phone); %]

[% l('Contact information') %]

[%- IF ctx.library.email; %] -
[% l('Email address: ') %][% ctx.library.email %]
+
[% l('Email address: ') %][% ctx.library.email | html %]
[%- END; %] [%- IF ctx.library.phone; %] -
[% l('Telephone: ') %][% ctx.library.phone %]
+
[% l('Telephone: ') %][% ctx.library.phone | html %]
[% END; %] [% END; %] @@ -34,13 +41,13 @@

[% l('Mailing address') %]

- [% ctx.mailing_address.street1 %] - [%- IF ctx.mailing_address.street2; "
"; ctx.mailing_address.street2; END; %] + [% ctx.mailing_address.street1 | html %] + [%- IF ctx.mailing_address.street2; "
"; ctx.mailing_address.street2 | html; END; %]

- [% ctx.mailing_address.city %]
- [% ctx.mailing_address.state %]
- [% ctx.mailing_address.country %]
- [% ctx.mailing_address.post_code %]
+ [% ctx.mailing_address.city | html %]
+ [% ctx.mailing_address.state | html %]
+ [% ctx.mailing_address.country | html %]
+ [% ctx.mailing_address.post_code | html %]
[%- END; %] @@ -48,7 +55,7 @@ [%- IF ctx.library.parent_ou; %]

Branch relationship

[% l('Parent library: ') %] - [% ctx.parent.name %] + [% ctx.parent.name | html %]
[% END; -%] 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..5678da1e78 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 @@ -96,7 +96,11 @@ END; # FOREACH bib [%- 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'); + 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;