View | Details | Raw Unified | Return to bug 37661
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (-2 / +1 lines)
Lines 283-290 Link Here
283
            [% END %]
283
            [% END %]
284
        [% END %]
284
        [% END %]
285
    [% END %]
285
    [% END %]
286
286
    [% IF ( Koha.Preference('EnableBooking') &&  CAN_user_circulate_manage_bookings && biblio.items.filter_by_bookable.count ) %]
287
    [% IF ( CAN_user_circulate_manage_bookings && biblio.items.filter_by_bookable.count ) %]
288
        <div class="btn-group"
287
        <div class="btn-group"
289
            ><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
288
            ><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
290
        >
289
        >
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt (-3 / +9 lines)
Lines 82-91 Link Here
82
    <script>
82
    <script>
83
        dayjs.extend(window.dayjs_plugin_isSameOrBefore);
83
        dayjs.extend(window.dayjs_plugin_isSameOrBefore);
84
    </script>
84
    </script>
85
    [% INCLUDE 'calendar.inc' %]
85
    <script>dayjs.extend(window.dayjs_plugin_isSameOrAfter)</script>
86
    [% INCLUDE 'select2.inc' %]
86
    <script>dayjs.extend(window.dayjs_plugin_isSameOrBefore)</script>
87
    [% Asset.js("js/catalog.js") | $raw %]
87
    [% Asset.js("js/catalog.js") | $raw %]
88
    [% Asset.js("js/modals/place_booking.js") | $raw %]
88
89
    [% IF Koha.Preference('EnableBooking') %]
90
        [% INCLUDE 'calendar.inc' %]
91
        [% INCLUDE 'select2.inc' %]
92
        [% Asset.js("js/modals/place_booking.js") | $raw %]
93
    [% END %]
94
89
    [% Asset.js("js/browser.js") | $raw %]
95
    [% Asset.js("js/browser.js") | $raw %]
90
    [% IF ( Koha.Preference('CatalogConcerns') ) %]
96
    [% IF ( Koha.Preference('CatalogConcerns') ) %]
91
        <script>
97
        <script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt (-3 / +9 lines)
Lines 206-215 Link Here
206
    <script>
206
    <script>
207
        dayjs.extend(window.dayjs_plugin_isSameOrBefore);
207
        dayjs.extend(window.dayjs_plugin_isSameOrBefore);
208
    </script>
208
    </script>
209
    [% INCLUDE 'calendar.inc' %]
209
    <script>dayjs.extend(window.dayjs_plugin_isSameOrAfter)</script>
210
    [% INCLUDE 'select2.inc' %]
210
    <script>dayjs.extend(window.dayjs_plugin_isSameOrBefore)</script>
211
    [% Asset.js("js/catalog.js") | $raw %]
211
    [% Asset.js("js/catalog.js") | $raw %]
212
    [% Asset.js("js/modals/place_booking.js") | $raw %]
212
213
    [% IF Koha.Preference('EnableBooking') %]
214
        [% INCLUDE 'calendar.inc' %]
215
        [% INCLUDE 'select2.inc' %]
216
        [% Asset.js("js/modals/place_booking.js") | $raw %]
217
    [% END %]
218
213
    [% Asset.js("js/browser.js") | $raw %]
219
    [% Asset.js("js/browser.js") | $raw %]
214
    [% IF ( Koha.Preference('CatalogConcerns') ) %]
220
    [% IF ( Koha.Preference('CatalogConcerns') ) %]
215
        <script>
221
        <script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-4 / +10 lines)
Lines 1254-1263 Link Here
1254
[% END %]
1254
[% END %]
1255
1255
1256
[% MACRO jsinclude BLOCK %]
1256
[% MACRO jsinclude BLOCK %]
1257
    [% INCLUDE 'calendar.inc' %]
1258
    [% INCLUDE 'catalog-strings.inc' %]
1257
    [% INCLUDE 'catalog-strings.inc' %]
1259
    [% INCLUDE 'select2.inc' %]
1258
    [% IF Koha.Preference('EnableBooking') %]
1260
    [% INCLUDE 'js-date-format.inc' %]
1259
        [% INCLUDE 'calendar.inc' %]
1260
        [% INCLUDE 'select2.inc' %]
1261
        [% INCLUDE 'js-date-format.inc' %]
1262
    [% END %]
1261
    [% Asset.js("js/catalog.js") | $raw %]
1263
    [% Asset.js("js/catalog.js") | $raw %]
1262
    [% Asset.js("js/recalls.js") | $raw %]
1264
    [% Asset.js("js/recalls.js") | $raw %]
1263
    [% Asset.js("js/coce.js") | $raw %]
1265
    [% Asset.js("js/coce.js") | $raw %]
Lines 1719-1725 Link Here
1719
    [% INCLUDE 'js-patron-format.inc' %]
1721
    [% INCLUDE 'js-patron-format.inc' %]
1720
    [% INCLUDE 'js-biblio-format.inc' %]
1722
    [% INCLUDE 'js-biblio-format.inc' %]
1721
    [% Asset.js("js/browser.js") | $raw %]
1723
    [% Asset.js("js/browser.js") | $raw %]
1722
    [% Asset.js("js/modals/place_booking.js") | $raw %]
1724
1725
    [% IF Koha.Preference('EnableBooking') %]
1726
        [% Asset.js("js/modals/place_booking.js") | $raw %]
1727
    [% END %]
1728
1723
    <script>
1729
    <script>
1724
        var browser;
1730
        var browser;
1725
        browser = KOHA.browser("[% searchid | html %]", parseInt(biblionumber, 10));
1731
        browser = KOHA.browser("[% searchid | html %]", parseInt(biblionumber, 10));
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt (-3 / +9 lines)
Lines 136-145 Link Here
136
    <script>
136
    <script>
137
        dayjs.extend(window.dayjs_plugin_isSameOrBefore);
137
        dayjs.extend(window.dayjs_plugin_isSameOrBefore);
138
    </script>
138
    </script>
139
    [% INCLUDE 'calendar.inc' %]
139
    <script>dayjs.extend(window.dayjs_plugin_isSameOrAfter)</script>
140
    [% INCLUDE 'select2.inc' %]
140
    <script>dayjs.extend(window.dayjs_plugin_isSameOrBefore)</script>
141
    [% Asset.js("js/catalog.js") | $raw %]
141
    [% Asset.js("js/catalog.js") | $raw %]
142
    [% Asset.js("js/modals/place_booking.js") | $raw %]
142
143
    [% IF Koha.Preference('EnableBooking') %]
144
        [% INCLUDE 'calendar.inc' %]
145
        [% INCLUDE 'select2.inc' %]
146
        [% Asset.js("js/modals/place_booking.js") | $raw %]
147
    [% END %]
148
143
    [% IF ( Koha.Preference('CatalogConcerns') ) %]
149
    [% IF ( Koha.Preference('CatalogConcerns') ) %]
144
        <script>
150
        <script>
145
            /* Set a variable needed by add_catalog_concern.js */
151
            /* Set a variable needed by add_catalog_concern.js */
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt (-3 / +9 lines)
Lines 95-105 Link Here
95
    <script>
95
    <script>
96
        dayjs.extend(window.dayjs_plugin_isSameOrBefore);
96
        dayjs.extend(window.dayjs_plugin_isSameOrBefore);
97
    </script>
97
    </script>
98
    [% INCLUDE 'calendar.inc' %]
98
    <script>dayjs.extend(window.dayjs_plugin_isSameOrAfter)</script>
99
    [% INCLUDE 'select2.inc' %]
99
    <script>dayjs.extend(window.dayjs_plugin_isSameOrBefore)</script>
100
    [% Asset.js("js/catalog.js") | $raw %]
100
    [% Asset.js("js/catalog.js") | $raw %]
101
    [% Asset.js("js/modals/place_booking.js") | $raw %]
102
    [% Asset.js("js/browser.js") | $raw %]
101
    [% Asset.js("js/browser.js") | $raw %]
102
103
    [% IF Koha.Preference('EnableBooking') %]
104
        [% INCLUDE 'calendar.inc' %]
105
        [% INCLUDE 'select2.inc' %]
106
    [% Asset.js("js/modals/place_booking.js") | $raw %]
107
    [% END %]
108
103
    [% IF ( Koha.Preference('CatalogConcerns') ) %]
109
    [% IF ( Koha.Preference('CatalogConcerns') ) %]
104
        <script>
110
        <script>
105
            /* Set a variable needed by add_catalog_concern.js */
111
            /* Set a variable needed by add_catalog_concern.js */
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (-35 / +41 lines)
Lines 396-432 Link Here
396
                                        <input type="submit" name="submit" class="btn btn-primary btn-xs" value="Update" />
396
                                        <input type="submit" name="submit" class="btn btn-primary btn-xs" value="Update" />
397
                                    </form>
397
                                    </form>
398
                                </li>
398
                                </li>
399
                                <li class="bookable">
399
                                [% IF Koha.Preference('EnableBooking') %]
400
                                    <span class="label"> Bookable: </span>
400
                                    <li class="bookable">
401
                                    [% IF ( CAN_user_circulate ) %]
401
                                        <span class="label"> Bookable: </span>
402
                                        <form action="updateitem.pl" method="post">
402
                                        [% IF ( CAN_user_circulate ) %]
403
                                            [% INCLUDE 'csrf-token.inc' %]
403
                                            <form action="updateitem.pl" method="post">
404
                                            <input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber | html %]" />
404
                                                [% INCLUDE 'csrf-token.inc' %]
405
                                            <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber | html %]" />
405
                                                <input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber | html %]" />
406
                                            <input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber | html %]" />
406
                                                <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber | html %]" />
407
                                            <select name="bookable">
407
                                                <input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber | html %]" />
408
                                                [% IF ITEM_DAT.bookable == 1 %]
408
                                                <select name="bookable">
409
                                                    <option value="">Follow item type</option>
409
                                                    [% IF ITEM_DAT.bookable == 1 %]
410
                                                    <option value="1" selected="selected">Yes</option>
410
                                                        <option value="">Follow item type</option>
411
                                                    <option value="0">No</option>
411
                                                        <option value="1" selected="selected">Yes</option>
412
                                                [% ELSIF ITEM_DAT.bookable == 0 %]
412
                                                        <option value="0">No</option>
413
                                                    <option value="">Follow item type</option>
413
                                                    [% ELSIF ITEM_DAT.bookable == 0 %]
414
                                                    <option value="1">Yes</option>
414
                                                        <option value="">Follow item type</option>
415
                                                    <option value="0" selected="selected">No</option>
415
                                                        <option value="1">Yes</option>
416
                                                [% ELSE %]
416
                                                        <option value="0" selected="selected">No</option>
417
                                                    <option value="" selected="selected">Follow item type</option>
417
                                                    [% ELSE %]
418
                                                    <option value="1">Yes</option>
418
                                                        <option value="" selected="selected">Follow item type</option>
419
                                                    <option value="0">No</option>
419
                                                        <option value="1">Yes</option>
420
                                                [% END %]
420
                                                        <option value="0">No</option>
421
                                            </select>
421
                                                    [% END %]
422
                                            <input type="hidden" name="op" value="cud-set_bookable" />
422
                                                </select>
423
                                            <input type="submit" name="submit" class="btn btn-primary btn-xs" value="Update" />
423
                                                <input type="hidden" name="op" value="cud-set_bookable" />
424
                                        </form>
424
                                                <input type="submit" name="submit" class="btn btn-primary btn-xs" value="Update" />
425
                                    [% ELSE %]
425
                                            </form>
426
                                        [% IF ITEM_DAT.bookable == 1 %]Yes[% ELSIF ITEM_DAT.bookable == 0 %]No[% ELSE %]Follow item type[% END %]
426
                                        [% ELSE %]
427
                                    [% END %]
427
                                            [% IF ITEM_DAT.bookable == 1 %]Yes[% ELSIF ITEM_DAT.bookable == 0 %]No[% ELSE %]Follow item type[% END %]
428
                                    <span class="hint"> Item type bookable: [% IF ITEM_DAT.effective_itemtype.bookable == 1 %]Yes[% ELSE %]No[% END %]</span>
428
                                        [% END %]
429
                                </li>
429
                                        <span class="hint"> Item type bookable: [% IF ITEM_DAT.effective_itemtype.bookable == 1 %]Yes[% ELSE %]No[% END %]</span>
430
                                    </li>
431
                                [% END %]
430
                            </ol>
432
                            </ol>
431
                            <!-- /.bibliodetails -->
433
                            <!-- /.bibliodetails -->
432
                        </div>
434
                        </div>
Lines 584-595 Link Here
584
        dayjs.extend(window.dayjs_plugin_isSameOrBefore);
586
        dayjs.extend(window.dayjs_plugin_isSameOrBefore);
585
    </script>
587
    </script>
586
    [% INCLUDE 'js-patron-format.inc' %]
588
    [% INCLUDE 'js-patron-format.inc' %]
587
    [% INCLUDE 'calendar.inc' %]
588
    [% INCLUDE 'select2.inc' %]
589
    [% Asset.js("js/catalog.js") | $raw %]
589
    [% Asset.js("js/catalog.js") | $raw %]
590
    [% Asset.js("js/modals/place_booking.js") | $raw %]
591
    [% Asset.js("js/browser.js") | $raw %]
590
    [% Asset.js("js/browser.js") | $raw %]
592
    [% Asset.js("js/checkout_renewals_modal.js") | $raw %]
591
    [% Asset.js("js/checkout_renewals_modal.js") | $raw %]
592
593
    [% IF Koha.Preference('EnableBooking') %]
594
        [% INCLUDE 'calendar.inc' %]
595
        [% INCLUDE 'select2.inc' %]
596
        [% Asset.js("js/modals/place_booking.js") | $raw %]
597
    [% END %]
598
599
593
    [% IF ( Koha.Preference('CatalogConcerns') ) %]
600
    [% IF ( Koha.Preference('CatalogConcerns') ) %]
594
        <script>
601
        <script>
595
            /* Set a variable needed by add_catalog_concern.js */
602
            /* Set a variable needed by add_catalog_concern.js */
596
- 

Return to bug 37661