]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac-new/parts/library_name_link.tt2
LP#1778972: (follow-up) remove a NFPL-specific template
[Evergreen.git] / Open-ILS / src / templates / opac-new / 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   # Allow fleshed circ_libs
8     IF copy_info.circ_lib.name; 
9        org_id = copy_info.circ_lib.id;
10        org_name = copy_info.circ_lib.name; 
11        org_sname = copy_info.circ_lib.shortname; 
12     ELSE;
13        org_id = copy_info.circ_lib;
14        org_name = ctx.get_aou(org_id).name;
15        org_sname = ctx.get_aou(org_id).shortname;
16     END;
17
18      lib_url = ctx.get_org_setting(org_id, 'lib.info_url');
19     prefer_external_url = ctx.get_org_setting(org_id, 'lib.prefer_external_url');
20     UNLESS lib_url && prefer_external_url;
21         lib_url = mkurl(opac_root _ '/library/' _ org_sname, {}, 1);
22     END; 
23     IF lib_url; '<a target="_blank" property="offeredBy" typeof="Library" href="'; lib_url | html; '">'; END;
24     '<span property="name">'; org_name | html; '</span>';
25     IF lib_url; '</a>'; END;
26 -%]
27