Dan Wells noticed that the links on results pages went to a different location
(potentially, depending on the "prefer external library uri" OUS) than the
links on record pages. Make things consistent.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
<tr>
<td>
[%-
+ org_name = ctx.get_aou(copy.circ_lib).name;
+ org_sname = ctx.get_aou(copy.circ_lib).shortname;
lib_url = ctx.get_org_setting(copy.circ_lib, 'lib.info_url');
- IF lib_url; '<a href="'; lib_url | url; '">'; END;
- copy.library | html;
+ prefer_external_url = ctx.get_org_setting(copy.circ_lib, 'lib.prefer_external_url');
+ UNLESS lib_url && prefer_external_url;
+ lib_url = mkurl(ctx.opac_root _ '/library/' _ ctx.get_aou(copy.circ_lib).shortname, {}, 1);
+ END;
+ IF lib_url; '<a property="seller" typeof="Library" href="'; lib_url | url; '">'; END;
+ '<span property="name">'; org_name | html; '</span>';
IF lib_url; '</a>'; END;
-%]
</td>