'coust', 'description'),
'string', null)
+,( 'lib.info_url', 'lib',
+ oils_i18n_gettext('lib.info_url',
+ 'Library information URL (such as "http://example.com/about.html")',
+ 'coust', 'label'),
+ oils_i18n_gettext('lib.info_url',
+ 'URL for information on this library, such as contact information, hours of operation, and directions. If set, the library name in the copy details section links to that URL. Use a complete URL, such as "http://example.com/hours.html".',
+ 'coust', 'description'),
+ 'string', null)
+
,( 'notice.telephony.callfile_lines', 'lib',
oils_i18n_gettext('notice.telephony.callfile_lines',
'Telephony: Arbitrary line(s) to include in each notice callfile',
--- /dev/null
+INSERT into config.org_unit_setting_type
+( name, grp, label, description, datatype, fm_class ) VALUES
+( 'lib.info_url', 'lib',
+ oils_i18n_gettext('lib.info_url',
+ 'Library information URL (such as "http://example.com/about.html")',
+ 'coust', 'label'),
+ oils_i18n_gettext('lib.info_url',
+ 'URL for information on this library, such as contact information, hours of operation, and directions. If set, the library name in the copy details section links to that URL. Use a complete URL, such as "http://example.com/hours.html".',
+ 'coust', 'description'),
+ 'string', null)
+;
END;
-%]
<tr>
- <td class="location">[% ctx.get_aou(copy_info.circ_lib).name | html %]</td>
+ <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;
+ -%]
+ </td>
[%- IF has_parts == 'true' %]
<td class="callnumber">[% l('[_1] ([_2])', callnum, copy_info.part_label) | html %]</td>
[% ELSE %]
status = copy.findnodes('./*[local-name()="status"]');
NEXT IF status.getAttribute('opac_visible') == 'false';
+ # extract the circ_lib id from the circ_lib node
+ circ_lib = copy.findnodes('./*[local-name()="circ_lib"]');
+ circ_lib_id = circ_lib.getAttribute('id').replace('.*/', '');
+
UNLESS ou_hiding_disabled;
- # extract the circ_lib id from the circ_lib node
- circ_lib = copy.findnodes('./*[local-name()="circ_lib"]');
- circ_lib_id = circ_lib.getAttribute('id').replace('.*/', '');
NEXT UNLESS ctx.org_within_hiding_scope(circ_lib_id);
END;
holding = {
+ circ_lib => circ_lib_id,
label => vol.label,
part_label => part_label,
location => loc.textContent,
[%- ELSE %]<td header='copy_header_library'>
[%-
org_name = ctx.get_aou(copy_info.circ_lib).name;
- org_name | html
+ 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;
-%]
</td>[% END %]
<td header='copy_header_callnumber'>[% callnum | html %] [% IF ctx.get_org_setting(CGI.param('loc') OR ctx.aou_tree.id, 'sms.enable') == 1 %](<a href="[% mkurl(ctx.opac_root _ '/sms_cn', {copy_id => copy_info.id}) %]">Text</a>)[% END %]</td>
<tbody>
[% FOR copy IN args.holdings %]
<tr>
- <td>[% copy.library | html %]</td>
+ <td>
+[%-
+ lib_url = ctx.get_org_setting(copy.circ_lib, 'lib.info_url');
+ IF lib_url; '<a href="'; lib_url | url; '">'; END;
+ copy.library | html;
+ IF lib_url; '</a>'; END;
+-%]
+ </td>
<td>[% copy.location | html %]</td>
<td>[% copy.label | html %]</td>
[%- IF has_parts == 'true'; %]
--- /dev/null
+Linked library names in copy details
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+A patron may find one or more available copies of an item that they want to
+retrieve, but may not be familiar with the location, hours of operation, or
+contact information for each branch of their local library system. To enable
+the patron to quickly access information about a given library branch, the TPAC
+and KPAC can link the name of the branch in the copy details display to a URL
+associated with that branch.
+
+To set the URL for a given branch, use the *Local Administration -> Library
+Settings Editor* and edit the *Library Information URL* setting for that
+branch. Any branches that do not have a library information URL setting display
+as normal text.