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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt (-9 / +9 lines)
Lines 85-96 Link Here
85
            function(items, bookings){
85
            function(items, bookings){
86
                var itemsSet = new vis.DataSet([{
86
                var itemsSet = new vis.DataSet([{
87
                    id: 0,
87
                    id: 0,
88
                    content: "Biblio level"
88
                    content: _("Biblio level")
89
                }]);
89
                }]);
90
                for (item of items[0]) {
90
                for (item of items[0]) {
91
                    itemsSet.add({
91
                    itemsSet.add({
92
                        id: item.item_id,
92
                        id: item.item_id,
93
                        content: "Item " + item.external_id,
93
                        content: _("Item") + " " + item.external_id,
94
                    });
94
                    });
95
                }
95
                }
96
96
Lines 201-215 Link Here
201
            ],
201
            ],
202
            "columns": [{
202
            "columns": [{
203
                "data": "booking_id",
203
                "data": "booking_id",
204
                "title": "Booking ID",
204
                "title": _("Booking ID"),
205
                "visible": false
205
                "visible": false
206
            },
206
            },
207
            {
207
            {
208
                "data": "item.external_id",
208
                "data": "item.external_id",
209
                "title": "Item",
209
                "title": _("Item"),
210
                "searchable": true,
210
                "searchable": true,
211
                "orderable": true,
211
                "orderable": true,
212
                "defaultContent": "Any item",
212
                "defaultContent": _("Any item"),
213
                "render": function(data,type,row,meta) {
213
                "render": function(data,type,row,meta) {
214
                    if ( row.item ) {
214
                    if ( row.item ) {
215
                        return row.item.external_id + " (" + row.booking_id + ")";
215
                        return row.item.external_id + " (" + row.booking_id + ")";
Lines 220-226 Link Here
220
            },
220
            },
221
            {
221
            {
222
                "data": "patron.firstname:patron.surname",
222
                "data": "patron.firstname:patron.surname",
223
                "title": "Patron",
223
                "title": _("Patron"),
224
                "searchable": true,
224
                "searchable": true,
225
                "orderable": true,
225
                "orderable": true,
226
                "render": function(data, type, row, meta) {
226
                "render": function(data, type, row, meta) {
Lines 232-238 Link Here
232
            },
232
            },
233
            {
233
            {
234
                "data": "start_date",
234
                "data": "start_date",
235
                "title": "Start date",
235
                "title": _("Start date"),
236
                "searchable": true,
236
                "searchable": true,
237
                "orderable": true,
237
                "orderable": true,
238
                "render": function(data, type, row, meta) {
238
                "render": function(data, type, row, meta) {
Lines 241-247 Link Here
241
            },
241
            },
242
            {
242
            {
243
                "data": "end_date",
243
                "data": "end_date",
244
                "title": "End date",
244
                "title": _("End date"),
245
                "searchable": true,
245
                "searchable": true,
246
                "orderable": true,
246
                "orderable": true,
247
                "render": function(data, type, row, meta) {
247
                "render": function(data, type, row, meta) {
Lines 250-256 Link Here
250
            },
250
            },
251
            {
251
            {
252
                "data": "",
252
                "data": "",
253
                "title": "Actions",
253
                "title": _("Actions"),
254
                "class": "actions",
254
                "class": "actions",
255
                "searchable": false,
255
                "searchable": false,
256
                "orderable": false,
256
                "orderable": false,
(-)a/koha-tmpl/intranet-tmpl/prog/js/cancel_booking_modal.js (-1 / +1 lines)
Lines 28-33 $("#cancelBookingForm").on('submit', function(e) { Link Here
28
    });
28
    });
29
29
30
    deleting.fail(function(data) {
30
    deleting.fail(function(data) {
31
        $('#cancel_booking_result').replaceWith('<div id="booking_result" class="alert alert-danger">Failure</div>');
31
        $('#cancel_booking_result').replaceWith('<div id="booking_result" class="alert alert-danger">'+_("Failure")+'</div>');
32
    });
32
    });
33
});
33
});
(-)a/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js (-7 / +6 lines)
Lines 16-25 $('#placeBookingModal').on('show.bs.modal', function(e) { Link Here
16
    // Get booking id if this is an edit
16
    // Get booking id if this is an edit
17
    booking_id = button.data('booking');
17
    booking_id = button.data('booking');
18
    if (booking_id) {
18
    if (booking_id) {
19
        $('#placeBookingLabel').html('Edit booking');
19
        $('#placeBookingLabel').html(__("Edit booking"));
20
        $('#booking_id').val(booking_id);
20
        $('#booking_id').val(booking_id);
21
    } else {
21
    } else {
22
        $('#placeBookingLabel').html('Place booking');
22
        $('#placeBookingLabel').html(__("Place booking"));
23
        // Ensure we don't accidentally update a booking
23
        // Ensure we don't accidentally update a booking
24
        $('#booking_id').val('');
24
        $('#booking_id').val('');
25
    }
25
    }
Lines 103-109 $('#placeBookingModal').on('show.bs.modal', function(e) { Link Here
103
                escape_str(patron.surname) + ", " + escape_str(patron.firstname)
103
                escape_str(patron.surname) + ", " + escape_str(patron.firstname)
104
            );
104
            );
105
        },
105
        },
106
        placeholder: "Search for a patron"
106
        placeholder: __("Search for a patron")
107
    });
107
    });
108
108
109
    $('#booking_patron_id').on('select2:select', function (e) {
109
    $('#booking_patron_id').on('select2:select', function (e) {
Lines 164-170 $('#placeBookingModal').on('show.bs.modal', function(e) { Link Here
164
                    width: '50%',
164
                    width: '50%',
165
                    dropdownAutoWidth: true,
165
                    dropdownAutoWidth: true,
166
                    minimumResultsForSearch: 20,
166
                    minimumResultsForSearch: 20,
167
                    placeholder: "Select item"
167
                    placeholder: __("Select item")
168
                });
168
                });
169
    
169
    
170
                // Update flatpickr mode
170
                // Update flatpickr mode
Lines 494-500 $("#placeBookingForm").on('submit', function(e) { Link Here
494
        });
494
        });
495
    
495
    
496
        posting.fail(function(data) {
496
        posting.fail(function(data) {
497
            $('#booking_result').replaceWith('<div id="booking_result" class="alert alert-danger">Failure</div>');
497
            $('#booking_result').replaceWith('<div id="booking_result" class="alert alert-danger">'+_("Failure")+'</div>');
498
        });
498
        });
499
    } else {
499
    } else {
500
        url += '/' + booking_id;
500
        url += '/' + booking_id;
Lines 545-551 $("#placeBookingForm").on('submit', function(e) { Link Here
545
        });
545
        });
546
    
546
    
547
        putting.fail(function(data) {
547
        putting.fail(function(data) {
548
            $('#booking_result').replaceWith('<div id="booking_result" class="alert alert-danger">Failure</div>');
548
            $('#booking_result').replaceWith('<div id="booking_result" class="alert alert-danger">'+__("Failure")+'</div>');
549
        });
549
        });
550
    }
550
    }
551
});
551
});
552
- 

Return to bug 35475