From f53b6e738759ab3dcbcbd25350f4a152f013d4a6 Mon Sep 17 00:00:00 2001
From: Bill Erickson
Date: Fri, 30 Aug 2013 16:49:58 -0400
Subject: [PATCH] LP#856688 OUS to disable org unit as hold pickup lib
YAOUS that removes an org unit from consideration as a hold pickup
library. This setting only affects the OPAC display and does not
otherwise affect the display of the org unit in the OPAC. (In other
words, it's not the same thing as actor.org_unit.opac_visible). It also
has no affect on hold targeting / capturing.
Signed-off-by: Bill Erickson
---
Open-ILS/src/sql/Pg/950.data.seed-values.sql | 19 +++++++++++++++++++
.../sql/Pg/upgrade/XXXX.data.org-not-pickup.sql | 22 ++++++++++++++++++++++
Open-ILS/src/templates/opac/myopac/holds/edit.tt2 | 3 ++-
Open-ILS/src/templates/opac/parts/org_selector.tt2 | 5 +++++
Open-ILS/src/templates/opac/parts/place_hold.tt2 | 4 +++-
5 files changed, 51 insertions(+), 2 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-not-pickup.sql
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 8242492061..25c06bf878 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -13325,3 +13325,22 @@ VALUES (
);
+
+
+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 searching or hold targeting',
+ 'coust', 'description'),
+ 'bool'
+);
+
+
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-not-pickup.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-not-pickup.sql
new file mode 100644
index 0000000000..061846bae8
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-not-pickup.sql
@@ -0,0 +1,22 @@
+BEGIN;
+
+--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 searching or hold targeting',
+ 'coust', 'description'),
+ 'bool'
+);
+
+COMMIT;
+
diff --git a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2 b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
index 3415546110..271cdad18a 100644
--- a/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
+++ b/Open-ILS/src/templates/opac/myopac/holds/edit.tt2
@@ -48,7 +48,8 @@