-%]
<tr>
<td class="location">
- [%-
- org_name = ctx.get_aou(copy_info.circ_lib).name;
- lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url');
- IF lib_url; '<a href="'; lib_url | url; '">'; END;
- org_name | html;
- IF lib_url; '</a>'; END;
- -%]
+ [%- INCLUDE "opac/parts/library_name_link.tt2"; -%]
</td>
[%- IF has_parts == 'true' %]
<td class="callnumber">[% l('[_1] ([_2])', callnum, copy_info.part_label) | html %]</td>
--- /dev/null
+[%-
+ 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');
+ prefer_external_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.prefer_external_url');
+ UNLESS lib_url && prefer_external_url;
+ lib_url = mkurl(ctx.opac_root _ '/library/' _ ctx.get_aou(copy_info.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;
+-%]
+
[%- copy_info.holding_label | html; -%]
</td>
[%- ELSE %]<td headers='copy_header_library'>
- [%-
- 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');
- prefer_external_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.prefer_external_url');
- UNLESS lib_url && prefer_external_url;
- lib_url = mkurl(ctx.opac_root _ '/library/' _ ctx.get_aou(copy_info.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;
+ [%- copy_info = copy;
+ INCLUDE "opac/parts/library_name_link.tt2";
-%]
<link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
<link property="itemOffered" href="#schemarecord">
[% FOR copy IN args.holdings %]
<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');
- 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;
--%]
+[%- INCLUDE "opac/parts/library_name_link.tt2" %]
</td>
<td>[% copy.location | html %]</td>
<td>[% copy.label | html %]</td>