'If this setting is true at a given org unit or one of its ancestors, the hold targeter will target copies from this org unit even if the org unit is closed (according to the actor.org_unit.closed_date table) IF AND ONLY IF the copy''s circ lib is the same as the hold''s pickup lib.',
'coust', 'description'),
'bool', null)
-
-
,( 'opac.staff.jump_to_details_on_single_hit', 'opac',
oils_i18n_gettext('opac.staff.jump_to_details_on_single_hit',
'Jump to details on 1 hit (staff client)',
'When a search yields only 1 result, jump directly to the record details page. This setting only affects the public OPAC',
'coust', 'description'),
'bool', null)
-
+,( 'opac.holds.org_unit_not_pickup_lib', 'opac',
+ oils_i18n_gettext('opac.holds.org_unit_not_pickup_lib',
+ 'OPAC: Org Unit is not a hold pickup library',
+ 'coust', 'label'),
+ oils_i18n_gettext('opac.holds.org_unit_not_pickup_lib',
+ 'If set, this org unit will not be offered to the patron as an option for a hold pickup location. This setting has no affect on org unit-based OPAC searches or hold targeting.',
+ 'coust', 'description'),
+ 'bool', null)
;
UPDATE config.org_unit_setting_type
--- /dev/null
+-- Evergreen DB patch XXXX.data.org-setting-ou-not-pickup-lib.sql
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT into config.org_unit_setting_type (name, grp, label, description, datatype)
+ VALUES (
+ 'opac.holds.org_unit_not_pickup_lib',
+ 'opac',
+ oils_i18n_gettext('opac.holds.org_unit_not_pickup_lib',
+ 'OPAC: Org Unit is not a hold pickup library',
+ 'coust', 'label'),
+ oils_i18n_gettext('opac.holds.org_unit_not_pickup_lib',
+ 'If set, this org unit will not be offered to the patron as an option for a hold pickup location. This setting has no affect on org unit-based OPAC searches or hold targeting.',
+ 'coust', 'description'),
+ 'bool'
+ );
+
+COMMIT;
</th>
<td>
[% PROCESS build_org_selector
- name='pickup_lib' value=ahr.pickup_lib %]
+ name='pickup_lib' value=ahr.pickup_lib can_have_vols_only=1 hold_pickup_lib=1 %]
</td>
</tr>
[% IF hold.hold.status < 3 %]
ELSIF walker.id == value;
selected = 'selected="selected"';
END;
- IF ctx.is_staff || walker.opac_visible == 't';
+ IF (ctx.is_staff || walker.opac_visible == 't') AND
+ !(hold_pickup_lib AND ctx.get_org_setting(walker.id, 'opac.holds.org_unit_not_pickup_lib'));
%]
<option value='[% walker.id | uri %]' [% selected %] [% disabled %]>
[%
<p>
[% l('Pickup location:') %]
[% PROCESS "opac/parts/org_selector.tt2";
- PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id='pickup_lib' can_have_vols_only=1 %]
+ PROCESS build_org_selector name='pickup_lib'
+ value=ctx.default_pickup_lib id='pickup_lib' can_have_vols_only=1 hold_pickup_lib=1 %]
</p>
<p>
[% |l %]If you use the Traveling Library Center (TLC) and ABC Express