flesh_fields => {
circ => ['target_copy'],
acp => ['call_number'],
- acn => ['record']
+ acn => ['record','owning_lib']
}
};
my $action = shift;
my $circ_ids = shift;
- my $circ_ids //= [$self->cgi->param('circ_id')];
+ $circ_ids //= [$self->cgi->param('circ_id')];
if ($action =~ /delete/) {
my $options = {
'coust', 'description'),
'bool', null)
+,( 'opac.show_owning_lib_column', 'opac',
+ oils_i18n_gettext('opac.show_owning_lib_column',
+ 'Show "Owning Lib" column in Items Out',
+ 'coust', 'label'),
+ oils_i18n_gettext('opac.show_owning_lib_column',
+ 'If enabled, an addition column, Owning Lib, will be shown in the Items Out display. This may assist in requesting additional renewals',
+ 'coust', 'description'),
+ 'bool', null)
+
,( 'opac.barcode_regex', 'glob',
oils_i18n_gettext('opac.barcode_regex',
'Patron barcode format',
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO config.org_unit_setting_type
+ (grp, name, datatype, label, description)
+VALUES (
+ 'opac',
+ 'opac.show_owning_lib_column', 'bool',
+ oils_i18n_gettext(
+ 'opac.show_owning_lib_column',
+ 'Show Owning Lib in Items Out',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'opac.show_owning_lib_column',
+'If enabled, the Owning Lib will be shown in the Items Out display.' ||
+' This may assist in requesting additional renewals',
+ 'coust',
+ 'description'
+ )
+);
+
+COMMIT;
<th>[% sort_head("renews", l("Renewals Left")) %]</th>
<th>[% sort_head("due", l("Due Date")) %]</th>
<th>[% sort_head("barcode", l("Barcode")) %]</th>
- <th>[% sort_head("callnum", l("Call number")) %]</th>
+ <th>[% sort_head("callnum", l("Call Number")) %]</th>
+ [% IF ctx.get_org_setting(ctx.user.home_ou, 'opac.show_owning_lib_column'); %]
+ <th>[% sort_head("lib", l("Owning Library")) %]</th>
+ [% column_count = 8;
+ ELSE ;
+ column_count = 7;
+ END; %]
</tr>
</thead>
<tbody>
CASE "callnum";
circ.SORTING = circ.circ.target_copy.call_number.label;
+ CASE "lib";
+ circ.SORTING = circ.circ.target_copy.call_number.owning_lib.name;
CASE;
sort_field = "";
<td name="call_number">
[% circ.circ.target_copy.call_number.label | html %]
</td>
+ [% IF ctx.get_org_setting(ctx.user.home_ou, 'opac.show_owning_lib_column'); %]
+ <td name="lib">
+ [%- fleshed_ou = circ.circ.target_copy.call_number.owning_lib;
+ INCLUDE "opac/parts/library_name_link_from_ou.tt2";
+ %]
+ </td>
+ [% END; %]
</tr>
+
[% IF circ.renewal_response AND
circ.renewal_response.textcode != 'SUCCESS' %]
<tr>
- <td colspan="6">[%# XXX colspan="0" does not work in IE %]
+ <td colspan="[% column_count %]">[%# XXX colspan="0" does not work in IE %]
<span class="failure-text" title="[% circ.renewal_response.textcode | html %] / [% circ.renewal_response.fail_part | html %]">
[%
renew_fail_msg = '';
</span>
</td>
</tr>
- [% END; # FOR
+ [% END; %]
- END %]
+ [% END; %]
</tbody>
</table>
</form>
opac_root = ctx.kpac_root;
END;
- 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');
+ # Allow fleshed circ_libs
+ IF copy_info.circ_lib.name;
+ org_id = copy_info.circ_lib.id;
+ org_name = copy_info.circ_lib.name;
+ org_sname = copy_info.circ_lib.shortname;
+ ELSE;
+ org_id = copy_info.circ_lib;
+ org_name = ctx.get_aou(org_id).name;
+ org_sname = ctx.get_aou(org_id).shortname;
+ END;
+
+ lib_url = ctx.get_org_setting(org_id, 'lib.info_url');
+ prefer_external_url = ctx.get_org_setting(org_id, 'lib.prefer_external_url');
UNLESS lib_url && prefer_external_url;
- lib_url = mkurl(opac_root _ '/library/' _ ctx.get_aou(copy_info.circ_lib).shortname, {}, 1);
+ lib_url = mkurl(opac_root _ '/library/' _ org_sname, {}, 1);
END;
IF lib_url; '<a property="offeredBy" typeof="Library" href="'; lib_url | html; '">'; END;
'<span property="name">'; org_name | html; '</span>';
--- /dev/null
+[%-
+ opac_root = ctx.opac_root;
+ IF ctx.kpac_root;
+ opac_root = ctx.kpac_root;
+ END;
+
+ # Requires a "fleshed_ou" (aou) object defined.
+ # Allow fleshed circ_libs
+ org_id = fleshed_ou.id;
+ org_name = fleshed_ou.name;
+ org_sname = fleshed_ou.shortname;
+
+ lib_url = ctx.get_org_setting(org_id, 'lib.info_url');
+ prefer_external_url = ctx.get_org_setting(org_id, 'lib.prefer_external_url');
+ UNLESS lib_url && prefer_external_url;
+ lib_url = mkurl(opac_root _ '/library/' _ org_sname, {}, 1);
+ END;
+ IF lib_url; '<a property="offeredBy" typeof="Library" href="'; lib_url | html; '">'; END;
+ '<span property="name">'; org_name | html; '</span>';
+ IF lib_url; '</a>'; END;
+-%]
+
--- /dev/null
+New Column in Items Out Display
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+A new column, Owning Library, is now optionally available for the Items
+Out display which shows the owning library of the item (not necessarily
+the library at which the item was picked up). When a patron has run
+ out of renewals, the owning library is the one with whom the patron
+will negotiate additional renewals, and clicking on the library
+name will provide contact information for that library.
+
+The column is controlled by the organization setting
+"opac.show_owning_library_column".