Bugzilla – Attachment 50945 Details for
Bug 15533
Allow patrons and librarians to select itemtype when placing hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 15533 [QA Followup] - Add a system preference
PASSED-QA-Bug-15533-QA-Followup---Add-a-system-pre.patch (text/plain), 7.53 KB, created by
Katrin Fischer
on 2016-04-28 19:03:06 UTC
(
hide
)
Description:
[PASSED QA] Bug 15533 [QA Followup] - Add a system preference
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-04-28 19:03:06 UTC
Size:
7.53 KB
patch
obsolete
>From 08d8f41275ac314906456815bb5d8da33481efa9 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 28 Apr 2016 15:32:09 +0000 >Subject: [PATCH] [PASSED QA] Bug 15533 [QA Followup] - Add a system preference > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > installer/data/mysql/atomicupdate/hold_itype.sql | 3 +++ > installer/data/mysql/sysprefs.sql | 1 + > .../en/modules/admin/preferences/circulation.pref | 6 ++++++ > .../intranet-tmpl/prog/en/modules/reserve/request.tt | 20 +++++++++++--------- > .../opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 20 +++++++++++--------- > 5 files changed, 32 insertions(+), 18 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/hold_itype.sql b/installer/data/mysql/atomicupdate/hold_itype.sql >index 200dcfe..60301b6 100644 >--- a/installer/data/mysql/atomicupdate/hold_itype.sql >+++ b/installer/data/mysql/atomicupdate/hold_itype.sql >@@ -5,3 +5,6 @@ ALTER TABLE reserves ADD CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) R > ALTER TABLE old_reserves ADD COLUMN itemtype VARCHAR(10) NULL DEFAULT NULL AFTER suspend_until; > ALTER TABLE old_reserves ADD KEY `itemtype` (`itemtype`); > ALTER TABLE old_reserves ADD CONSTRAINT `old_reserves_ibfk_4` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE; >+ >+INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES >+('AllowHoldItemTypeSelection','0','','If enabled, patrons and staff will be able to select the itemtype when placing a hold','YesNo'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 9e7bc3d..fed0ed9 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -17,6 +17,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AllowAllMessageDeletion','0','','Allow any Library to delete any message','YesNo'), > ('AllowFineOverride','0','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','YesNo'), > ('AllowHoldDateInFuture','0','','If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','YesNo'), >+('AllowHoldItemTypeSelection','0','','If enabled, patrons and staff will be able to select the itemtype when placing a hold','YesNo'), > ('AllowHoldPolicyOverride','0',NULL,'Allow staff to override hold policies when placing holds','YesNo'), > ('AllowHoldsOnDamagedItems','1','','Allow hold requests to be placed on damaged items','YesNo'), > ('AllowHoldsOnPatronsPossessions','1',NULL,'Allow holds on records that patron have items of it','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 8cdba08..37b8d57 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -444,6 +444,12 @@ Circulation: > - Each pair of values should be on a separate line. > Holds Policy: > - >+ - pref: AllowHoldItemTypeSelection >+ choices: >+ yes: Allow >+ no: "Don't allow" >+ - hold fulfillment to be limited by itemtype. >+ - > - pref: AllowRenewalIfOtherItemsAvailable > choices: > yes: Allow >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index d248206..c0cd0f9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -412,15 +412,17 @@ function checkMultiHold() { > </li> > > [% UNLESS ( multi_hold ) %] >- <li> >- <label for="itemtype">Request specific item type:</label> >- <select name="itemtype" size="1" id="itemtype"> >- <option value="">Any item type</option> >- [%- FOREACH itemtype IN available_itemtypes %] >- <option value="[% itemtype %]">[% ItemTypes.GetDescription( itemtype ) %]</option> >- [%- END %] >- </select> >- </li> >+ [% IF Koha.Preference('AllowHoldItemTypeSelection') %] >+ <li> >+ <label for="itemtype">Request specific item type:</label> >+ <select name="itemtype" size="1" id="itemtype"> >+ <option value="">Any item type</option> >+ [%- FOREACH itemtype IN available_itemtypes %] >+ <option value="[% itemtype %]">[% ItemTypes.GetDescription( itemtype ) %]</option> >+ [%- END %] >+ </select> >+ </li> >+ [% END %] > [% END %] > > [% IF ( reserve_in_future ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index 01032cc..3b8ba6c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -250,15 +250,17 @@ > </li> > > [% UNLESS ( multi_hold ) %] >- <li> >- <label for="itemtype">Request specific item type:</label> >- <select name="itemtype" size="1" id="itemtype"> >- <option value="">Any item type</option> >- [%- FOREACH itemtype IN available_itemtypes %] >- <option value="[% itemtype %]">[% ItemTypes.GetDescription( itemtype ) %]</option> >- [%- END %] >- </select> >- </li> >+ [% IF Koha.Preference('AllowHoldItemTypeSelection') %] >+ <li> >+ <label for="itemtype">Request specific item type:</label> >+ <select name="itemtype" size="1" id="itemtype"> >+ <option value="">Any item type</option> >+ [%- FOREACH itemtype IN available_itemtypes %] >+ <option value="[% itemtype %]">[% ItemTypes.GetDescription( itemtype ) %]</option> >+ [%- END %] >+ </select> >+ </li> >+ [% END %] > [% END %] > > [% IF ( OpacHoldNotes ) %] >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15533
:
46462
|
48262
|
49227
|
49469
|
50016
|
50145
|
50926
|
50927
|
50928
|
50929
|
50931
|
50932
|
50933
|
50934
|
50937
|
50941
|
50942
|
50943
|
50944
| 50945 |
50946
|
50947
|
50948
|
50949