]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/parts/library_name_link.tt2
lp1481844 Change Available Copies Display
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / library_name_link.tt2
1 [%-
2     opac_root = ctx.opac_root;
3     IF ctx.kpac_root;
4         opac_root = ctx.kpac_root;
5     END;
6
7     org_name = ctx.get_aou(copy_info.circ_lib).name;
8     org_sname = ctx.get_aou(copy_info.circ_lib).shortname;
9     lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url');
10     prefer_external_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.prefer_external_url');
11     UNLESS lib_url && prefer_external_url;
12         lib_url = mkurl(opac_root _ '/library/' _ ctx.get_aou(copy_info.circ_lib).shortname, {}, 1);
13     END; 
14     IF lib_url; '<a property="seller" typeof="Library" href="'; lib_url | url; '">'; END;
15     '<span property="name">'; org_name | html; '</span>';
16     IF lib_url; '</a>'; END;
17 -%]
18