Bugzilla – Attachment 163055 Details for
Bug 15565
Place multiple item-level holds at once for the same record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15565: Add 'DisplayMultiItemHolds' system preference to toggle display of multi item holds
Bug-15565-Add-DisplayMultiItemHolds-system-prefere.patch (text/plain), 7.79 KB, created by
Nick Clemens (kidclamp)
on 2024-03-11 19:06:28 UTC
(
hide
)
Description:
Bug 15565: Add 'DisplayMultiItemHolds' system preference to toggle display of multi item holds
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-03-11 19:06:28 UTC
Size:
7.79 KB
patch
obsolete
>From 05d1d1fa48a60165d912987a89318bd7be4f1827 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 13 Feb 2024 00:44:51 +0000 >Subject: [PATCH] Bug 15565: Add 'DisplayMultiItemHolds' system preference to > toggle display of multi item holds > >These patches allow the display of checkboxes instead of radio buttons for placing specific >item holds in the OPAC and staff interface. This display is controlled by the system preference >'DisplayMultiItemHolds'. When disabled, the hold display is the same as in the past. When enabled, >the user can select multiple items to place holds on at the same time. > >If there is an error placing one or more holds, an error will display on the following screen. > >Test plan: >0. Apply the patches and koha-plack --reload kohadev >1. Enable 'DisplayMultiItemHolds' syspref >2. In staff interface, go to a record with multiple holdable items >3. Check the boxes next to 2+ items and click the button to place the holds >4. Note that the holds are all placed (unless there is a failure) >5. Cancel the holds, and try again (but this time make Holds per record (count) only >1 in the circ rules) >6. Note that one of the holds is placed, but the others are not and an error message >is displayed saying that one or more holds could not be placed because the holds per >record was exceeded > >7. Perform the same above procedure on the OPAC >8. If DisplayMultiPlaceHold is enabled, you can test placing multiple specific item holds >across multiple bibs in the OPAC via the search results >9. If EnableItemGroups and EnableItemGroupHolds is enabled, you can test that you can >either place item group holds or specific item holds. Toggling the checkboxes in the >staff interface will uncheck the item group hold radio button. >--- > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/circulation.pref | 6 ++++++ > .../intranet-tmpl/prog/en/modules/reserve/request.tt | 8 ++++++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 6 +++++- > 4 files changed, 18 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 669074aa506..f7f9c34a9a0 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -211,6 +211,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('displayFacetCount','0',NULL,NULL,'YesNo'), > ('DisplayIconsXSLT','1','','If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages.','YesNo'), > ('DisplayLibraryFacets', 'holding', 'home|holding|both', 'Defines which library facets to display.', 'Choice'), >+('DisplayMultiItemHolds','0','','Display the ability to place holds on different items at the same time in staff interface and OPAC','YesNo'), > ('DisplayMultiPlaceHold','1','','Display the ability to place multiple holds or not','YesNo'), > ('DisplayOPACiconsXSLT','1','','If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages in the OPAC.','YesNo'), > ('DumpSearchQueryTemplate',0,'','Add the search query being passed to the search engine into the template for debugging','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 bae185a1f5c..e31eee317cc 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 >@@ -867,6 +867,12 @@ Circulation: > 1: Enable > 0: "Don't enable" > - "the ability to place holds on multiple bibliographic records from the search results" >+ - >+ - pref: DisplayMultiItemHolds >+ choices: >+ 1: Enable >+ 0: "Don't enable" >+ - "the ability to place holds on different items at the same time in staff interface and OPAC" > - > - pref: TransferWhenCancelAllWaitingHolds > choices: >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 86530949154..03484095b7f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -11,6 +11,10 @@ > [% USE AuthorisedValues %] > [% USE Price %] > [% USE TablesSettings %] >+[% SET reserve_input_type = 'radio' %] >+[% IF ( Koha.Preference('DisplayMultiItemHolds') ) %] >+ [% SET reserve_input_type = 'checkbox' %] >+[% END %] > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -786,9 +790,9 @@ > Hold must be item group level > </span> > [% ELSIF ( itemloo.available ) %] >- <input type="checkbox" name="checkitem" value="[% itemloo.itemnumber | html %]" /> >+ <input type="[% reserve_input_type | html %]" name="checkitem" value="[% itemloo.itemnumber | html %]" /> > [% ELSIF ( itemloo.override ) %] >- <input type="checkbox" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" /> >+ <input type="[% reserve_input_type | html %]" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" /> > <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i> > [% ELSE %] > <span class="error"> >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 76e8f50e1f5..580ab2a8c8d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -5,6 +5,10 @@ > [% USE Price %] > [% USE ItemTypes %] > [% USE AuthorisedValues %] >+[% SET reserve_input_type = 'radio' %] >+[% IF ( Koha.Preference('DisplayMultiItemHolds') ) %] >+ [% SET reserve_input_type = 'checkbox' %] >+[% END %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Placing a hold › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -395,7 +399,7 @@ > <tr class="holdable"> > [% END %] > <td class="copynumber" data-order="[% itemLoo.copynumber | html %]"> >- <input type="checkbox" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" name="checkitem_[% bibitemloo.biblionumber | html %]" value="[% itemLoo.itemnumber | html %]" /> >+ <input type="[% reserve_input_type | html %]" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" name="checkitem_[% bibitemloo.biblionumber | html %]" value="[% itemLoo.itemnumber | html %]" /> > [% ELSE %] > [% SET unholdable_items = 1 %] > [% IF ( itemLoo.checkout ) %] >-- >2.30.2
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 15565
:
47527
|
47551
|
47552
|
50068
|
50069
|
50392
|
50393
|
56229
|
56230
|
56231
|
56232
|
56458
|
56510
|
56511
|
56512
|
56513
|
56514
|
56515
|
56517
|
56518
|
56519
|
56520
|
56521
|
56522
|
56523
|
56524
|
61244
|
61245
|
61246
|
61247
|
61248
|
61576
|
61577
|
61578
|
61579
|
61580
|
64590
|
64591
|
64592
|
64593
|
64594
|
66594
|
66595
|
66596
|
66597
|
66598
|
68759
|
68760
|
68761
|
68762
|
68763
|
71643
|
71644
|
71645
|
71646
|
71647
|
71648
|
72644
|
72645
|
72646
|
72647
|
72648
|
72649
|
78242
|
78243
|
78244
|
78245
|
78246
|
78247
|
78248
|
78266
|
78305
|
78417
|
78418
|
78419
|
78420
|
78421
|
78422
|
78423
|
78424
|
78425
|
78426
|
78712
|
78713
|
78714
|
78715
|
78716
|
78717
|
78718
|
78719
|
78720
|
78815
|
78816
|
78817
|
78818
|
78819
|
78820
|
78821
|
78822
|
78823
|
81419
|
81420
|
81421
|
81422
|
81423
|
81424
|
81425
|
81426
|
81427
|
81431
|
81449
|
81570
|
81571
|
81572
|
81573
|
81574
|
81575
|
81576
|
81577
|
81578
|
81579
|
81580
|
81581
|
82205
|
82206
|
82207
|
82208
|
82209
|
82210
|
82211
|
82212
|
82213
|
82214
|
82215
|
82216
|
82220
|
82221
|
83331
|
83332
|
83333
|
83334
|
83335
|
83336
|
83337
|
83338
|
83339
|
83340
|
83341
|
83342
|
83378
|
83380
|
83381
|
84541
|
84542
|
84543
|
84544
|
84545
|
84546
|
84547
|
84548
|
84549
|
84550
|
84551
|
84552
|
84553
|
87979
|
87980
|
87981
|
87982
|
87983
|
87984
|
87985
|
87986
|
87987
|
87988
|
87989
|
87990
|
87991
|
117128
|
117129
|
117130
|
117131
|
117132
|
117133
|
120365
|
120366
|
120367
|
120639
|
120640
|
120641
|
121941
|
122098
|
162071
|
162072
|
162073
|
162074
|
163052
|
163053
|
163054
|
163055
|
163092
|
163093
|
166005
|
166006
|
166007
|
166008
|
166009