Bugzilla – Attachment 185151 Details for
Bug 37661
Disable/Enable Bookings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37661: Have 29002 depend on EnableBooking
Bug-37661-Have-29002-depend-on-EnableBooking.patch (text/plain), 14.07 KB, created by
Andrew Fuerste-Henry
on 2025-08-06 12:12:13 UTC
(
hide
)
Description:
Bug 37661: Have 29002 depend on EnableBooking
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2025-08-06 12:12:13 UTC
Size:
14.07 KB
patch
obsolete
>From 2b5efab9aa1959a783355c9c20e7d4caa248f1cc Mon Sep 17 00:00:00 2001 >From: Baptiste <baptiste.wojtkowski@biblibre.com> >Date: Wed, 23 Jul 2025 16:23:22 +0200 >Subject: [PATCH] Bug 37661: Have 29002 depend on EnableBooking > >Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> >--- > .../prog/en/includes/cat-toolbar.inc | 3 +- > .../prog/en/modules/catalogue/ISBDdetail.tt | 12 ++- > .../prog/en/modules/catalogue/MARCdetail.tt | 12 ++- > .../prog/en/modules/catalogue/detail.tt | 14 +++- > .../prog/en/modules/catalogue/imageviewer.tt | 12 ++- > .../en/modules/catalogue/labeledMARCdetail.tt | 12 ++- > .../prog/en/modules/catalogue/moredetail.tt | 75 ++++++++++--------- > 7 files changed, 88 insertions(+), 52 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >index f760ebc8117..454dd266c20 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -283,8 +283,7 @@ > [% END %] > [% END %] > [% END %] >- >- [% IF ( CAN_user_circulate_manage_bookings && biblio.items.filter_by_bookable.count ) %] >+ [% IF ( Koha.Preference('EnableBooking') && CAN_user_circulate_manage_bookings && biblio.items.filter_by_bookable.count ) %] > <div class="btn-group" > ><button id="placbooking" class="btn btn-default" data-bs-toggle="modal" data-bs-target="#placeBookingModal" data-biblionumber="[% biblionumber | html %]"><i class="fa fa-calendar"></i> Place booking</button></div > > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt >index 8fdd39fb2cc..87b52a94bcd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt >@@ -82,10 +82,16 @@ > <script> > dayjs.extend(window.dayjs_plugin_isSameOrBefore); > </script> >- [% INCLUDE 'calendar.inc' %] >- [% INCLUDE 'select2.inc' %] >+ <script>dayjs.extend(window.dayjs_plugin_isSameOrAfter)</script> >+ <script>dayjs.extend(window.dayjs_plugin_isSameOrBefore)</script> > [% Asset.js("js/catalog.js") | $raw %] >- [% Asset.js("js/modals/place_booking.js") | $raw %] >+ >+ [% IF Koha.Preference('EnableBooking') %] >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'select2.inc' %] >+ [% Asset.js("js/modals/place_booking.js") | $raw %] >+ [% END %] >+ > [% Asset.js("js/browser.js") | $raw %] > [% IF ( Koha.Preference('CatalogConcerns') ) %] > <script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt >index 0b7138a2554..5e182c08219 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt >@@ -206,10 +206,16 @@ > <script> > dayjs.extend(window.dayjs_plugin_isSameOrBefore); > </script> >- [% INCLUDE 'calendar.inc' %] >- [% INCLUDE 'select2.inc' %] >+ <script>dayjs.extend(window.dayjs_plugin_isSameOrAfter)</script> >+ <script>dayjs.extend(window.dayjs_plugin_isSameOrBefore)</script> > [% Asset.js("js/catalog.js") | $raw %] >- [% Asset.js("js/modals/place_booking.js") | $raw %] >+ >+ [% IF Koha.Preference('EnableBooking') %] >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'select2.inc' %] >+ [% Asset.js("js/modals/place_booking.js") | $raw %] >+ [% END %] >+ > [% Asset.js("js/browser.js") | $raw %] > [% IF ( Koha.Preference('CatalogConcerns') ) %] > <script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 6c195eb3c20..7b89580d2ed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -1254,10 +1254,12 @@ > [% END %] > > [% MACRO jsinclude BLOCK %] >- [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'catalog-strings.inc' %] >- [% INCLUDE 'select2.inc' %] >- [% INCLUDE 'js-date-format.inc' %] >+ [% IF Koha.Preference('EnableBooking') %] >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'select2.inc' %] >+ [% INCLUDE 'js-date-format.inc' %] >+ [% END %] > [% Asset.js("js/catalog.js") | $raw %] > [% Asset.js("js/recalls.js") | $raw %] > [% Asset.js("js/coce.js") | $raw %] >@@ -1719,7 +1721,11 @@ > [% INCLUDE 'js-patron-format.inc' %] > [% INCLUDE 'js-biblio-format.inc' %] > [% Asset.js("js/browser.js") | $raw %] >- [% Asset.js("js/modals/place_booking.js") | $raw %] >+ >+ [% IF Koha.Preference('EnableBooking') %] >+ [% Asset.js("js/modals/place_booking.js") | $raw %] >+ [% END %] >+ > <script> > var browser; > browser = KOHA.browser("[% searchid | html %]", parseInt(biblionumber, 10)); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >index 0bb0a483a00..102eb4e664f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >@@ -136,10 +136,16 @@ > <script> > dayjs.extend(window.dayjs_plugin_isSameOrBefore); > </script> >- [% INCLUDE 'calendar.inc' %] >- [% INCLUDE 'select2.inc' %] >+ <script>dayjs.extend(window.dayjs_plugin_isSameOrAfter)</script> >+ <script>dayjs.extend(window.dayjs_plugin_isSameOrBefore)</script> > [% Asset.js("js/catalog.js") | $raw %] >- [% Asset.js("js/modals/place_booking.js") | $raw %] >+ >+ [% IF Koha.Preference('EnableBooking') %] >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'select2.inc' %] >+ [% Asset.js("js/modals/place_booking.js") | $raw %] >+ [% END %] >+ > [% IF ( Koha.Preference('CatalogConcerns') ) %] > <script> > /* Set a variable needed by add_catalog_concern.js */ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt >index 3e83f4e01ce..3e7c371433c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt >@@ -95,11 +95,17 @@ > <script> > dayjs.extend(window.dayjs_plugin_isSameOrBefore); > </script> >- [% INCLUDE 'calendar.inc' %] >- [% INCLUDE 'select2.inc' %] >+ <script>dayjs.extend(window.dayjs_plugin_isSameOrAfter)</script> >+ <script>dayjs.extend(window.dayjs_plugin_isSameOrBefore)</script> > [% Asset.js("js/catalog.js") | $raw %] >- [% Asset.js("js/modals/place_booking.js") | $raw %] > [% Asset.js("js/browser.js") | $raw %] >+ >+ [% IF Koha.Preference('EnableBooking') %] >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'select2.inc' %] >+ [% Asset.js("js/modals/place_booking.js") | $raw %] >+ [% END %] >+ > [% IF ( Koha.Preference('CatalogConcerns') ) %] > <script> > /* Set a variable needed by add_catalog_concern.js */ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index 84526221a91..f82205b782f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -396,37 +396,39 @@ > <input type="submit" name="submit" class="btn btn-primary btn-xs" value="Update" /> > </form> > </li> >- <li class="bookable"> >- <span class="label"> Bookable: </span> >- [% IF ( CAN_user_circulate ) %] >- <form action="updateitem.pl" method="post"> >- [% INCLUDE 'csrf-token.inc' %] >- <input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber | html %]" /> >- <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber | html %]" /> >- <input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber | html %]" /> >- <select name="bookable"> >- [% IF ITEM_DAT.bookable == 1 %] >- <option value="">Follow item type</option> >- <option value="1" selected="selected">Yes</option> >- <option value="0">No</option> >- [% ELSIF ITEM_DAT.bookable == 0 %] >- <option value="">Follow item type</option> >- <option value="1">Yes</option> >- <option value="0" selected="selected">No</option> >- [% ELSE %] >- <option value="" selected="selected">Follow item type</option> >- <option value="1">Yes</option> >- <option value="0">No</option> >- [% END %] >- </select> >- <input type="hidden" name="op" value="cud-set_bookable" /> >- <input type="submit" name="submit" class="btn btn-primary btn-xs" value="Update" /> >- </form> >- [% ELSE %] >- [% IF ITEM_DAT.bookable == 1 %]Yes[% ELSIF ITEM_DAT.bookable == 0 %]No[% ELSE %]Follow item type[% END %] >- [% END %] >- <span class="hint"> Item type bookable: [% IF ITEM_DAT.effective_itemtype.bookable == 1 %]Yes[% ELSE %]No[% END %]</span> >- </li> >+ [% IF Koha.Preference('EnableBooking') %] >+ <li class="bookable"> >+ <span class="label"> Bookable: </span> >+ [% IF ( CAN_user_circulate ) %] >+ <form action="updateitem.pl" method="post"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber | html %]" /> >+ <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber | html %]" /> >+ <input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber | html %]" /> >+ <select name="bookable"> >+ [% IF ITEM_DAT.bookable == 1 %] >+ <option value="">Follow item type</option> >+ <option value="1" selected="selected">Yes</option> >+ <option value="0">No</option> >+ [% ELSIF ITEM_DAT.bookable == 0 %] >+ <option value="">Follow item type</option> >+ <option value="1">Yes</option> >+ <option value="0" selected="selected">No</option> >+ [% ELSE %] >+ <option value="" selected="selected">Follow item type</option> >+ <option value="1">Yes</option> >+ <option value="0">No</option> >+ [% END %] >+ </select> >+ <input type="hidden" name="op" value="cud-set_bookable" /> >+ <input type="submit" name="submit" class="btn btn-primary btn-xs" value="Update" /> >+ </form> >+ [% ELSE %] >+ [% IF ITEM_DAT.bookable == 1 %]Yes[% ELSIF ITEM_DAT.bookable == 0 %]No[% ELSE %]Follow item type[% END %] >+ [% END %] >+ <span class="hint"> Item type bookable: [% IF ITEM_DAT.effective_itemtype.bookable == 1 %]Yes[% ELSE %]No[% END %]</span> >+ </li> >+ [% END %] > </ol> > <!-- /.bibliodetails --> > </div> >@@ -584,12 +586,17 @@ > dayjs.extend(window.dayjs_plugin_isSameOrBefore); > </script> > [% INCLUDE 'js-patron-format.inc' %] >- [% INCLUDE 'calendar.inc' %] >- [% INCLUDE 'select2.inc' %] > [% Asset.js("js/catalog.js") | $raw %] >- [% Asset.js("js/modals/place_booking.js") | $raw %] > [% Asset.js("js/browser.js") | $raw %] > [% Asset.js("js/checkout_renewals_modal.js") | $raw %] >+ >+ [% IF Koha.Preference('EnableBooking') %] >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'select2.inc' %] >+ [% Asset.js("js/modals/place_booking.js") | $raw %] >+ [% END %] >+ >+ > [% IF ( Koha.Preference('CatalogConcerns') ) %] > <script> > /* Set a variable needed by add_catalog_concern.js */ >-- >2.39.5
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 37661
:
184558
|
184559
|
184560
|
184561
|
184565
|
184566
|
184578
|
184579
|
184580
|
184581
|
184582
|
185150
|
185151
|
185152
|
185153
|
185154
|
185325
|
185326
|
185327
|
185329
|
185331
|
185333
|
185710
|
185711
|
185712
|
185713
|
185714
|
185715
|
185716