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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc (-2 / +1 lines)
Lines 337-344 Link Here
337
337
338
            var items_table = $("#" + tab_id + '_table').kohaTable({
338
            var items_table = $("#" + tab_id + '_table').kohaTable({
339
                ajax: { url: item_table_url },
339
                ajax: { url: item_table_url },
340
                order: [],
340
                                embed,
341
                embed,
342
                autoWidth: false,
341
                autoWidth: false,
343
                bKohaColumnsUseNames: true,
342
                bKohaColumnsUseNames: true,
344
                columns: [
343
                columns: [
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-81 / +81 lines)
Lines 476-484 Link Here
476
                [% SET embed = ['extended_attributes','library'] %]
476
                [% SET embed = ['extended_attributes','library'] %]
477
                let table_node = $("#[% table_id | html %]");
477
                let table_node = $("#[% table_id | html %]");
478
                patrons_table = table_node.kohaTable({
478
                patrons_table = table_node.kohaTable({
479
                    "ajax": {
479
                    ajax: {
480
                        "url": patron_search_url,
480
                        url: patron_search_url,
481
                        "dataSrc": function ( json ) {
481
                        dataSrc: function ( json ) {
482
                            [% IF redirect_if_one_result %]
482
                            [% IF redirect_if_one_result %]
483
                                // redirect if there is only 1 result.
483
                                // redirect if there is only 1 result.
484
                                // Do not redirect if state has been loaded
484
                                // Do not redirect if state has been loaded
Lines 496-502 Link Here
496
                        }
496
                        }
497
                    },
497
                    },
498
                    [% IF open_on_row_click OR preview_on_name_click OR remember_selections %]
498
                    [% IF open_on_row_click OR preview_on_name_click OR remember_selections %]
499
                    "drawCallback": function( settings ) {
499
                    drawCallback: function( settings ) {
500
                        var api = this.api();
500
                        var api = this.api();
501
                        var data = api.data();
501
                        var data = api.data();
502
                        if ( data.length == 0 ) return;
502
                        if ( data.length == 0 ) return;
Lines 520-527 Link Here
520
                        [% END %]
520
                        [% END %]
521
                    },
521
                    },
522
                    [% END %]
522
                    [% END %]
523
                    "deferLoading": defer_loading,
523
                    deferLoading: defer_loading,
524
                    "columns": [
524
                    columns: [
525
                        [% FOR column IN columns %]
525
                        [% FOR column IN columns %]
526
                            [% IF default_sort_column == column %]
526
                            [% IF default_sort_column == column %]
527
                                [% order_column_index = loop.count - 1%]
527
                                [% order_column_index = loop.count - 1%]
Lines 529-547 Link Here
529
                            [% SWITCH column %]
529
                            [% SWITCH column %]
530
                                [% CASE 'checkbox' %]
530
                                [% CASE 'checkbox' %]
531
                                {
531
                                {
532
                                    "data": "patron_id",
532
                                    data: "patron_id",
533
                                    "searchable": false,
533
                                    searchable: false,
534
                                    "orderable": false,
534
                                    orderable: false,
535
                                    "render": function( data, type, row, meta ) {
535
                                    render: function( data, type, row, meta ) {
536
                                        return "<label for='check" + data + "' class='content_hidden'>" + _("Select patron") + "</label><input type='checkbox' class='check" + data + " selection' name='borrowernumber' value='" + data + "' />";
536
                                        return "<label for='check" + data + "' class='content_hidden'>" + _("Select patron") + "</label><input type='checkbox' class='check" + data + " selection' name='borrowernumber' value='" + data + "' />";
537
                                    }
537
                                    }
538
                                }
538
                                }
539
                                [% CASE 'cardnumber' %]
539
                                [% CASE 'cardnumber' %]
540
                                {
540
                                {
541
                                    "data": "cardnumber",
541
                                    data: "cardnumber",
542
                                    "searchable": true,
542
                                    searchable: true,
543
                                    "orderable": true,
543
                                    orderable: true,
544
                                    "render": function( data, type, row, meta ) {
544
                                    render: function( data, type, row, meta ) {
545
                                        let patron_id = encodeURIComponent(row.patron_id);
545
                                        let patron_id = encodeURIComponent(row.patron_id);
546
                                        [% IF !open_on_row_click AND CAN_user_circulate_circulate_remaining_permissions %]
546
                                        [% IF !open_on_row_click AND CAN_user_circulate_circulate_remaining_permissions %]
547
                                            return "<a href=\"/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + patron_id + "\" title=\"[% I18N.t("Check out") | html %]\" class=\"patron_name\" data-borrowernumber=\"" + patron_id + "\" style=\"white-space:nowrap\">" + escape_str(data) + "</a>";
547
                                            return "<a href=\"/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + patron_id + "\" title=\"[% I18N.t("Check out") | html %]\" class=\"patron_name\" data-borrowernumber=\"" + patron_id + "\" style=\"white-space:nowrap\">" + escape_str(data) + "</a>";
Lines 553-572 Link Here
553
                                }
553
                                }
554
                                [% CASE 'dateofbirth' %]
554
                                [% CASE 'dateofbirth' %]
555
                                {
555
                                {
556
                                    "data": "date_of_birth",
556
                                    data: "date_of_birth",
557
                                    "type": "date",
557
                                    type:  "date",
558
                                    "searchable": true,
558
                                    searchable: true,
559
                                    "orderable": true,
559
                                    orderable: true,
560
                                    "render": function( data, type, row, meta ) {
560
                                    render: function( data, type, row, meta ) {
561
                                        return data ? "<span class=\"dateofbirth\">" + escape_str($date(data)) + "<span class=\"agehint\"> (" + _("%s years").format($get_age(data)) + ")</span></span>" : "";
561
                                        return data ? "<span class=\"dateofbirth\">" + escape_str($date(data)) + "<span class=\"agehint\"> (" + _("%s years").format($get_age(data)) + ")</span></span>" : "";
562
                                    }
562
                                    }
563
                                }
563
                                }
564
                                [% CASE 'address' %]
564
                                [% CASE 'address' %]
565
                                {
565
                                {
566
                                    "data": "me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country",
566
                                    data: "me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country",
567
                                    "searchable": true,
567
                                    searchable: true,
568
                                    "orderable": true,
568
                                    orderable: true,
569
                                     "render": function( data, type, row, meta ) {
569
                                     render: function( data, type, row, meta ) {
570
                                        let r = '<div class="address"><ul>';
570
                                        let r = '<div class="address"><ul>';
571
                                        r += $format_address(row, { no_line_break: true, include_li: true });
571
                                        r += $format_address(row, { no_line_break: true, include_li: true });
572
                                        r += '</div></ul>';
572
                                        r += '</div></ul>';
Lines 575-584 Link Here
575
                                }
575
                                }
576
                                [% CASE 'address-library' %]
576
                                [% CASE 'address-library' %]
577
                                {
577
                                {
578
                                    "data": "me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country",
578
                                    data: "me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country",
579
                                    "searchable": true,
579
                                    searchable: true,
580
                                    "orderable": true,
580
                                    orderable: true,
581
                                    "render": function( data, type, row, meta ) {
581
                                    render: function( data, type, row, meta ) {
582
                                        let r = '<div class="address"><ul>';
582
                                        let r = '<div class="address"><ul>';
583
                                        r += $format_address(row, { no_line_break: true, include_li: true });
583
                                        r += $format_address(row, { no_line_break: true, include_li: true });
584
                                        r += '</div></ul>';
584
                                        r += '</div></ul>';
Lines 588-597 Link Here
588
                                }
588
                                }
589
                                [% CASE 'name-address' %]
589
                                [% CASE 'name-address' %]
590
                                {
590
                                {
591
                                    "data": "me.surname:me.preferred_name:me.firstname:me.middle_name:me.othernames:me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country",
591
                                    data: "me.surname:me.preferred_name:me.firstname:me.middle_name:me.othernames:me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country",
592
                                    "searchable": true,
592
                                    searchable: true,
593
                                    "orderable": true,
593
                                    orderable: true,
594
                                    "render": function( data, type, row, meta ) {
594
                                    render: function( data, type, row, meta ) {
595
                                        let patron_id = encodeURIComponent(row.patron_id);
595
                                        let patron_id = encodeURIComponent(row.patron_id);
596
                                        let r = '';
596
                                        let r = '';
597
                                        [% IF ! open_on_row_click %]
597
                                        [% IF ! open_on_row_click %]
Lines 613-622 Link Here
613
                                }
613
                                }
614
                                [% CASE 'name' %]
614
                                [% CASE 'name' %]
615
                                {
615
                                {
616
                                    "data": "me.surname:me.preferred_name:me.firstname:me.middle_name:me.othernames",
616
                                    data: "me.surname:me.preferred_name:me.firstname:me.middle_name:me.othernames",
617
                                    "searchable": true,
617
                                    searchable: true,
618
                                    "orderable": true,
618
                                    orderable: true,
619
                                    "render": function( data, type, row, meta ) {
619
                                    render: function( data, type, row, meta ) {
620
                                        let patron_id = encodeURIComponent(row.patron_id);
620
                                        let patron_id = encodeURIComponent(row.patron_id);
621
                                        [% IF ! open_on_row_click %]
621
                                        [% IF ! open_on_row_click %]
622
                                        return "<a href=\"/cgi-bin/koha/members/moremember.pl?borrowernumber=" + patron_id + "\" class=\"patron_name\" data-borrowernumber=\"" + patron_id + "\" style=\"white-space:nowrap\">" + $patron_to_html(row, { invert_name: 1 }) + "</a>";
622
                                        return "<a href=\"/cgi-bin/koha/members/moremember.pl?borrowernumber=" + patron_id + "\" class=\"patron_name\" data-borrowernumber=\"" + patron_id + "\" style=\"white-space:nowrap\">" + $patron_to_html(row, { invert_name: 1 }) + "</a>";
Lines 627-636 Link Here
627
                                }
627
                                }
628
                                [% CASE 'branch' %]
628
                                [% CASE 'branch' %]
629
                                {
629
                                {
630
                                    "data": "library.name:me.library_id",
630
                                    data: "library.name:me.library_id",
631
                                    "searchable": true,
631
                                    searchable: true,
632
                                    "orderable": true,
632
                                    orderable: true,
633
                                    "render": function( data, type, row, meta ) {
633
                                    render: function( data, type, row, meta ) {
634
                                        if( !singleBranchMode && row.library.library_id == logged_in_library_id ) {
634
                                        if( !singleBranchMode && row.library.library_id == logged_in_library_id ) {
635
                                            return "<span class=\"currentlibrary\">" + escape_str(row.library.name) + "</span>";
635
                                            return "<span class=\"currentlibrary\">" + escape_str(row.library.name) + "</span>";
636
                                        } else {
636
                                        } else {
Lines 640-684 Link Here
640
                                }
640
                                }
641
                                [% CASE 'category' %]
641
                                [% CASE 'category' %]
642
                                {
642
                                {
643
                                    "data": "category_id",
643
                                    data: "category_id",
644
                                    "searchable": true,
644
                                    searchable: true,
645
                                    "orderable": true,
645
                                    orderable: true,
646
                                    "render": function( data, type, row, meta ) {
646
                                    render: function( data, type, row, meta ) {
647
                                        return escape_str(categories_map[data.toLowerCase()].description);
647
                                        return escape_str(categories_map[data.toLowerCase()].description);
648
                                    }
648
                                    }
649
                                }
649
                                }
650
                                [% CASE 'dateexpiry' %]
650
                                [% CASE 'dateexpiry' %]
651
                                {
651
                                {
652
                                    "data": "expiry_date",
652
                                    data: "expiry_date",
653
                                    "type": "date",
653
                                    type:  "date",
654
                                    "searchable": true,
654
                                    searchable: true,
655
                                    "orderable": true,
655
                                    orderable: true,
656
                                    "render": function( data, type, row, meta ) {
656
                                    render: function( data, type, row, meta ) {
657
                                        return "<span class=\"dateexpiry" + (new Date(data) < new Date() ? ' expired' : '') + "\">" + (data ? escape_str($date(data)) : '') + "</span>";
657
                                        return "<span class=\"dateexpiry" + (new Date(data) < new Date() ? ' expired' : '') + "\">" + (data ? escape_str($date(data)) : '') + "</span>";
658
                                    }
658
                                    }
659
                                }
659
                                }
660
                                [% CASE 'borrowernotes' %]
660
                                [% CASE 'borrowernotes' %]
661
                                {
661
                                {
662
                                    "data": "staff_notes",
662
                                    data: "staff_notes",
663
                                    "searchable": true,
663
                                    searchable: true,
664
                                    "orderable": true,
664
                                    orderable: true,
665
                                    [%# We don't escape here, we allow html tag in staff notes %]
665
                                    [%# We don't escape here, we allow html tag in staff notes %]
666
                                }
666
                                }
667
                                [% CASE 'phone' %]
667
                                [% CASE 'phone' %]
668
                                {
668
                                {
669
                                    "data": "phone",
669
                                    data: "phone",
670
                                    "searchable": true,
670
                                    searchable: true,
671
                                    "orderable": true,
671
                                    orderable: true,
672
                                    "render": function( data, type, row, meta ) {
672
                                    render: function( data, type, row, meta ) {
673
                                        return escape_str(data);
673
                                        return escape_str(data);
674
                                    }
674
                                    }
675
                                }
675
                                }
676
                                [% CASE 'checkouts' %][% embed.push('checkouts+count', 'overdues+count') %]
676
                                [% CASE 'checkouts' %][% embed.push('checkouts+count', 'overdues+count') %]
677
                                {
677
                                {
678
                                    "data": "",
678
                                    data: "",
679
                                    "searchable": false,
679
                                    searchable: false,
680
                                    "orderable": false,
680
                                    orderable: false,
681
                                    "render": function( data, type, row, meta ) {
681
                                    render: function( data, type, row, meta ) {
682
                                        if ( row.overdues_count ) {
682
                                        if ( row.overdues_count ) {
683
                                            return "<span class='overdue'><strong>"+row.overdues_count + "</strong></span>" + " / " + row.checkouts_count;
683
                                            return "<span class='overdue'><strong>"+row.overdues_count + "</strong></span>" + " / " + row.checkouts_count;
684
                                        } else {
684
                                        } else {
Lines 688-697 Link Here
688
                                }
688
                                }
689
                                [% CASE 'account_balance' %][% embed.push('account_balance') %]
689
                                [% CASE 'account_balance' %][% embed.push('account_balance') %]
690
                                {
690
                                {
691
                                    "data": "",
691
                                    data: "",
692
                                    "searchable": false,
692
                                    searchable: false,
693
                                    "orderable": false,
693
                                    orderable: false,
694
                                    "render": function( data, type, row, meta ) {
694
                                    render: function( data, type, row, meta ) {
695
                                        let r = "<span style='text-align: right; display: block;'><a href=\"/cgi-bin/koha/members/boraccount.pl?borrowernumber="+row.patron_id+"\">";
695
                                        let r = "<span style='text-align: right; display: block;'><a href=\"/cgi-bin/koha/members/boraccount.pl?borrowernumber="+row.patron_id+"\">";
696
                                        let balance_str = row.account_balance || 0;
696
                                        let balance_str = row.account_balance || 0;
697
                                        balance_str = balance_str.escapeHtml().format_price();
697
                                        balance_str = balance_str.escapeHtml().format_price();
Lines 711-720 Link Here
711
711
712
                                [% CASE 'sort1' %]
712
                                [% CASE 'sort1' %]
713
                                {
713
                                {
714
                                    "data": "statistics_1",
714
                                    data: "statistics_1",
715
                                    "searchable": true,
715
                                    searchable: true,
716
                                    "orderable": true,
716
                                    orderable: true,
717
                                    "render": function( data, type, row, meta ) {
717
                                    render: function( data, type, row, meta ) {
718
                                        if (data === null) return '';
718
                                        if (data === null) return '';
719
                                        let bsort1 = av_bsort1_map[data.toString()];
719
                                        let bsort1 = av_bsort1_map[data.toString()];
720
                                        return escape_str(bsort1 ? bsort1.lib : data);
720
                                        return escape_str(bsort1 ? bsort1.lib : data);
Lines 723-732 Link Here
723
723
724
                                [% CASE 'sort2' %]
724
                                [% CASE 'sort2' %]
725
                                {
725
                                {
726
                                    "data": "statistics_2",
726
                                    data: "statistics_2",
727
                                    "searchable": true,
727
                                    searchable: true,
728
                                    "orderable": true,
728
                                    orderable: true,
729
                                    "render": function( data, type, row, meta ) {
729
                                    render: function( data, type, row, meta ) {
730
                                        if (data === null) return '';
730
                                        if (data === null) return '';
731
                                        let bsort2 = av_bsort2_map[data.toString()];
731
                                        let bsort2 = av_bsort2_map[data.toString()];
732
                                        return escape_str(bsort2 ? bsort2.lib : data);
732
                                        return escape_str(bsort2 ? bsort2.lib : data);
Lines 736-742 Link Here
736
736
737
                                [% CASE 'action' %]
737
                                [% CASE 'action' %]
738
                                {
738
                                {
739
                                    "data": function( row, type, val, meta ) {
739
                                    data: function( row, type, val, meta ) {
740
740
741
                                        let patron_id = encodeURIComponent(row.patron_id);
741
                                        let patron_id = encodeURIComponent(row.patron_id);
742
                                        let action_node = "";
742
                                        let action_node = "";
Lines 764-784 Link Here
764
764
765
                                        return action_node;
765
                                        return action_node;
766
                                    },
766
                                    },
767
                                    "searchable": false,
767
                                    searchable: false,
768
                                    "orderable": false
768
                                    orderable: false
769
                                }
769
                                }
770
                            [% END %]
770
                            [% END %]
771
                            [% UNLESS loop.last %],[% END %]
771
                            [% UNLESS loop.last %],[% END %]
772
                        [% END %]
772
                        [% END %]
773
                    ],
773
                    ],
774
                    'embed': [% To.json(embed) | $raw %],
774
                    embed: [% To.json(embed) | $raw %],
775
                    "order": [[ [% order_column_index | html %], "asc" ]],
775
                    order: [[ [% order_column_index | html %], "asc" ]],
776
                    "autoWidth": false,
776
                    autoWidth: false,
777
                    'lengthMenu': [aLengthMenu, aLengthMenuLabel],
777
                    lengthMenu: [aLengthMenu, aLengthMenuLabel],
778
                    "pagingType": 'full_numbers',
778
                    pagingType: 'full_numbers',
779
                    "pageLength": [% Koha.Preference('PatronsPerPage') | html %],
779
                    pageLength: [% Koha.Preference('PatronsPerPage') | html %],
780
                    [% IF sticky_header %]
780
                    [% IF sticky_header %]
781
                        "initComplete": function(settings, json) {
781
                        initComplete: function(settings, json) {
782
                            $("#[% sticky_header | html %]").show();
782
                            $("#[% sticky_header | html %]").show();
783
                        },
783
                        },
784
                    [% END %]
784
                    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-7 / +7 lines)
Lines 213-219 Link Here
213
            $(document).ready(function() {
213
            $(document).ready(function() {
214
                var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %];
214
                var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %];
215
                var oTable = $("#accounts").kohaTable({
215
                var oTable = $("#accounts").kohaTable({
216
                    "drawCallback": function ( oSettings ) {
216
                    drawCallback: function ( oSettings ) {
217
                        if ( oSettings.aiDisplay.length == 0 )
217
                        if ( oSettings.aiDisplay.length == 0 )
218
                        {
218
                        {
219
                            return;
219
                            return;
Lines 239-255 Link Here
239
                            }
239
                            }
240
                        }
240
                        }
241
                    },
241
                    },
242
                    "footerCallback": function ( row, data, start, end, display ) {
242
                    footerCallback: function ( row, data, start, end, display ) {
243
                        var api = this.api(), data;
243
                        var api = this.api(), data;
244
                        footer_column_sum( api, [ 6, 7, 8, 9 ] );
244
                        footer_column_sum( api, [ 6, 7, 8, 9 ] );
245
                    },
245
                    },
246
                    "columnDefs": [
246
                    columnDefs: [
247
                        { "orderable": false, "targets": ["_all"] }
247
                        { "orderable": false, "targets": ["_all"] }
248
                    ],
248
                    ],
249
                    "ordering": true,
249
                    ordering: true,
250
                    "orderFixed": [[ 1, 'asc' ]],
250
                    orderFixed: [[ 1, 'asc' ]],
251
                    "paginate": false,
251
                    paginate: false,
252
                    "autoWidth": false
252
                    autoWidth: false
253
                }, table_settings );
253
                }, table_settings );
254
                let table_dt = oTable.DataTable();
254
                let table_dt = oTable.DataTable();
255
255
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt (-37 / +37 lines)
Lines 80-116 Link Here
80
            let edi_msgs_table_url = '/api/v1/acquisitions/edifiles?';
80
            let edi_msgs_table_url = '/api/v1/acquisitions/edifiles?';
81
81
82
            var edi_msgs_table = $("#edi_msgs").kohaTable({
82
            var edi_msgs_table = $("#edi_msgs").kohaTable({
83
                "ajax": {
83
                ajax: {
84
                    "url": edi_msgs_table_url
84
                    "url": edi_msgs_table_url
85
                },
85
                },
86
                "embed": [
86
                embed: [
87
                    "vendor",
87
                    "vendor",
88
                    "basket",
88
                    "basket",
89
                    "errors"
89
                    "errors"
90
                ],
90
                ],
91
                "order": [[ 1, "desc" ]],
91
                order: [[ 1, "desc" ]],
92
                "columns": [
92
                columns: [
93
                    {
93
                    {
94
                        "data": "type",
94
                        data: "type",
95
                        "title": _("Type"),
95
                        title: _("Type"),
96
                        "searchable": true,
96
                        searchable: true,
97
                        "orderable": true
97
                        orderable: true
98
                    },
98
                    },
99
                    {
99
                    {
100
                        "data": "transfer_date",
100
                        data: "transfer_date",
101
                        "title": _("Transferred"),
101
                        title: _("Transferred"),
102
                        "searchable": true,
102
                        searchable: true,
103
                        "orderable": true,
103
                        orderable: true,
104
                        "render": function(data, type, row, meta) {
104
                        render: function(data, type, row, meta) {
105
                            return $date(row.transfer_date);
105
                            return $date(row.transfer_date);
106
                        }
106
                        }
107
                    },
107
                    },
108
                    {
108
                    {
109
                        "data": "status",
109
                        data: "status",
110
                        "title": _("Status"),
110
                        title: _("Status"),
111
                        "searchable": true,
111
                        searchable: true,
112
                        "orderable": true,
112
                        orderable: true,
113
                        "render": function(daya, type, row, meta) {
113
                        render: function(daya, type, row, meta) {
114
                            let rendered = '';
114
                            let rendered = '';
115
                            if ( row.errors.length > 0 ) {
115
                            if ( row.errors.length > 0 ) {
116
                                let errorsList = '<ul>';
116
                                let errorsList = '<ul>';
Lines 133-143 Link Here
133
                        }
133
                        }
134
                    },
134
                    },
135
                    {
135
                    {
136
                        "data": "vendor.name",
136
                        data: "vendor.name",
137
                        "title": _("Vendor"),
137
                        title: _("Vendor"),
138
                        "searchable": true,
138
                        searchable: true,
139
                        "orderable": true,
139
                        orderable: true,
140
                        "render": function(data, type, row, meta) {
140
                        render: function(data, type, row, meta) {
141
                            let link;
141
                            let link;
142
                            if ( row.vendor ) {
142
                            if ( row.vendor ) {
143
                               link = '<a href="/cgi-bin/koha/acquisition/vendors/'+row.vendor_id+'">'+row.vendor.name+'</a>';
143
                               link = '<a href="/cgi-bin/koha/acquisition/vendors/'+row.vendor_id+'">'+row.vendor.name+'</a>';
Lines 148-158 Link Here
148
                        }
148
                        }
149
                    },
149
                    },
150
                    {
150
                    {
151
                        "data": "basket_id:type",
151
                        data: "basket_id:type",
152
                        "title": _("Details"),
152
                        title: _("Details"),
153
                        "searchable": false,
153
                        searchable: false,
154
                        "orderable": true,
154
                        orderable: true,
155
                        "render": function(data, type, row, meta) {
155
                        render: function(data, type, row, meta) {
156
                            let rendered = '';
156
                            let rendered = '';
157
                            if ( row.type == 'QUOTE' || row.type == 'ORDERS' ) {
157
                            if ( row.type == 'QUOTE' || row.type == 'ORDERS' ) {
158
                                if ( row.basket_id ) {
158
                                if ( row.basket_id ) {
Lines 165-181 Link Here
165
                        }
165
                        }
166
                    },
166
                    },
167
                    {
167
                    {
168
                        "data": "filename",
168
                        data: "filename",
169
                        "title": _("Filename"),
169
                        title: _("Filename"),
170
                        "searchable": true,
170
                        searchable: true,
171
                        "orderable": true
171
                        orderable: true
172
                    },
172
                    },
173
                    {
173
                    {
174
                        "title": _("Actions"),
174
                        title: _("Actions"),
175
                        "className": "actions",
175
                        className: "actions",
176
                        "searchable": false,
176
                        searchable: false,
177
                        "orderable": false,
177
                        orderable: false,
178
                        "render": function(data, type, row, meta) {
178
                        render: function(data, type, row, meta) {
179
                            var result = '<a class="btn btn-default btn-xs view_message" target="_blank" href="/cgi-bin/koha/acqui/edimsg.pl?id='+encodeURIComponent(row.id)+'"><i class="fa fa-search"></i> '+_("View message")+'</a> ';
179
                            var result = '<a class="btn btn-default btn-xs view_message" target="_blank" href="/cgi-bin/koha/acqui/edimsg.pl?id='+encodeURIComponent(row.id)+'"><i class="fa fa-search"></i> '+_("View message")+'</a> ';
180
                            result += '<form action="/cgi-bin/koha/acqui/edifactmsgs.pl" method="post"><input type="hidden" name="message_id" value="'+encodeURIComponent(row.id)+'" />';
180
                            result += '<form action="/cgi-bin/koha/acqui/edifactmsgs.pl" method="post"><input type="hidden" name="message_id" value="'+encodeURIComponent(row.id)+'" />';
181
                            result += '<input type="hidden" name="csrf_token" value="' + $('meta[name="csrf-token"]').attr('content').trim() + '" />';
181
                            result += '<input type="hidden" name="csrf_token" value="' + $('meta[name="csrf-token"]').attr('content').trim() + '" />';
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt (-4 / +4 lines)
Lines 390-399 Link Here
390
390
391
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
391
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
392
            late_orderst = $("#late_orders").kohaTable({
392
            late_orderst = $("#late_orders").kohaTable({
393
                "sorting": [[ 1, "asc" ]],
393
                order: [[ 1, "asc" ]],
394
                "pagingType": "full",
394
                pagingType: "full",
395
                "autoWidth": false,
395
                autoWidth: false,
396
                "drawCallback": function() {
396
                drawCallback: function() {
397
                    if ( typeof late_orderst != 'undefined' ) {
397
                    if ( typeof late_orderst != 'undefined' ) {
398
                        check_uncheck();
398
                        check_uncheck();
399
                        $('input:checkbox[name=ordernumber]').bind('click', check_uncheck);
399
                        $('input:checkbox[name=ordernumber]').bind('click', check_uncheck);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt (-64 / +64 lines)
Lines 552-579 Link Here
552
            var base_query = { "order_id": {"-in": [[% multiple_orders | html %]]}};
552
            var base_query = { "order_id": {"-in": [[% multiple_orders | html %]]}};
553
            var pending_orders_url = "/api/v1/acquisitions/orders?only_active=1";
553
            var pending_orders_url = "/api/v1/acquisitions/orders?only_active=1";
554
            var options = {
554
            var options = {
555
                "ajax": {
555
                ajax: {
556
                    "url": pending_orders_url + "&q=" + encodeURI(JSON.stringify(base_query))
556
                    "url": pending_orders_url + "&q=" + encodeURI(JSON.stringify(base_query))
557
                },
557
                },
558
                "embed": [
558
                embed: [
559
                    "basket",
559
                    "basket",
560
                    "biblio.suggestions.suggester",
560
                    "biblio.suggestions.suggester",
561
                    "fund.budget",
561
                    "fund.budget",
562
                    "items+strings",
562
                    "items+strings",
563
                    "creator"
563
                    "creator"
564
                ],
564
                ],
565
                'dom': 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
565
                dom: 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
566
                "columns": [
566
                columns: [
567
                    {
567
                    {
568
                        "data": "order_id",
568
                        data: "order_id",
569
                        "searchable": true,
569
                        searchable: true,
570
                        "orderable": true
570
                        orderable: true
571
                    },
571
                    },
572
                    {
572
                    {
573
                        "data": "biblio.title",
573
                        data: "biblio.title",
574
                        "searchable": true,
574
                        searchable: true,
575
                        "orderable": true,
575
                        orderable: true,
576
                        "render": function(data, type, row, meta) {
576
                        render: function(data, type, row, meta) {
577
                            if ( data == null ) {
577
                            if ( data == null ) {
578
                                return "";
578
                                return "";
579
                            }
579
                            }
Lines 583-592 Link Here
583
                        }
583
                        }
584
                    },
584
                    },
585
                    {
585
                    {
586
                        "data": "biblio.author",
586
                        data: "biblio.author",
587
                        "searchable": true,
587
                        searchable: true,
588
                        "orderable": true,
588
                        orderable: true,
589
                        "render": function(data, type, row, meta) {
589
                        render: function(data, type, row, meta) {
590
                            if ( data == null ) {
590
                            if ( data == null ) {
591
                                return "";
591
                                return "";
592
                            }
592
                            }
Lines 596-605 Link Here
596
                        }
596
                        }
597
                    },
597
                    },
598
                    {
598
                    {
599
                        "data": "biblio.isbn",
599
                        data: "biblio.isbn",
600
                        "searchable": true,
600
                        searchable: true,
601
                        "orderable": true,
601
                        orderable: true,
602
                        "render": function(data, type, row, meta) {
602
                        render: function(data, type, row, meta) {
603
                            if ( data == null ) {
603
                            if ( data == null ) {
604
                                return "";
604
                                return "";
605
                            }
605
                            }
Lines 609-647 Link Here
609
                        }
609
                        }
610
                    },
610
                    },
611
                    {
611
                    {
612
                        "searchable": false,
612
                        searchable: false,
613
                        "orderable": false,
613
                        orderable: false,
614
                        "data": function(row, type, val, meta) {
614
                        data: function(row, type, val, meta) {
615
                            return $date(row.date_received||new Date().toISOString());
615
                            return $date(row.date_received||new Date().toISOString());
616
                        }
616
                        }
617
                    },
617
                    },
618
                    {
618
                    {
619
                        "data": "fund.name",
619
                        data: "fund.name",
620
                        "searchable": true,
620
                        searchable: true,
621
                        "orderable": false,
621
                        orderable: false,
622
                        "render": function(data, type, row, meta) {
622
                        render: function(data, type, row, meta) {
623
                            return row.fund.budget.budget_period_description+" - "+row.fund.name;
623
                            return row.fund.budget.budget_period_description+" - "+row.fund.name;
624
                        }
624
                        }
625
                    },
625
                    },
626
                    {
626
                    {
627
                        "searchable": false,
627
                        searchable: false,
628
                        "orderable": true,
628
                        orderable: true,
629
                        "data": "quantity_received",
629
                        data: "quantity_received",
630
                        "render": function(data, type, row, meta) {
630
                        render: function(data, type, row, meta) {
631
                            var data = $("#order_edit").data();
631
                            var data = $("#order_edit").data();
632
                            return QTY_TOTAL.format(row.subscription_id&&(!data.saved||!data.saved.hasOwnProperty(row.order_id))?row.quantity:row.quantity_received, row.quantity);
632
                            return QTY_TOTAL.format(row.subscription_id&&(!data.saved||!data.saved.hasOwnProperty(row.order_id))?row.quantity:row.quantity_received, row.quantity);
633
                        }
633
                        }
634
                    },
634
                    },
635
                    {
635
                    {
636
                        "searchable": false,
636
                        searchable: false,
637
                        "orderable": false,
637
                        orderable: false,
638
                        "render": function(data, type, row, meta) {
638
                        render: function(data, type, row, meta) {
639
                            return '<a class="btn btn-default btn-xs order_edit_toggle" data-bs-toggle="modal" href="#order_edit" data-row="'+meta.row+'" role="button"><i class="fa fa-pencil" aria-hidden="true"></i> '+EDIT+'</a>';
639
                            return '<a class="btn btn-default btn-xs order_edit_toggle" data-bs-toggle="modal" href="#order_edit" data-row="'+meta.row+'" role="button"><i class="fa fa-pencil" aria-hidden="true"></i> '+EDIT+'</a>';
640
                        }
640
                        }
641
                    }
641
                    }
642
                ],
642
                ],
643
                [% IF only_one_order %]
643
                [% IF only_one_order %]
644
                    "drawCallback": function( settings ) {
644
                    drawCallback: function( settings ) {
645
                        $("#order_edit").modal("show");
645
                        $("#order_edit").modal("show");
646
                    },
646
                    },
647
                [% END %]
647
                [% END %]
Lines 1017-1036 Link Here
1017
                var base_query = { "subscription_id": row.subscription_id, "parent_order_id": row.order_id, "order_id": {"!=": row.order_id}};
1017
                var base_query = { "subscription_id": row.subscription_id, "parent_order_id": row.order_id, "order_id": {"!=": row.order_id}};
1018
                var pending_orders_url = "/api/v1/acquisitions/orders";
1018
                var pending_orders_url = "/api/v1/acquisitions/orders";
1019
                var options = {
1019
                var options = {
1020
                    "ajax": {
1020
                    ajax: {
1021
                        "url": pending_orders_url + "?q=" + encodeURI(JSON.stringify(base_query))
1021
                        "url": pending_orders_url + "?q=" + encodeURI(JSON.stringify(base_query))
1022
                    },
1022
                    },
1023
                    "embed": [
1023
                    embed: [
1024
                        "invoice",
1024
                        "invoice",
1025
                        "basket"
1025
                        "basket"
1026
                    ],
1026
                    ],
1027
                    "order": [[1, 'asc']],
1027
                    order: [[1, 'asc']],
1028
                    'dom': 'C<"top pager"ilpfB>tr<"bottom pager"ip>',
1028
                    dom: 'C<"top pager"ilpfB>tr<"bottom pager"ip>',
1029
                    "columns": [
1029
                    columns: [
1030
                        {
1030
                        {
1031
                            "searchable": false,
1031
                            searchable: false,
1032
                            "orderable": false,
1032
                            orderable: false,
1033
                            "data": function(row, type, val, meta) {
1033
                            data: function(row, type, val, meta) {
1034
                                if(row.invoice) {
1034
                                if(row.invoice) {
1035
                                    if(CAN_user_acquisition) {
1035
                                    if(CAN_user_acquisition) {
1036
                                        return '<a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid='+row.invoice_id+'" title="Invoice detail page">'+row.invoice.invoice_number+"</a>";
1036
                                        return '<a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid='+row.invoice_id+'" title="Invoice detail page">'+row.invoice.invoice_number+"</a>";
Lines 1040-1092 Link Here
1040
                            }
1040
                            }
1041
                        },
1041
                        },
1042
                        {
1042
                        {
1043
                            "data": "order_id",
1043
                            data: "order_id",
1044
                            "searchable": false,
1044
                            searchable: false,
1045
                            "orderable": false
1045
                            orderable: false
1046
                        },
1046
                        },
1047
                        {
1047
                        {
1048
                            "searchable": false,
1048
                            searchable: false,
1049
                            "orderable": false,
1049
                            orderable: false,
1050
                            "data": "basket.creation_date",
1050
                            data: "basket.creation_date",
1051
                            "render": function(data, type, row, meta) {
1051
                            render: function(data, type, row, meta) {
1052
                                return $date(row.basket.creation_date);
1052
                                return $date(row.basket.creation_date);
1053
                            }
1053
                            }
1054
                        },
1054
                        },
1055
                        {
1055
                        {
1056
                            "searchable": false,
1056
                            searchable: false,
1057
                            "orderable": false,
1057
                            orderable: false,
1058
                            "data": function(row, type, val, meta) {
1058
                            data: function(row, type, val, meta) {
1059
                                return $date(row.date_received);
1059
                                return $date(row.date_received);
1060
                            }
1060
                            }
1061
                        },
1061
                        },
1062
                        {
1062
                        {
1063
                            "searchable": false,
1063
                            searchable: false,
1064
                            "orderable": false,
1064
                            orderable: false,
1065
                            "data": function(row, type, val, meta) {
1065
                            data: function(row, type, val, meta) {
1066
                                return row.quantity_received;
1066
                                return row.quantity_received;
1067
                            }
1067
                            }
1068
                        },
1068
                        },
1069
                        {
1069
                        {
1070
                            "searchable": false,
1070
                            searchable: false,
1071
                            "orderable": true,
1071
                            orderable: true,
1072
                            "data": function(row, type, val, meta) {
1072
                            data: function(row, type, val, meta) {
1073
                                if(!row.status) return;
1073
                                if(!row.status) return;
1074
                                var first_letter = row.status[0].toUpperCase();
1074
                                var first_letter = row.status[0].toUpperCase();
1075
                                return first_letter+row.status.substr(1).toLowerCase();
1075
                                return first_letter+row.status.substr(1).toLowerCase();
1076
                            }
1076
                            }
1077
                        },
1077
                        },
1078
                        {
1078
                        {
1079
                            "searchable": false,
1079
                            searchable: false,
1080
                            "orderable": false,
1080
                            orderable: false,
1081
                            "data": function(row, type, val, meta) {
1081
                            data: function(row, type, val, meta) {
1082
                                if(!row.date_received) return;
1082
                                if(!row.date_received) return;
1083
                                return Number(row.unit_price_tax_excluded * row.quantity_received).format_price()+' / '+Number(row.unit_price_tax_included * row.quantity_received).format_price()
1083
                                return Number(row.unit_price_tax_excluded * row.quantity_received).format_price()+' / '+Number(row.unit_price_tax_included * row.quantity_received).format_price()
1084
                            }
1084
                            }
1085
                        },
1085
                        },
1086
                        {
1086
                        {
1087
                            "searchable": false,
1087
                            searchable: false,
1088
                            "orderable": false,
1088
                            orderable: false,
1089
                            "data": function(row, type, val, meta) {
1089
                            data: function(row, type, val, meta) {
1090
                                return row.internal_note;
1090
                                return row.internal_note;
1091
                            }
1091
                            }
1092
                        }
1092
                        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt (-42 / +42 lines)
Lines 396-405 Link Here
396
            }
396
            }
397
397
398
            var options = {
398
            var options = {
399
                "ajax": {
399
                ajax: {
400
                    "url": '/api/v1/acquisitions/orders?only_active=1'
400
                    "url": '/api/v1/acquisitions/orders?only_active=1'
401
                },
401
                },
402
                "embed": [
402
                embed: [
403
                    "basket.basket_group",
403
                    "basket.basket_group",
404
                    "biblio.uncancelled_orders+count",
404
                    "biblio.uncancelled_orders+count",
405
                    "biblio.holds+count",
405
                    "biblio.holds+count",
Lines 409-426 Link Here
409
                    "current_item_level_holds+count",
409
                    "current_item_level_holds+count",
410
                    "items"
410
                    "items"
411
                ],
411
                ],
412
                "columns": [
412
                columns: [
413
                    { "data": "basket.name",
413
                    { data: "basket.name",
414
                      "searchable": true,
414
                      searchable: true,
415
                      "orderable": true,
415
                      orderable: true,
416
                      "render": function(data, type, row, meta) {
416
                      render: function(data, type, row, meta) {
417
                        if (type != 'display') return escape_str(data);
417
                        if (type != 'display') return escape_str(data);
418
                        return "<a href=\"/cgi-bin/koha/acqui/basket.pl?basketno=" + encodeURIComponent(row.basket.basket_id) + "\">" + escape_str(data) + " (" + escape_str(row.basket.basket_id) + ")</a>";
418
                        return "<a href=\"/cgi-bin/koha/acqui/basket.pl?basketno=" + encodeURIComponent(row.basket.basket_id) + "\">" + escape_str(data) + " (" + escape_str(row.basket.basket_id) + ")</a>";
419
                      }
419
                      }
420
                    },
420
                    },
421
                    { "data": "basket.basket_group.name",
421
                    { data: "basket.basket_group.name",
422
                      "orderable": true,
422
                      orderable: true,
423
                      "render": function(data, type, row, meta) {
423
                      render: function(data, type, row, meta) {
424
                        if ( type != 'display' ) {
424
                        if ( type != 'display' ) {
425
                            return escape_str(data);
425
                            return escape_str(data);
426
                        }
426
                        }
Lines 436-443 Link Here
436
                      }
436
                      }
437
                    },
437
                    },
438
                    {
438
                    {
439
                        "data": "order_id",
439
                        data: "order_id",
440
                        "render": function(data, type, row, meta) {
440
                        render: function(data, type, row, meta) {
441
                            if (type != 'display') return escape_str(data);
441
                            if (type != 'display') return escape_str(data);
442
                            return "<a href=\"neworderempty.pl?ordernumber="+encodeURIComponent(data)+"&amp;booksellerid="+encodeURIComponent(row.basket.vendor_id)+"\">"+escape_str(data)+"</a>";
442
                            return "<a href=\"neworderempty.pl?ordernumber="+encodeURIComponent(data)+"&amp;booksellerid="+encodeURIComponent(row.basket.vendor_id)+"\">"+escape_str(data)+"</a>";
443
                        }
443
                        }
Lines 445-452 Link Here
445
                    {
445
                    {
446
                        [% SET summary_fields = "biblio.title:biblio.author:biblio.isbn:biblio.publisher:me.internal_note:me.vendor_note" %]
446
                        [% SET summary_fields = "biblio.title:biblio.author:biblio.isbn:biblio.publisher:me.internal_note:me.vendor_note" %]
447
                        [% IF Koha.Preference('marcflavour')=='UNIMARC' %][% SET summary_fields = summary_fields _ ":biblio.ean" %][% END %]
447
                        [% IF Koha.Preference('marcflavour')=='UNIMARC' %][% SET summary_fields = summary_fields _ ":biblio.ean" %][% END %]
448
                        "data": "[% summary_fields | html %]",
448
                        data: "[% summary_fields | html %]",
449
                        "render": function(data, type, row, meta) {
449
                        render: function(data, type, row, meta) {
450
                            var result = '';
450
                            var result = '';
451
                            if ( row && row.biblio_id != null ) {
451
                            if ( row && row.biblio_id != null ) {
452
                                result = "<p><a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber="+encodeURIComponent(row.biblio_id)+"\">"+escape_str(row.biblio.title)+"</a>";
452
                                result = "<p><a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber="+encodeURIComponent(row.biblio_id)+"\">"+escape_str(row.biblio.title)+"</a>";
Lines 520-530 Link Here
520
520
521
                            return result;
521
                            return result;
522
                        },
522
                        },
523
                        "orderable": true,
523
                        orderable: true,
524
                    },
524
                    },
525
                    {
525
                    {
526
                        "data": "",
526
                        data: "",
527
                        "render": function(data, type, row, meta) {
527
                        render: function(data, type, row, meta) {
528
                            var result = '<div class="btn-group dropup">';
528
                            var result = '<div class="btn-group dropup">';
529
529
530
                            result += '<button id="view' + row.order_id + '" type="button" class="btn btn-default btn-xs">' + _("View") + '</button>';
530
                            result += '<button id="view' + row.order_id + '" type="button" class="btn btn-default btn-xs">' + _("View") + '</button>';
Lines 538-592 Link Here
538
                            result += '</div>';
538
                            result += '</div>';
539
                            return result;
539
                            return result;
540
                        },
540
                        },
541
                        "orderable": false,
541
                        orderable: false,
542
                        "searchable": false
542
                        searchable: false
543
                    },
543
                    },
544
                    {
544
                    {
545
                        "data": "replacement_price",
545
                        data: "replacement_price",
546
                        "render": function(data, type, row, meta) {
546
                        render: function(data, type, row, meta) {
547
                            return escape_price(row.replacement_price);
547
                            return escape_price(row.replacement_price);
548
                        },
548
                        },
549
                    },
549
                    },
550
                    {
550
                    {
551
                        "data": "quantity",
551
                        data: "quantity",
552
                        "orderable": true
552
                        orderable: true
553
                    },
553
                    },
554
                    {
554
                    {
555
                        "data": "ecost",
555
                        data: "ecost",
556
                        "render": function(data, type, row, meta) {
556
                        render: function(data, type, row, meta) {
557
                            return escape_price(row.ecost);
557
                            return escape_price(row.ecost);
558
                        },
558
                        },
559
                    },
559
                    },
560
                    {
560
                    {
561
                        "data": "",
561
                        data: "",
562
                        "render": function(data, type, row, meta) {
562
                        render: function(data, type, row, meta) {
563
                            return escape_price(row.quantity * row.ecost);
563
                            return escape_price(row.quantity * row.ecost);
564
                        },
564
                        },
565
                        "orderable": false, // FIXME: How can we do it in DBIC?
565
                        orderable: false, // FIXME: How can we do it in DBIC?
566
                        "searchable": false
566
                        searchable: false
567
                    },
567
                    },
568
                    {
568
                    {
569
                        "data": "fund.name",
569
                        data: "fund.name",
570
                        "render": function(data, type, row, meta) {
570
                        render: function(data, type, row, meta) {
571
                            if (type != 'display') return escape_str(data);
571
                            if (type != 'display') return escape_str(data);
572
                            return escape_str(row.fund.name);
572
                            return escape_str(row.fund.name);
573
                        }
573
                        }
574
                    },
574
                    },
575
                    {
575
                    {
576
                        "data": "",
576
                        data: "",
577
                        "render": function(data, type, row, meta) {
577
                        render: function(data, type, row, meta) {
578
                            return '<a href="orderreceive.pl?multiple_orders='
578
                            return '<a href="orderreceive.pl?multiple_orders='
579
                                    + encodeURIComponent(row.order_id) + '&amp;invoiceid=[% invoiceid | uri %]' + '">'
579
                                    + encodeURIComponent(row.order_id) + '&amp;invoiceid=[% invoiceid | uri %]' + '">'
580
                                    + _("Receive") + '</a><br/>'
580
                                    + _("Receive") + '</a><br/>'
581
                                    + '<a href="#" onclick="transfer_order_popup(' + escape_str(row.order_id) + '); return false;">'
581
                                    + '<a href="#" onclick="transfer_order_popup(' + escape_str(row.order_id) + '); return false;">'
582
                                    + _("Transfer") + '</a>';
582
                                    + _("Transfer") + '</a>';
583
                        },
583
                        },
584
                        "orderable": false,
584
                        orderable: false,
585
                        "searchable": false
585
                        searchable: false
586
                    },
586
                    },
587
                    {
587
                    {
588
                        "data": "",
588
                        data: "",
589
                        "render": function(data, type, row, meta) {
589
                        render: function(data, type, row, meta) {
590
                            var result = "";
590
                            var result = "";
591
591
592
                            if ( row.current_holds_count > 0 ) {
592
                            if ( row.current_holds_count > 0 ) {
Lines 644-651 Link Here
644
644
645
                            return result;
645
                            return result;
646
                        },
646
                        },
647
                        "orderable": false,
647
                        orderable: false,
648
                        "searchable": false
648
                        searchable: false
649
                    }
649
                    }
650
                ]
650
                ]
651
            };
651
            };
Lines 658-668 Link Here
658
            }).html(PENDING_MULTI_SELECTION.format('0'))
658
            }).html(PENDING_MULTI_SELECTION.format('0'))
659
            options.order = [[1, 'asc']];
659
            options.order = [[1, 'asc']];
660
            options.columns.unshift({
660
            options.columns.unshift({
661
                "data": function (row, type, val, meta) {
661
                data: function (row, type, val, meta) {
662
                    return '<input type="checkbox" class="selOrder" />';
662
                    return '<input type="checkbox" class="selOrder" />';
663
                },
663
                },
664
                "searchable": false,
664
                searchable: false,
665
                "orderable": false
665
                orderable: false
666
            });
666
            });
667
667
668
            let table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'parcel', 'pending_orders', 'json' ) | $raw %];
668
            let table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'parcel', 'pending_orders', 'json' ) | $raw %];
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt (-1 / +1 lines)
Lines 272-278 Link Here
272
    <script>
272
    <script>
273
        $(document).ready(function () {
273
        $(document).ready(function () {
274
            $("#parcelst").kohaTable({
274
            $("#parcelst").kohaTable({
275
                paginate: false,
275
                paging: false,
276
            });
276
            });
277
277
278
            //keep a copy of all budgets before removing the inactives
278
            //keep a copy of all budgets before removing the inactives
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt (-8 / +8 lines)
Lines 590-596 Link Here
590
            [% IF closed %]
590
            [% IF closed %]
591
              var oTable = $("#closed_report").kohaTable({
591
              var oTable = $("#closed_report").kohaTable({
592
                // The following is a c/p from aqbudgets.tt and is a candidate for refactoring.
592
                // The following is a c/p from aqbudgets.tt and is a candidate for refactoring.
593
                "drawCallback": function ( oSettings ) {
593
                drawCallback: function ( oSettings ) {
594
                    if ( oSettings.aiDisplay.length == 0 )
594
                    if ( oSettings.aiDisplay.length == 0 )
595
                    {
595
                    {
596
                        return;
596
                        return;
Lines 616-629 Link Here
616
                        }
616
                        }
617
                    }
617
                    }
618
                },
618
                },
619
                "columnDefs": [
619
                columnDefs: [
620
                    { "visible": false, "targets": [ 0, 1 ] },
620
                    { visible: false, targets: [ 0, 1 ] },
621
                    { "orderable": false, "targets": ["_all"] }
621
                    { orderable: false, targets: ["_all"] }
622
                ],
622
                ],
623
                "ordering": true,
623
                ordering: true,
624
                "orderFixed": [[ 1, 'asc' ]],
624
                orderFixed: [[ 1, 'asc' ]],
625
                "autoWidth": false,
625
                autoWidth: false,
626
                "pagingType": "full_numbers"
626
                pagingType: "full_numbers"
627
              });
627
              });
628
            [% END %]
628
            [% END %]
629
            $("#add_modify_budget").validate({
629
            $("#add_modify_budget").validate({
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt (-9 / +9 lines)
Lines 681-687 Link Here
681
            $(document).ready(function() {
681
            $(document).ready(function() {
682
                [% IF budgets %]
682
                [% IF budgets %]
683
                    var oTable = $("#budgeth").kohaTable({
683
                    var oTable = $("#budgeth").kohaTable({
684
                        "drawCallback": function ( oSettings ) {
684
                        drawCallback: function ( oSettings ) {
685
                            if ( oSettings.aiDisplay.length == 0 )
685
                            if ( oSettings.aiDisplay.length == 0 )
686
                            {
686
                            {
687
                                return;
687
                                return;
Lines 707-724 Link Here
707
                                }
707
                                }
708
                            }
708
                            }
709
                        },
709
                        },
710
                        "footerCallback": function ( row, data, start, end, display ) {
710
                        footerCallback: function ( row, data, start, end, display ) {
711
                            var api = this.api(), data;
711
                            var api = this.api(), data;
712
                            footer_column_sum( api, [ 4, 6, 8, 10 ], 2 );
712
                            footer_column_sum( api, [ 4, 6, 8, 10 ], 2 );
713
                        },
713
                        },
714
                        "columnDefs": [
714
                        columnDefs: [
715
                            { "visible": false, "targets": [ 0, 1 ] },
715
                            { visible: false, targets: [ 0, 1 ] },
716
                            { "orderable": false, "targets": ["_all"] }
716
                            { orderable: false, targets: ["_all"] }
717
                        ],
717
                        ],
718
                        "ordering": true,
718
                        ordering: true,
719
                        "orderFixed": [[ 1, 'asc' ]],
719
                        orderFixed: [[ 1, 'asc' ]],
720
                        "paginate": false,
720
                        paging: false,
721
                        "autoWidth": false
721
                        autoWidth: false
722
                    });
722
                    });
723
                    let table_dt = oTable.DataTable();
723
                    let table_dt = oTable.DataTable();
724
724
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt (-1 lines)
Lines 438-444 Link Here
438
    <script>
438
    <script>
439
        $(document).ready(function() {
439
        $(document).ready(function() {
440
            $("#table_authsubfieldstructure").kohaTable({
440
            $("#table_authsubfieldstructure").kohaTable({
441
                aaSorting: [],
442
                paging: false,
441
                paging: false,
443
            });
442
            });
444
443
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt (-33 / +33 lines)
Lines 258-331 Link Here
258
            }
258
            }
259
259
260
            let jobs_table = $("#table_jobs").kohaTable({
260
            let jobs_table = $("#table_jobs").kohaTable({
261
                "ajax": {
261
                ajax: {
262
                    "url": "/api/v1/jobs?" + only_current_filter()
262
                    "url": "/api/v1/jobs?" + only_current_filter()
263
                },
263
                },
264
                "order": [[ 4, "desc" ]],
264
                order: [[ 4, "desc" ]],
265
                "columns": [
265
                columns: [
266
                    {
266
                    {
267
                        "data": "job_id",
267
                        data: "job_id",
268
                        "searchable": true,
268
                        searchable: true,
269
                        "orderable": true
269
                        orderable: true
270
                    },
270
                    },
271
                    {
271
                    {
272
                        "data": "status",
272
                        data: "status",
273
                        "searchable": true,
273
                        searchable: true,
274
                        "orderable": true,
274
                        orderable: true,
275
                        "render": function(data, type, row, meta) {
275
                        render: function(data, type, row, meta) {
276
                            return get_job_status(row.status).escapeHtml();
276
                            return get_job_status(row.status).escapeHtml();
277
                        }
277
                        }
278
                    },
278
                    },
279
                    {
279
                    {
280
                        "data": "progress,size",
280
                        data: "progress,size",
281
                        "searchable": false,
281
                        searchable: false,
282
                        "orderable": true,
282
                        orderable: true,
283
                        "render": function(data, type, row, meta) {
283
                        render: function(data, type, row, meta) {
284
                            return "%s/%s".format(row.progress, row.size).escapeHtml();
284
                            return "%s/%s".format(row.progress, row.size).escapeHtml();
285
                        }
285
                        }
286
                    },
286
                    },
287
                    {
287
                    {
288
                        "data": "type",
288
                        data: "type",
289
                        "searchable": true,
289
                        searchable: true,
290
                        "orderable": true,
290
                        orderable: true,
291
                        "render": function(data, type, row, meta) {
291
                        render: function(data, type, row, meta) {
292
                            return get_job_type(row.type);
292
                            return get_job_type(row.type);
293
                        }
293
                        }
294
                    },
294
                    },
295
                    {
295
                    {
296
                        "data": "enqueued_date",
296
                        data: "enqueued_date",
297
                        "searchable": true,
297
                        searchable: true,
298
                        "orderable": true,
298
                        orderable: true,
299
                        "render": function(data, type, row, meta) {
299
                        render: function(data, type, row, meta) {
300
                            return $datetime(row.enqueued_date);
300
                            return $datetime(row.enqueued_date);
301
                        }
301
                        }
302
                    },
302
                    },
303
                    {
303
                    {
304
                        "data": "started_date",
304
                        data: "started_date",
305
                        "searchable": true,
305
                        searchable: true,
306
                        "orderable": true,
306
                        orderable: true,
307
                        "render": function(data, type, row, meta) {
307
                        render: function(data, type, row, meta) {
308
                            return $datetime(row.started_date);
308
                            return $datetime(row.started_date);
309
                        }
309
                        }
310
                    },
310
                    },
311
                    {
311
                    {
312
                        "data": "ended_date",
312
                        data: "ended_date",
313
                        "searchable": true,
313
                        searchable: true,
314
                        "orderable": true,
314
                        orderable: true,
315
                        "render": function(data, type, row, meta) {
315
                        render: function(data, type, row, meta) {
316
                            return $datetime(row.ended_date);
316
                            return $datetime(row.ended_date);
317
                        }
317
                        }
318
                    },
318
                    },
319
                    {
319
                    {
320
                        "data": function( row, type, val, meta ) {
320
                        data: function( row, type, val, meta ) {
321
                            var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/background_jobs.pl?op=view&amp;id='+ encodeURIComponent(row.job_id) +'"><i class="fa-solid fa-eye aria-hidden="true"></i> '+_("View")+'</a>'+"\n";
321
                            var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/background_jobs.pl?op=view&amp;id='+ encodeURIComponent(row.job_id) +'"><i class="fa-solid fa-eye aria-hidden="true"></i> '+_("View")+'</a>'+"\n";
322
                            if ( row.status == 'new' || row.status == 'started' ) {
322
                            if ( row.status == 'new' || row.status == 'started' ) {
323
                                result += '<a class="btn btn-default btn-xs submit-form-link" role="button" href="#" data-action="/cgi-bin/koha/admin/background_jobs.pl" data-method="post" data-op="cud-cancel" data-confirmation-msg="[% t('Are you sure you want to cancel this job?') | html %]" data-id="'+ encodeURIComponent(row.job_id) +'"><i class="fa fa-trash-can" aria-hidden="true"></i> '+_("Cancel")+'</a>';
323
                                result += '<a class="btn btn-default btn-xs submit-form-link" role="button" href="#" data-action="/cgi-bin/koha/admin/background_jobs.pl" data-method="post" data-op="cud-cancel" data-confirmation-msg="[% t('Are you sure you want to cancel this job?') | html %]" data-id="'+ encodeURIComponent(row.job_id) +'"><i class="fa fa-trash-can" aria-hidden="true"></i> '+_("Cancel")+'</a>';
324
                            }
324
                            }
325
                            return result;
325
                            return result;
326
                        },
326
                        },
327
                        "searchable": false,
327
                        searchable: false,
328
                        "orderable": false
328
                        orderable: false
329
                    }
329
                    }
330
                ]
330
                ]
331
            }, null, 1);
331
            }, null, 1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt (-42 / +42 lines)
Lines 811-824 Link Here
811
811
812
            var libraries_url = '/api/v1/libraries';
812
            var libraries_url = '/api/v1/libraries';
813
            libraries_table = $("#libraries").kohaTable({
813
            libraries_table = $("#libraries").kohaTable({
814
                "ajax": {
814
                ajax: {
815
                    "url": libraries_url
815
                    "url": libraries_url
816
                },
816
                },
817
                'embed': [ 'smtp_server', 'library_hours' ],
817
                embed: [ 'smtp_server', 'library_hours' ],
818
                'emptyTable': '<div class="alert alert-info">'+_("There are no libraries defined.")+' <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">'+_("Start defining libraries")+'</a>.</div>',
818
                emptyTable: '<div class="alert alert-info">'+_("There are no libraries defined.")+' <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">'+_("Start defining libraries")+'</a>.</div>',
819
                "columnDefs": [ {
819
                columnDefs: [ {
820
                    "targets": [1,3,4,5,6],
820
                    targets: [1,3,4,5,6],
821
                    "render": function (data, type, row, meta) {
821
                    render: function (data, type, row, meta) {
822
                        if ( type == 'display' ) {
822
                        if ( type == 'display' ) {
823
                            if ( data != null ) {
823
                            if ( data != null ) {
824
                                return data.escapeHtml();
824
                                return data.escapeHtml();
Lines 830-851 Link Here
830
                        return data;
830
                        return data;
831
                    }
831
                    }
832
                } ],
832
                } ],
833
                "columns": [
833
                columns: [
834
                    {
834
                    {
835
                        "data": "name",
835
                        data: "name",
836
                        "searchable": true,
836
                        searchable: true,
837
                        "orderable": true,
837
                        orderable: true,
838
                        "render": function( data, type, row, meta ) {
838
                        render: function( data, type, row, meta ) {
839
                            return "<a href=\"/cgi-bin/koha/admin/branches.pl?op=view&branchcode=" + encodeURIComponent( row.library_id ) + "\">" + row.name.escapeHtml() + "</a>";
839
                            return "<a href=\"/cgi-bin/koha/admin/branches.pl?op=view&branchcode=" + encodeURIComponent( row.library_id ) + "\">" + row.name.escapeHtml() + "</a>";
840
                        }
840
                        }
841
                    },
841
                    },
842
                    {
842
                    {
843
                        "data": "library_id",
843
                        data: "library_id",
844
                        "searchable": true,
844
                        searchable: true,
845
                        "orderable": true
845
                        orderable: true
846
                    },
846
                    },
847
                    {
847
                    {
848
                        "render": function( data, type, row, meta ) {
848
                        render: function( data, type, row, meta ) {
849
                            const library_info = [];
849
                            const library_info = [];
850
                            if ( row.address1 != null ) library_info.push(row.address1.escapeHtml());
850
                            if ( row.address1 != null ) library_info.push(row.address1.escapeHtml());
851
                            if ( row.address2 != null ) library_info.push(row.address2.escapeHtml());
851
                            if ( row.address2 != null ) library_info.push(row.address2.escapeHtml());
Lines 869-906 Link Here
869
                            if ( row.notes != null ) library_info.push(_("Notes")+': '+row.notes.escapeHtml());
869
                            if ( row.notes != null ) library_info.push(_("Notes")+': '+row.notes.escapeHtml());
870
                            return library_info.join('<br/>');
870
                            return library_info.join('<br/>');
871
                        },
871
                        },
872
                        "searchable": false,
872
                        searchable: false,
873
                        "orderable": false
873
                        orderable: false
874
                    },
874
                    },
875
                    {
875
                    {
876
                        "data": "marc_org_code",
876
                        data: "marc_org_code",
877
                        "searchable": true,
877
                        searchable: true,
878
                        "orderable": true
878
                        orderable: true
879
                    },
879
                    },
880
                    {
880
                    {
881
                        "data": "ip",
881
                        data: "ip",
882
                        "searchable": true,
882
                        searchable: true,
883
                        "orderable": true
883
                        orderable: true
884
                    },
884
                    },
885
                    {
885
                    {
886
                        "data": "pickup_location",
886
                        data: "pickup_location",
887
                        "searchable": true,
887
                        searchable: true,
888
                        "orderable": true,
888
                        orderable: true,
889
                        "render": function( data, type, row, meta ) {
889
                        render: function( data, type, row, meta ) {
890
                            return (data) ? _("Yes") : _("No");
890
                            return (data) ? _("Yes") : _("No");
891
                        }
891
                        }
892
                    },
892
                    },
893
                    {
893
                    {
894
                        "data": "public",
894
                        data: "public",
895
                        "searchable": true,
895
                        searchable: true,
896
                        "orderable": true,
896
                        orderable: true,
897
                        "render": function( data, type, row, meta ) {
897
                        render: function( data, type, row, meta ) {
898
                            return (data) ? _("Yes") : _("No");
898
                            return (data) ? _("Yes") : _("No");
899
                        }
899
                        }
900
                    },
900
                    },
901
                    {
901
                    {
902
                        "data": "smtp_server",
902
                        data: "smtp_server",
903
                        "render": function( data, type, row, meta ) {
903
                        render: function( data, type, row, meta ) {
904
                            if ( data.smtp_server_id ) {
904
                            if ( data.smtp_server_id ) {
905
                                return '<a href="/cgi-bin/koha/admin/smtp_servers.pl?op=edit_form&smtp_server_id='+encodeURIComponent(data.smtp_server_id)+'">'+data.name.escapeHtml()+'</a>';
905
                                return '<a href="/cgi-bin/koha/admin/smtp_servers.pl?op=edit_form&smtp_server_id='+encodeURIComponent(data.smtp_server_id)+'">'+data.name.escapeHtml()+'</a>';
906
                            }
906
                            }
Lines 908-919 Link Here
908
                                return _("Default").escapeHtml();
908
                                return _("Default").escapeHtml();
909
                            }
909
                            }
910
                        },
910
                        },
911
                        "searchable": false,
911
                        searchable: false,
912
                        "visible": true,
912
                        visible: true,
913
                        "orderable": false
913
                        orderable: false
914
                    },
914
                    },
915
                    {
915
                    {
916
                        "data": function( row, type, val, meta ) {
916
                        data: function( row, type, val, meta ) {
917
                            let result = '';
917
                            let result = '';
918
                            let set_hours = 0;
918
                            let set_hours = 0;
919
                            if ( row.library_hours.length > 0 ) {
919
                            if ( row.library_hours.length > 0 ) {
Lines 947-957 Link Here
947
                            }
947
                            }
948
                            return result;
948
                            return result;
949
                        },
949
                        },
950
                        "searchable": false,
950
                        searchable: false,
951
                        "orderable": false
951
                        orderable: false
952
                    },
952
                    },
953
                    {
953
                    {
954
                        "data": function( row, type, val, meta ) {
954
                        data: function( row, type, val, meta ) {
955
955
956
                            var result = '<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?op=add_form&amp;branchcode='+encodeURIComponent(row.library_id)+'" role="button"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>';
956
                            var result = '<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?op=add_form&amp;branchcode='+encodeURIComponent(row.library_id)+'" role="button"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>';
957
                            result += '<form action="/cgi-bin/koha/admin/branches.pl" method="get">';
957
                            result += '<form action="/cgi-bin/koha/admin/branches.pl" method="get">';
Lines 962-969 Link Here
962
                            return result;
962
                            return result;
963
963
964
                        },
964
                        },
965
                        "searchable": false,
965
                        searchable: false,
966
                        "orderable": false
966
                        orderable: false
967
                    },
967
                    },
968
                ]
968
                ]
969
            }, table_settings);
969
            }, table_settings);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt (-24 / +24 lines)
Lines 219-231 Link Here
219
        [% END %]
219
        [% END %]
220
220
221
            var cities_table = $("#table_cities").kohaTable({
221
            var cities_table = $("#table_cities").kohaTable({
222
                "ajax": {
222
                ajax: {
223
                    "url": cities_table_url
223
                    "url": cities_table_url
224
                },
224
                },
225
                "order": [[ 1, "asc" ]],
225
                order: [[ 1, "asc" ]],
226
                "columnDefs": [ {
226
                columnDefs: [ {
227
                    "targets": [0,1,2,3,4],
227
                    targets: [0,1,2,3,4],
228
                    "render": function (data, type, row, meta) {
228
                    render: function (data, type, row, meta) {
229
                        if ( type == 'display' ) {
229
                        if ( type == 'display' ) {
230
                            if ( data != null ) {
230
                            if ( data != null ) {
231
                                return data.escapeHtml();
231
                                return data.escapeHtml();
Lines 236-277 Link Here
236
                        return data;
236
                        return data;
237
                    }
237
                    }
238
                } ],
238
                } ],
239
                "columns": [
239
                columns: [
240
                    {
240
                    {
241
                        "data": "city_id",
241
                        data: "city_id",
242
                        "searchable": true,
242
                        searchable: true,
243
                        "orderable": true
243
                        orderable: true
244
                    },
244
                    },
245
                    {
245
                    {
246
                        "data": "name",
246
                        data: "name",
247
                        "searchable": true,
247
                        searchable: true,
248
                        "orderable": true
248
                        orderable: true
249
                    },
249
                    },
250
                    {
250
                    {
251
                        "data": "state",
251
                        data: "state",
252
                        "searchable": true,
252
                        searchable: true,
253
                        "orderable": true
253
                        orderable: true
254
                    },
254
                    },
255
                    {
255
                    {
256
                        "data": "postal_code",
256
                        data: "postal_code",
257
                        "searchable": true,
257
                        searchable: true,
258
                        "orderable": true
258
                        orderable: true
259
                    },
259
                    },
260
                    {
260
                    {
261
                        "data": "country",
261
                        data: "country",
262
                        "searchable": true,
262
                        searchable: true,
263
                        "orderable": true
263
                        orderable: true
264
                    },
264
                    },
265
                    {
265
                    {
266
                        "data": function( row, type, val, meta ) {
266
                        data: function( row, type, val, meta ) {
267
267
268
                            var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/cities.pl?op=add_form&amp;cityid='+ encodeURIComponent(row.city_id) +'"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'+"\n";
268
                            var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/cities.pl?op=add_form&amp;cityid='+ encodeURIComponent(row.city_id) +'"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'+"\n";
269
                            result += '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/cities.pl?op=delete_confirm&amp;cityid='+ encodeURIComponent(row.city_id) +'"><i class="fa fa-trash-can" aria-hidden="true"></i> '+_("Delete")+'</a>';
269
                            result += '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/cities.pl?op=delete_confirm&amp;cityid='+ encodeURIComponent(row.city_id) +'"><i class="fa fa-trash-can" aria-hidden="true"></i> '+_("Delete")+'</a>';
270
                            return result;
270
                            return result;
271
271
272
                        },
272
                        },
273
                        "searchable": false,
273
                        searchable: false,
274
                        "orderable": false
274
                        orderable: false
275
                    }
275
                    }
276
                ]
276
                ]
277
            }, table_settings, 1);
277
            }, table_settings, 1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_provider_domains.tt (-32 / +32 lines)
Lines 343-357 Link Here
343
            [% END %]
343
            [% END %]
344
            };
344
            };
345
            window.identity_provider_domains = $("#identity_provider_domains").kohaTable({
345
            window.identity_provider_domains = $("#identity_provider_domains").kohaTable({
346
                "ajax": {
346
                ajax: {
347
                    "url": identity_provider_domains_url
347
                    "url": identity_provider_domains_url
348
                },
348
                },
349
                'language': {
349
                language: {
350
                    'emptyTable': '<div class="alert alert-info">'+_("There are no identity provider domains defined.")+'</div>'
350
                    emptyTable: '<div class="alert alert-info">'+_("There are no identity provider domains defined.")+'</div>'
351
                },
351
                },
352
                "columnDefs": [ {
352
                columnDefs: [ {
353
                    "targets": [1],
353
                    targets: [1],
354
                    "render": function (data, type, row, meta) {
354
                    render: function (data, type, row, meta) {
355
                        if ( type == 'display' ) {
355
                        if ( type == 'display' ) {
356
                            if ( data != null ) {
356
                            if ( data != null ) {
357
                                return data.escapeHtml();
357
                                return data.escapeHtml();
Lines 363-374 Link Here
363
                        return data;
363
                        return data;
364
                    }
364
                    }
365
                } ],
365
                } ],
366
                "columns": [
366
                columns: [
367
                    {
367
                    {
368
                        "data": "domain",
368
                        data: "domain",
369
                        "searchable": true,
369
                        searchable: true,
370
                        "orderable": true,
370
                        orderable: true,
371
                        "render": function(data, type, row, meta) {
371
                        render: function(data, type, row, meta) {
372
                            if ( data != null ) {
372
                            if ( data != null ) {
373
                                return data.escapeHtml();
373
                                return data.escapeHtml();
374
                            }
374
                            }
Lines 378-448 Link Here
378
                        }
378
                        }
379
                    },
379
                    },
380
                    {
380
                    {
381
                        "data": function( row, type, val, meta ) {
381
                        data: function( row, type, val, meta ) {
382
                            if (row.update_on_auth) {
382
                            if (row.update_on_auth) {
383
                                return _("Yes");
383
                                return _("Yes");
384
                            } else {
384
                            } else {
385
                                return _("No");
385
                                return _("No");
386
                            }
386
                            }
387
                        },
387
                        },
388
                        "searchable": true,
388
                        searchable: true,
389
                        "orderable": true
389
                        orderable: true
390
                    },
390
                    },
391
                    {
391
                    {
392
                        "data": function( row, type, val, meta ) {
392
                        data: function( row, type, val, meta ) {
393
                            if (row.auto_register) {
393
                            if (row.auto_register) {
394
                                return _("Yes");
394
                                return _("Yes");
395
                            } else {
395
                            } else {
396
                                return _("No");
396
                                return _("No");
397
                            }
397
                            }
398
                        },
398
                        },
399
                        "searchable": true,
399
                        searchable: true,
400
                        "orderable": true
400
                        orderable: true
401
                    },
401
                    },
402
                    {
402
                    {
403
                        "data": function( row, type, val, meta ) {
403
                        data: function( row, type, val, meta ) {
404
                            return libraries[row.default_library_id] || "";
404
                            return libraries[row.default_library_id] || "";
405
                        },
405
                        },
406
                        "searchable": true,
406
                        searchable: true,
407
                        "orderable": true
407
                        orderable: true
408
                    },
408
                    },
409
                    {
409
                    {
410
                        "data": function( row, type, val, meta ) {
410
                        data: function( row, type, val, meta ) {
411
                            return categories[row.default_category_id] || "";
411
                            return categories[row.default_category_id] || "";
412
                        },
412
                        },
413
                        "searchable": true,
413
                        searchable: true,
414
                        "orderable": true
414
                        orderable: true
415
                    },
415
                    },
416
                    {
416
                    {
417
                        "data": function( row, type, val, meta ) {
417
                        data: function( row, type, val, meta ) {
418
                            if (row.allow_opac) {
418
                            if (row.allow_opac) {
419
                                return _("Yes");
419
                                return _("Yes");
420
                            } else {
420
                            } else {
421
                                return _("No");
421
                                return _("No");
422
                            }
422
                            }
423
                        },
423
                        },
424
                        "searchable": true,
424
                        searchable: true,
425
                        "orderable": true
425
                        orderable: true
426
                    },
426
                    },
427
                    {
427
                    {
428
                        "data": function( row, type, val, meta ) {
428
                        data: function( row, type, val, meta ) {
429
                            if (row.allow_staff) {
429
                            if (row.allow_staff) {
430
                                return _("Yes");
430
                                return _("Yes");
431
                            } else {
431
                            } else {
432
                                return _("No");
432
                                return _("No");
433
                            }
433
                            }
434
                        },
434
                        },
435
                        "searchable": true,
435
                        searchable: true,
436
                        "orderable": true
436
                        orderable: true
437
                    },
437
                    },
438
                    {
438
                    {
439
                        "data": function( row, type, val, meta ) {
439
                        data: function( row, type, val, meta ) {
440
                            var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/identity_providers.pl?domain_ops=1&amp;identity_provider_id=[%- identity_provider_id | html -%]&amp;op=edit_form&amp;identity_provider_domain_id='+ encodeURIComponent(row.identity_provider_domain_id) +'"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'+"\n";
440
                            var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/identity_providers.pl?domain_ops=1&amp;identity_provider_id=[%- identity_provider_id | html -%]&amp;op=edit_form&amp;identity_provider_domain_id='+ encodeURIComponent(row.identity_provider_domain_id) +'"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'+"\n";
441
                            result += '<a class="btn btn-default btn-xs delete_identity_provider_domain" role="button" href="#" data-bs-toggle="modal" data-bs-target="#delete_confirm_modal" data-auth-provider-domain-id="'+ encodeURIComponent(row.identity_provider_domain_id) +'" data-auth-provider-domain="'+ encodeURIComponent((row.domain || '').escapeHtml()) +'"><i class="fa fa-trash-can" aria-hidden="true"></i> '+_("Delete")+'</a>';
441
                            result += '<a class="btn btn-default btn-xs delete_identity_provider_domain" role="button" href="#" data-bs-toggle="modal" data-bs-target="#delete_confirm_modal" data-auth-provider-domain-id="'+ encodeURIComponent(row.identity_provider_domain_id) +'" data-auth-provider-domain="'+ encodeURIComponent((row.domain || '').escapeHtml()) +'"><i class="fa fa-trash-can" aria-hidden="true"></i> '+_("Delete")+'</a>';
442
                            return result;
442
                            return result;
443
                        },
443
                        },
444
                        "searchable": false,
444
                        searchable: false,
445
                        "orderable": false
445
                        orderable: false
446
                    }
446
                    }
447
                ],
447
                ],
448
                createdRow: function (row, data, dataIndex) {
448
                createdRow: function (row, data, dataIndex) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt (-11 / +11 lines)
Lines 394-413 Link Here
394
            }
394
            }
395
395
396
            $('#marc-overlay-rules').kohaTable({
396
            $('#marc-overlay-rules').kohaTable({
397
                "columns": [
397
                columns: [
398
                    {"searchable":  false, "orderable": false},
398
                    {searchable:  false, orderable: false},
399
                    {"orderDataType": "dom-input"},
399
                    {"orderDataType": "dom-input"},
400
                    {"orderDataType": "dom-input"},
400
                    {"orderDataType": "dom-input"},
401
                    {"searchable":  false, "orderDataType": "dom-input"},
401
                    {searchable:  false, "orderDataType": "dom-input"},
402
                    {"searchable":  false, "orderDataType": "dom-input"},
402
                    {searchable:  false, "orderDataType": "dom-input"},
403
                    {"searchable":  false, "orderDataType": "dom-input"},
403
                    {searchable:  false, "orderDataType": "dom-input"},
404
                    {"searchable":  false, "orderDataType": "dom-input"},
404
                    {searchable:  false, "orderDataType": "dom-input"},
405
                    {"searchable":  false, "orderDataType": "dom-input"},
405
                    {searchable:  false, "orderDataType": "dom-input"},
406
                    {"searchable":  false, "orderDataType": "dom-input"},
406
                    {searchable:  false, "orderDataType": "dom-input"},
407
                    {"searchable":  false, "orderable": false},
407
                    {searchable:  false, orderable: false},
408
                    {"searchable":  false, "orderable": false}
408
                    {searchable:  false, orderable: false}
409
                ],
409
                ],
410
                "pagingType": "simple"
410
                pagingType: "simple"
411
            });
411
            });
412
412
413
            var overlay_rules_presets = {};
413
            var overlay_rules_presets = {};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt (-34 / +34 lines)
Lines 324-338 Link Here
324
324
325
            var smtp_servers_url = '/api/v1/config/smtp_servers';
325
            var smtp_servers_url = '/api/v1/config/smtp_servers';
326
            window.smtp_servers = $("#smtp_servers").kohaTable({
326
            window.smtp_servers = $("#smtp_servers").kohaTable({
327
                "ajax": {
327
                ajax: {
328
                    "url": smtp_servers_url
328
                    "url": smtp_servers_url
329
                },
329
                },
330
                'language': {
330
                'language': {
331
                    'emptyTable': '<div class="alert alert-info">'+_("There are no SMTP servers defined.")+'</div>'
331
                    emptyTable: '<div class="alert alert-info">'+_("There are no SMTP servers defined.")+'</div>'
332
                },
332
                },
333
                "columnDefs": [ {
333
                columnDefs: [ {
334
                    "targets": [0,1],
334
                    targets: [0,1],
335
                    "render": function (data, type, row, meta) {
335
                    render: function (data, type, row, meta) {
336
                        if ( type == 'display' ) {
336
                        if ( type == 'display' ) {
337
                            if ( data != null ) {
337
                            if ( data != null ) {
338
                                return data.escapeHtml();
338
                                return data.escapeHtml();
Lines 344-373 Link Here
344
                        return data;
344
                        return data;
345
                    }
345
                    }
346
                } ],
346
                } ],
347
                "columns": [
347
                columns: [
348
                    {
348
                    {
349
                        "data": "name",
349
                        data: "name",
350
                        "searchable": true,
350
                        searchable: true,
351
                        "orderable": true
351
                        orderable: true
352
                    },
352
                    },
353
                    {
353
                    {
354
                        "data": "host",
354
                        data: "host",
355
                        "searchable": true,
355
                        searchable: true,
356
                        "orderable": true
356
                        orderable: true
357
                    },
357
                    },
358
                    {
358
                    {
359
                        "data": "port",
359
                        data: "port",
360
                        "searchable": true,
360
                        searchable: true,
361
                        "orderable": false
361
                        orderable: false
362
                    },
362
                    },
363
                    {
363
                    {
364
                        "data": "timeout",
364
                        data: "timeout",
365
                        "searchable": true,
365
                        searchable: true,
366
                        "orderable": false
366
                        orderable: false
367
                    },
367
                    },
368
                    {
368
                    {
369
                        "data": "ssl_mode",
369
                        data: "ssl_mode",
370
                        "render": function (data, type, row, meta) {
370
                        render: function (data, type, row, meta) {
371
                            if (data == 'disabled') {
371
                            if (data == 'disabled') {
372
                                return _("Disabled");
372
                                return _("Disabled");
373
                            }
373
                            }
Lines 378-388 Link Here
378
                                return _("STARTTLS");
378
                                return _("STARTTLS");
379
                            }
379
                            }
380
                        },
380
                        },
381
                        "searchable": false,
381
                        searchable: false,
382
                        "orderable": false
382
                        orderable: false
383
                    },
383
                    },
384
                    {
384
                    {
385
                        "data": function( row, type, val, meta ) {
385
                        data: function( row, type, val, meta ) {
386
                            if ( row.user_name != null ) {
386
                            if ( row.user_name != null ) {
387
                                return _("Yes");
387
                                return _("Yes");
388
                            }
388
                            }
Lines 390-400 Link Here
390
                                return _("No");
390
                                return _("No");
391
                            }
391
                            }
392
                        },
392
                        },
393
                        "searchable": false,
393
                        searchable: false,
394
                        "orderable": false
394
                        orderable: false
395
                    },
395
                    },
396
                    {
396
                    {
397
                        "data": function( row, type, val, meta ) {
397
                        data: function( row, type, val, meta ) {
398
                            if ( row.debug ) {
398
                            if ( row.debug ) {
399
                                let result = '<span class="badge text-bg-warning">' + "[% tp("Active", "On") | html %]" + '</span>';
399
                                let result = '<span class="badge text-bg-warning">' + "[% tp("Active", "On") | html %]" + '</span>';
400
                                return result;
400
                                return result;
Lines 403-413 Link Here
403
                                return _("");
403
                                return _("");
404
                            }
404
                            }
405
                        },
405
                        },
406
                        "searchable": false,
406
                        searchable: false,
407
                        "orderable": false
407
                        orderable: false
408
                    },
408
                    },
409
                    {
409
                    {
410
                        "data": function( row, type, val, meta ) {
410
                        data: function( row, type, val, meta ) {
411
                            if ( row.is_default ) {
411
                            if ( row.is_default ) {
412
                                let result = '<span class="badge text-bg-success">' + _("Default") + '</span>';
412
                                let result = '<span class="badge text-bg-success">' + _("Default") + '</span>';
413
                                return result;
413
                                return result;
Lines 415-431 Link Here
415
                                return "";
415
                                return "";
416
                            }
416
                            }
417
                        },
417
                        },
418
                        "searchable": false,
418
                        searchable: false,
419
                        "orderable": false
419
                        orderable: false
420
                    },
420
                    },
421
                    {
421
                    {
422
                        "data": function( row, type, val, meta ) {
422
                        data: function( row, type, val, meta ) {
423
                            var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/smtp_servers.pl?op=edit_form&amp;smtp_server_id='+ encodeURIComponent(row.smtp_server_id) +'"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'+"\n";
423
                            var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/admin/smtp_servers.pl?op=edit_form&amp;smtp_server_id='+ encodeURIComponent(row.smtp_server_id) +'"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'+"\n";
424
                            result += '<a class="btn btn-default btn-xs delete_server" role="button" href="#" data-bs-toggle="modal" data-bs-target="#delete_confirm_modal" data-smtp-server-id="'+ encodeURIComponent(row.smtp_server_id) +'" data-smtp-server-name="'+ encodeURIComponent(row.name.escapeHtml()) +'"><i class="fa fa-trash-can" aria-hidden="true"></i> '+_("Delete")+'</a>';
424
                            result += '<a class="btn btn-default btn-xs delete_server" role="button" href="#" data-bs-toggle="modal" data-bs-target="#delete_confirm_modal" data-smtp-server-id="'+ encodeURIComponent(row.smtp_server_id) +'" data-smtp-server-name="'+ encodeURIComponent(row.name.escapeHtml()) +'"><i class="fa fa-trash-can" aria-hidden="true"></i> '+_("Delete")+'</a>';
425
                            return result;
425
                            return result;
426
                        },
426
                        },
427
                        "searchable": false,
427
                        searchable: false,
428
                        "orderable": false
428
                        orderable: false
429
                    }
429
                    }
430
                ],
430
                ],
431
            });
431
            });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt (-38 / +38 lines)
Lines 240-257 Link Here
240
240
241
            var bookings_table_url = "/api/v1/biblios/%s/bookings".format(biblionumber);
241
            var bookings_table_url = "/api/v1/biblios/%s/bookings".format(biblionumber);
242
            bookings_table = $('#bookings_table').kohaTable({
242
            bookings_table = $('#bookings_table').kohaTable({
243
                "ajax": {
243
                ajax: {
244
                    "url": bookings_table_url
244
                    "url": bookings_table_url
245
                },
245
                },
246
                "embed": [
246
                embed: [
247
                    "item",
247
                    "item",
248
                    "patron",
248
                    "patron",
249
                    "pickup_library"
249
                    "pickup_library"
250
                ],
250
                ],
251
                "columns": [{
251
                columns: [{
252
                    "data": "booking_id",
252
                    data: "booking_id",
253
                    "title": _("Booking ID"),
253
                    title: _("Booking ID"),
254
                    "visible": false
254
                    visible: false
255
                },
255
                },
256
                {
256
                {
257
                    data: "",
257
                    data: "",
Lines 314-325 Link Here
314
                    }
314
                    }
315
                },
315
                },
316
                {
316
                {
317
                    "data": "item.external_id",
317
                    data: "item.external_id",
318
                    "title": _("Item"),
318
                    title: _("Item"),
319
                    "searchable": true,
319
                    searchable: true,
320
                    "orderable": true,
320
                    orderable: true,
321
                    "defaultContent": _("Any item"),
321
                    defaultContent: _("Any item"),
322
                    "render": function(data,type,row,meta) {
322
                    render: function(data,type,row,meta) {
323
                        if ( row.item ) {
323
                        if ( row.item ) {
324
                            return row.item.external_id + " (" + row.booking_id + ")";
324
                            return row.item.external_id + " (" + row.booking_id + ")";
325
                        } else {
325
                        } else {
Lines 328-338 Link Here
328
                    }
328
                    }
329
                },
329
                },
330
                {
330
                {
331
                    "data": "patron.firstname:patron.surname",
331
                    data: "patron.firstname:patron.surname",
332
                    "title": _("Patron"),
332
                    title: _("Patron"),
333
                    "searchable": true,
333
                    searchable: true,
334
                    "orderable": true,
334
                    orderable: true,
335
                    "render": function(data, type, row, meta) {
335
                    render: function(data, type, row, meta) {
336
                        return $patron_to_html(row.patron, {
336
                        return $patron_to_html(row.patron, {
337
                            display_cardnumber: true,
337
                            display_cardnumber: true,
338
                            url: true
338
                            url: true
Lines 340-378 Link Here
340
                    }
340
                    }
341
                },
341
                },
342
                {
342
                {
343
                    "data": "pickup_library.name",
343
                    data: "pickup_library.name",
344
                    "title": _("Pickup library"),
344
                    title: _("Pickup library"),
345
                    "searchable": true,
345
                    searchable: true,
346
                    "orderable": true,
346
                    orderable: true,
347
                    "render": function(data, type, row, meta) {
347
                    render: function(data, type, row, meta) {
348
                        return row.pickup_library.name;
348
                        return row.pickup_library.name;
349
                    }
349
                    }
350
                },
350
                },
351
                {
351
                {
352
                    "data": "start_date",
352
                    data: "start_date",
353
                    "title": _("Start date"),
353
                    title: _("Start date"),
354
                    "searchable": true,
354
                    searchable: true,
355
                    "orderable": true,
355
                    orderable: true,
356
                    "render": function(data, type, row, meta) {
356
                    render: function(data, type, row, meta) {
357
                        return $date(row.start_date);
357
                        return $date(row.start_date);
358
                    }
358
                    }
359
                },
359
                },
360
                {
360
                {
361
                    "data": "end_date",
361
                    data: "end_date",
362
                    "title": _("End date"),
362
                    title: _("End date"),
363
                    "searchable": true,
363
                    searchable: true,
364
                    "orderable": true,
364
                    orderable: true,
365
                    "render": function(data, type, row, meta) {
365
                    render: function(data, type, row, meta) {
366
                        return $date(row.end_date);
366
                        return $date(row.end_date);
367
                    }
367
                    }
368
                },
368
                },
369
                {
369
                {
370
                    "data": "",
370
                    data: "",
371
                    "title": _("Actions"),
371
                    title: _("Actions"),
372
                    "class": "actions",
372
                    class:"actions",
373
                    "searchable": false,
373
                    searchable: false,
374
                    "orderable": false,
374
                    orderable: false,
375
                    "render": function(data, type, row, meta) {
375
                    render: function(data, type, row, meta) {
376
                        let result = "";
376
                        let result = "";
377
                        let is_cancelled = row.status === "cancelled";
377
                        let is_cancelled = row.status === "cancelled";
378
                        [% IF CAN_user_circulate_manage_bookings %]
378
                        [% IF CAN_user_circulate_manage_bookings %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-64 / +64 lines)
Lines 1290-1299 Link Here
1290
1290
1291
                var tickets_url = '/api/v1/tickets';
1291
                var tickets_url = '/api/v1/tickets';
1292
                var tickets = $("#table_concerns").kohaTable({
1292
                var tickets = $("#table_concerns").kohaTable({
1293
                    "ajax": {
1293
                    ajax: {
1294
                        "url": tickets_url
1294
                        "url": tickets_url
1295
                    },
1295
                    },
1296
                    "embed": [
1296
                    embed: [
1297
                        "assignee",
1297
                        "assignee",
1298
                        "reporter",
1298
                        "reporter",
1299
                        "resolver",
1299
                        "resolver",
Lines 1301-1310 Link Here
1301
                        "updates+count",
1301
                        "updates+count",
1302
                        "+strings"
1302
                        "+strings"
1303
                    ],
1303
                    ],
1304
                    'emptyTable': '<div class="alert alert-info">' + _("Congratulations, there are no catalog concerns.") + '</div>',
1304
                    emptyTable: '<div class="alert alert-info">' + _("Congratulations, there are no catalog concerns.") + '</div>',
1305
                    "columnDefs": [ {
1305
                    columnDefs: [ {
1306
                        "targets": [0,1,2,3],
1306
                        targets: [0,1,2,3],
1307
                        "render": function (data, type, row, meta) {
1307
                        render: function (data, type, row, meta) {
1308
                            if ( type == 'display' ) {
1308
                            if ( type == 'display' ) {
1309
                                if ( data != null ) {
1309
                                if ( data != null ) {
1310
                                    return data.escapeHtml();
1310
                                    return data.escapeHtml();
Lines 1316-1325 Link Here
1316
                            return data;
1316
                            return data;
1317
                        }
1317
                        }
1318
                    } ],
1318
                    } ],
1319
                    "columns": [
1319
                    columns: [
1320
                        {
1320
                        {
1321
                            "data": "reported_date:reporter.firstname",
1321
                            data: "reported_date:reporter.firstname",
1322
                            "render": function(data, type, row, meta) {
1322
                            render: function(data, type, row, meta) {
1323
                                let reported = '<div class="d-flex justify-content-between align-items-start">';
1323
                                let reported = '<div class="d-flex justify-content-between align-items-start">';
1324
                                reported += '<span class="reporter">' + $patron_to_html(row.reporter, {
1324
                                reported += '<span class="reporter">' + $patron_to_html(row.reporter, {
1325
                                    display_cardnumber: false,
1325
                                    display_cardnumber: false,
Lines 1329-1340 Link Here
1329
                                reported += '</div>';
1329
                                reported += '</div>';
1330
                                return reported;
1330
                                return reported;
1331
                            },
1331
                            },
1332
                            "searchable": true,
1332
                            searchable: true,
1333
                            "orderable": true
1333
                            orderable: true
1334
                        },
1334
                        },
1335
                        {
1335
                        {
1336
                            "data": "title:body",
1336
                            data: "title:body",
1337
                            "render": function(data, type, row, meta) {
1337
                            render: function(data, type, row, meta) {
1338
                                let result = '<div class="d-flex justify-content-between align-items-start">';
1338
                                let result = '<div class="d-flex justify-content-between align-items-start">';
1339
1339
1340
                                // Title link on the left
1340
                                // Title link on the left
Lines 1351-1372 Link Here
1351
1351
1352
                                return result;
1352
                                return result;
1353
                            },
1353
                            },
1354
                            "searchable": true,
1354
                            searchable: true,
1355
                            "orderable": true
1355
                            orderable: true
1356
                        },
1356
                        },
1357
                        {
1357
                        {
1358
                            "data": "biblio.title",
1358
                            data: "biblio.title",
1359
                            "render": function(data, type, row, meta) {
1359
                            render: function(data, type, row, meta) {
1360
                                return $biblio_to_html(row.biblio, {
1360
                                return $biblio_to_html(row.biblio, {
1361
                                    link: 1
1361
                                    link: 1
1362
                                });
1362
                                });
1363
                            },
1363
                            },
1364
                            "searchable": true,
1364
                            searchable: true,
1365
                            "orderable": true
1365
                            orderable: true
1366
                        },
1366
                        },
1367
                        {
1367
                        {
1368
                            "data": "assignee.firstname:assignee.surname:resolver.firstname:resolver.surname:resolved_date:status",
1368
                            data: "assignee.firstname:assignee.surname:resolver.firstname:resolver.surname:resolved_date:status",
1369
                            "render": function(data, type, row, meta) {
1369
                            render: function(data, type, row, meta) {
1370
                                let result = '';
1370
                                let result = '';
1371
                                if (row.resolved_date) {
1371
                                if (row.resolved_date) {
1372
                                    result += "<div>";
1372
                                    result += "<div>";
Lines 1401-1417 Link Here
1401
                                }
1401
                                }
1402
                                return result;
1402
                                return result;
1403
                            },
1403
                            },
1404
                            "searchable": true,
1404
                            searchable: true,
1405
                            "orderable": true
1405
                            orderable: true
1406
                        },
1406
                        },
1407
                        {
1407
                        {
1408
                            "data": function(row, type, val, meta) {
1408
                            data: function(row, type, val, meta) {
1409
                                let resolved = ( row.resolved_date ) ? true : false;
1409
                                let resolved = ( row.resolved_date ) ? true : false;
1410
                                let result = '<a class="btn btn-default btn-xs main-trigger" role="button" href="#" data-bs-toggle="modal" data-bs-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="' + resolved + '" data-assignee="'+$patron_to_html(row.assignee, { display_cardnumber: false, url: false })+'"><i class="fa-solid fa-eye" aria-hidden="true"></i> ' + _("Details") + '</a>';
1410
                                let result = '<a class="btn btn-default btn-xs main-trigger" role="button" href="#" data-bs-toggle="modal" data-bs-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="' + resolved + '" data-assignee="'+$patron_to_html(row.assignee, { display_cardnumber: false, url: false })+'"><i class="fa-solid fa-eye" aria-hidden="true"></i> ' + _("Details") + '</a>';
1411
                                return result;
1411
                                return result;
1412
                            },
1412
                            },
1413
                            "searchable": false,
1413
                            searchable: false,
1414
                            "orderable": false
1414
                            orderable: false
1415
                        },
1415
                        },
1416
                    ]
1416
                    ]
1417
                }, table_settings, 0, additional_filters, undefined, external_filter_nodes);
1417
                }, table_settings, 0, additional_filters, undefined, external_filter_nodes);
Lines 1745-1807 Link Here
1745
                    // Initialise as a DataTable
1745
                    // Initialise as a DataTable
1746
                    var bundle_table_url = "/api/v1/items/" + itemnumber + "/bundled_items?";
1746
                    var bundle_table_url = "/api/v1/items/" + itemnumber + "/bundled_items?";
1747
                    var bundle_table = bundles_table.kohaTable({
1747
                    var bundle_table = bundles_table.kohaTable({
1748
                        "ajax": {
1748
                        ajax: {
1749
                            "url": bundle_table_url
1749
                            "url": bundle_table_url
1750
                        },
1750
                        },
1751
                        "embed": [
1751
                        embed: [
1752
                            "biblio",
1752
                            "biblio",
1753
                            "return_claim.patron"
1753
                            "return_claim.patron"
1754
                        ],
1754
                        ],
1755
                        "order": [[ 1, "asc" ]],
1755
                        order: [[ 1, "asc" ]],
1756
                        "columnDefs": [ {
1756
                        columnDefs: [ {
1757
                            "targets": [0,1,2,3],
1757
                            targets: [0,1,2,3],
1758
                            "render": function (data, type, row, meta) {
1758
                            render: function (data, type, row, meta) {
1759
                                if ( data && type == 'display' ) {
1759
                                if ( data && type == 'display' ) {
1760
                                    return data.escapeHtml();
1760
                                    return data.escapeHtml();
1761
                                }
1761
                                }
1762
                                return data;
1762
                                return data;
1763
                            }
1763
                            }
1764
                        } ],
1764
                        } ],
1765
                        "columns": [
1765
                        columns: [
1766
                            {
1766
                            {
1767
                                "data": "biblio.title:biblio.subtitle:biblio.medium",
1767
                                data: "biblio.title:biblio.subtitle:biblio.medium",
1768
                                "title": _("Title"),
1768
                                title: _("Title"),
1769
                                "searchable": true,
1769
                                searchable: true,
1770
                                "orderable": true,
1770
                                orderable: true,
1771
                                "render": function(data, type, row, meta) {
1771
                                render: function(data, type, row, meta) {
1772
                                    return $biblio_to_html(row.biblio, { link: 1 });
1772
                                    return $biblio_to_html(row.biblio, { link: 1 });
1773
                                }
1773
                                }
1774
                            },
1774
                            },
1775
                            {
1775
                            {
1776
                                "data": "biblio.author",
1776
                                data: "biblio.author",
1777
                                "title": _("Author"),
1777
                                title: _("Author"),
1778
                                "searchable": true,
1778
                                searchable: true,
1779
                                "orderable": true,
1779
                                orderable: true,
1780
                            },
1780
                            },
1781
                            {
1781
                            {
1782
                                "data": "copy_number",
1782
                                data: "copy_number",
1783
                                "title": _("Copy number"),
1783
                                title: _("Copy number"),
1784
                                "searchable": true,
1784
                                searchable: true,
1785
                                "orderable": true,
1785
                                orderable: true,
1786
                            },
1786
                            },
1787
                            {
1787
                            {
1788
                                "data": "callnumber",
1788
                                data: "callnumber",
1789
                                "title": _("Callnumber"),
1789
                                title: _("Callnumber"),
1790
                                "searchable": true,
1790
                                searchable: true,
1791
                                "orderable": true,
1791
                                orderable: true,
1792
                            },
1792
                            },
1793
                            {
1793
                            {
1794
                                "data": "external_id",
1794
                                data: "external_id",
1795
                                "title": _("Barcode"),
1795
                                title: _("Barcode"),
1796
                                "searchable": true,
1796
                                searchable: true,
1797
                                "orderable": true,
1797
                                orderable: true,
1798
                            },
1798
                            },
1799
                            {
1799
                            {
1800
                                "data": "lost_status:last_seen_date:return_claim.patron",
1800
                                data: "lost_status:last_seen_date:return_claim.patron",
1801
                                "title": _("Status"),
1801
                                title: _("Status"),
1802
                                "searchable": false,
1802
                                searchable: false,
1803
                                "orderable": false,
1803
                                orderable: false,
1804
                                "render": function(data, type, row, meta) {
1804
                                render: function(data, type, row, meta) {
1805
                                    if ( row.lost_status == bundle_lost_value ) {
1805
                                    if ( row.lost_status == bundle_lost_value ) {
1806
                                        let out = '<span class="lost">' + _("Last seen") + ': ' + $date(row.last_seen_date) + '</span>';
1806
                                        let out = '<span class="lost">' + _("Last seen") + ': ' + $date(row.last_seen_date) + '</span>';
1807
                                        if ( row.return_claim ) {
1807
                                        if ( row.return_claim ) {
Lines 1816-1822 Link Here
1816
                                }
1816
                                }
1817
                            },
1817
                            },
1818
                            {
1818
                            {
1819
                                "data": function( row, type, val, meta ) {
1819
                                data: function( row, type, val, meta ) {
1820
                                    var result;
1820
                                    var result;
1821
                                    if (duedate) {
1821
                                    if (duedate) {
1822
                                        result = '<button class="btn btn-default btn-xs remove disabled" role="button" data-itemnumber="'+row.item_id+'" title="%s"><i class="fa fa-minus" aria-hidden="true"></i> %s</button>\n'.format(_("This bundle is checked out, it cannot be modified"), _("Remove"));
1822
                                        result = '<button class="btn btn-default btn-xs remove disabled" role="button" data-itemnumber="'+row.item_id+'" title="%s"><i class="fa fa-minus" aria-hidden="true"></i> %s</button>\n'.format(_("This bundle is checked out, it cannot be modified"), _("Remove"));
Lines 1825-1834 Link Here
1825
                                    }
1825
                                    }
1826
                                    return result;
1826
                                    return result;
1827
                                },
1827
                                },
1828
                                "title": _("Actions"),
1828
                                title: _("Actions"),
1829
                                "searchable": false,
1829
                                searchable: false,
1830
                                "orderable": false,
1830
                                orderable: false,
1831
                                "class": "no-export"
1831
                                class:"no-export"
1832
                            }
1832
                            }
1833
                        ]
1833
                        ]
1834
                    }, bundle_settings, 1);
1834
                    }, bundle_settings, 1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-10 / +10 lines)
Lines 644-654 Link Here
644
644
645
            var table_settings = [% TablesSettings.GetTableSettings( 'catalogue', 'itemsearch', 'results', 'json' ) | $raw %];
645
            var table_settings = [% TablesSettings.GetTableSettings( 'catalogue', 'itemsearch', 'results', 'json' ) | $raw %];
646
            $('#results').kohaTable( {
646
            $('#results').kohaTable( {
647
                "bKohaColumnsUseNames": true,
647
                bKohaColumnsUseNames: true,
648
                "destroy": true,
648
                destroy: true,
649
                "serverSide": true,
649
                serverSide: true,
650
                "processing": true,
650
                processing: true,
651
                "ajax": {
651
                ajax: {
652
                    url: '/cgi-bin/koha/catalogue/itemsearch.pl',
652
                    url: '/cgi-bin/koha/catalogue/itemsearch.pl',
653
                    data: function ( d ) {
653
                    data: function ( d ) {
654
                        for (i in params) {
654
                        for (i in params) {
Lines 664-672 Link Here
664
                    }
664
                    }
665
                },
665
                },
666
                bKohaAjaxSVC: true,
666
                bKohaAjaxSVC: true,
667
                'dom': 'C<"top pager"ilpB>tr<"bottom pager"ip>',
667
                dom: 'C<"top pager"ilpB>tr<"bottom pager"ip>',
668
                'order': [[1, 'asc']],
668
                order: [[1, 'asc']],
669
                'columns': [
669
                columns: [
670
                    { 'name': 'checkbox', 'orderable': false, searchable: false, },
670
                    { 'name': 'checkbox', 'orderable': false, searchable: false, },
671
                    { 'name': 'title' },
671
                    { 'name': 'title' },
672
                    { 'name': 'publicationyear' },
672
                    { 'name': 'publicationyear' },
Lines 690-697 Link Here
690
                    { 'name': 'date_due' },
690
                    { 'name': 'date_due' },
691
                    { 'name': 'actions', 'orderable': false, searchable: false, }
691
                    { 'name': 'actions', 'orderable': false, searchable: false, }
692
                ],
692
                ],
693
                "pagingType": "full_numbers",
693
                pagingType: "full_numbers",
694
                "drawCallback": function( settings ) {
694
                drawCallback: function( settings ) {
695
                    prepSelections();
695
                    prepSelections();
696
                },
696
                },
697
                fixedHeader: false // There is a bug on this view
697
                fixedHeader: false // There is a bug on this view
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt (-26 / +26 lines)
Lines 87-96 Link Here
87
87
88
            var tickets_url = '/api/v1/tickets';
88
            var tickets_url = '/api/v1/tickets';
89
            var tickets = $("#table_concerns").kohaTable({
89
            var tickets = $("#table_concerns").kohaTable({
90
                "ajax": {
90
                ajax: {
91
                    "url": tickets_url
91
                    "url": tickets_url
92
                },
92
                },
93
                "embed": [
93
                embed: [
94
                    "assignee",
94
                    "assignee",
95
                    "reporter",
95
                    "reporter",
96
                    "resolver",
96
                    "resolver",
Lines 98-107 Link Here
98
                    "updates+count",
98
                    "updates+count",
99
                    "+strings"
99
                    "+strings"
100
                ],
100
                ],
101
                'emptyTable': '<div class="alert alert-info">' + _("Congratulations, there are no catalog concerns.") + '</div>',
101
                emptyTable: '<div class="alert alert-info">' + _("Congratulations, there are no catalog concerns.") + '</div>',
102
                "columnDefs": [{
102
                columnDefs: [{
103
                    "targets": [0, 1, 2, 3],
103
                    targets: [0, 1, 2, 3],
104
                    "render": function(data, type, row, meta) {
104
                    render: function(data, type, row, meta) {
105
                        if (type == 'display') {
105
                        if (type == 'display') {
106
                            if (data != null) {
106
                            if (data != null) {
107
                                return data.escapeHtml();
107
                                return data.escapeHtml();
Lines 112-120 Link Here
112
                        return data;
112
                        return data;
113
                    }
113
                    }
114
                }],
114
                }],
115
                "columns": [{
115
                columns: [{
116
                        "data": "reported_date:reporter.firstname",
116
                        data: "reported_date:reporter.firstname",
117
                        "render": function(data, type, row, meta) {
117
                        render: function(data, type, row, meta) {
118
                            let reported = '<div class="d-flex justify-content-between align-items-start">';
118
                            let reported = '<div class="d-flex justify-content-between align-items-start">';
119
                            reported += '<span class="reporter">' + $patron_to_html(row.reporter, {
119
                            reported += '<span class="reporter">' + $patron_to_html(row.reporter, {
120
                                display_cardnumber: false,
120
                                display_cardnumber: false,
Lines 124-135 Link Here
124
                            reported += '</div>';
124
                            reported += '</div>';
125
                            return reported;
125
                            return reported;
126
                       },
126
                       },
127
                        "searchable": true,
127
                        searchable: true,
128
                        "orderable": true
128
                        orderable: true
129
                    },
129
                    },
130
                    {
130
                    {
131
                        "data": "title:body",
131
                        data: "title:body",
132
                        "render": function(data, type, row, meta) {
132
                        render: function(data, type, row, meta) {
133
                            let result = '<div class="d-flex justify-content-between align-items-start">';
133
                            let result = '<div class="d-flex justify-content-between align-items-start">';
134
134
135
                            // Title link on the left
135
                            // Title link on the left
Lines 146-167 Link Here
146
146
147
                            return result;
147
                            return result;
148
                        },
148
                        },
149
                        "searchable": true,
149
                        searchable: true,
150
                        "orderable": true
150
                        orderable: true
151
                    },
151
                    },
152
                    {
152
                    {
153
                        "data": "biblio.title",
153
                        data: "biblio.title",
154
                        "render": function(data, type, row, meta) {
154
                        render: function(data, type, row, meta) {
155
                            return $biblio_to_html(row.biblio, {
155
                            return $biblio_to_html(row.biblio, {
156
                                link: 1
156
                                link: 1
157
                            });
157
                            });
158
                        },
158
                        },
159
                        "searchable": true,
159
                        searchable: true,
160
                        "orderable": true
160
                        orderable: true
161
                    },
161
                    },
162
                    {
162
                    {
163
                        "data": "assignee.firstname:assignee.surname:resolver.firstname:resolver.surname:resolved_date:status",
163
                        data: "assignee.firstname:assignee.surname:resolver.firstname:resolver.surname:resolved_date:status",
164
                        "render": function(data, type, row, meta) {
164
                        render: function(data, type, row, meta) {
165
                            let result = '';
165
                            let result = '';
166
                            if (row.resolved_date) {
166
                            if (row.resolved_date) {
167
                                result += "<div>";
167
                                result += "<div>";
Lines 196-212 Link Here
196
                            }
196
                            }
197
                            return result;
197
                            return result;
198
                        },
198
                        },
199
                        "searchable": true,
199
                        searchable: true,
200
                        "orderable": true
200
                        orderable: true
201
                    },
201
                    },
202
                    {
202
                    {
203
                        "data": function(row, type, val, meta) {
203
                        data: function(row, type, val, meta) {
204
                            let resolved = ( row.resolved_date ) ? true : false;
204
                            let resolved = ( row.resolved_date ) ? true : false;
205
                            let result = '<a class="btn btn-default btn-xs main-trigger" role="button" href="#" data-bs-toggle="modal" data-bs-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="'+resolved+'" data-assignee="'+$patron_to_html(row.assignee, { display_cardnumber: false, url: false })+'"><i class="fa-solid fa-eye" aria-hidden="true"></i> ' + _("Details") + '</a>';
205
                            let result = '<a class="btn btn-default btn-xs main-trigger" role="button" href="#" data-bs-toggle="modal" data-bs-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="'+resolved+'" data-assignee="'+$patron_to_html(row.assignee, { display_cardnumber: false, url: false })+'"><i class="fa-solid fa-eye" aria-hidden="true"></i> ' + _("Details") + '</a>';
206
                            return result;
206
                            return result;
207
                        },
207
                        },
208
                        "searchable": false,
208
                        searchable: false,
209
                        "orderable": false
209
                        orderable: false
210
                    },
210
                    },
211
                ],
211
                ],
212
                createdRow: function (row, data, dataIndex) {
212
                createdRow: function (row, data, dataIndex) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt (-2 / +1 lines)
Lines 361-368 Link Here
361
            }
361
            }
362
            $("#checkout_infos").kohaTable({
362
            $("#checkout_infos").kohaTable({
363
                dom: "t",
363
                dom: "t",
364
                order: [],
364
                                paging: false,
365
                paging: false,
366
            });
365
            });
367
        });
366
        });
368
        // On-site batch checkout
367
        // On-site batch checkout
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt (-1 / +1 lines)
Lines 640-646 Link Here
640
            let dt_tables = new Array("to_be_stagedt", "staged_and_readyt", "patron_is_outsidet", "delivered_todayt");
640
            let dt_tables = new Array("to_be_stagedt", "staged_and_readyt", "patron_is_outsidet", "delivered_todayt");
641
            dt_tables.forEach(function( id, index ){
641
            dt_tables.forEach(function( id, index ){
642
                $("#" + id).kohaTable({
642
                $("#" + id).kohaTable({
643
                    "autoWidth": false
643
                    autoWidth: false
644
                }, dt_settings[ index ] );
644
                }, dt_settings[ index ] );
645
            });
645
            });
646
646
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingbookings.tt (-46 / +46 lines)
Lines 166-214 Link Here
166
166
167
            var bookings_table_url = '/api/v1/bookings?';
167
            var bookings_table_url = '/api/v1/bookings?';
168
            var bookings_table = $("#bookingst").kohaTable({
168
            var bookings_table = $("#bookingst").kohaTable({
169
                "ajax": {
169
                ajax: {
170
                    "url": bookings_table_url
170
                    url: bookings_table_url
171
                },
171
                },
172
                "embed": [
172
                embed: [
173
                    "biblio",
173
                    "biblio",
174
                    "item+strings",
174
                    "item+strings",
175
                    "item.checkout",
175
                    "item.checkout",
176
                    "patron",
176
                    "patron",
177
                    "pickup_library"
177
                    "pickup_library"
178
                ],
178
                ],
179
                "order": [[ 7, "asc" ]],
179
                order: [[ 7, "asc" ]],
180
                "columns": [{
180
                columns: [{
181
                    "data": "booking_id",
181
                    data: "booking_id",
182
                    "title": _("Booking ID"),
182
                    title: _("Booking ID"),
183
                    "visible": false
183
                    visible: false
184
                },
184
                },
185
                {
185
                {
186
                    "data": "pickup_library.name:me.pickup_library_id",
186
                    data: "pickup_library.name:me.pickup_library_id",
187
                    "title": _("Pickup library"),
187
                    title: _("Pickup library"),
188
                    "searchable": true,
188
                    searchable: true,
189
                    "orderable": true,
189
                    orderable: true,
190
                    "render": function( data, type, row, meta ) {
190
                    render: function( data, type, row, meta ) {
191
                        return escape_str(row.pickup_library_id ? row.pickup_library.name : row.pickup_library_id);
191
                        return escape_str(row.pickup_library_id ? row.pickup_library.name : row.pickup_library_id);
192
                    }
192
                    }
193
                },
193
                },
194
                {
194
                {
195
                    "data": "biblio.title",
195
                    data: "biblio.title",
196
                    "title": _("Title"),
196
                    title: _("Title"),
197
                    "searchable": true,
197
                    searchable: true,
198
                    "orderable": true,
198
                    orderable: true,
199
                    "render": function(data,type,row,meta) {
199
                    render: function(data,type,row,meta) {
200
                        return $biblio_to_html(row.biblio, {
200
                        return $biblio_to_html(row.biblio, {
201
                            link: 'bookings'
201
                            link: 'bookings'
202
                        });
202
                        });
203
                    }
203
                    }
204
                },
204
                },
205
                {
205
                {
206
                    "data": "item.external_id",
206
                    data: "item.external_id",
207
                    "title": _("Item"),
207
                    title: _("Item"),
208
                    "searchable": true,
208
                    searchable: true,
209
                    "orderable": true,
209
                    orderable: true,
210
                    "defaultContent": _("Any item"),
210
                    defaultContent: _("Any item"),
211
                    "render": function(data,type,row,meta) {
211
                    render: function(data,type,row,meta) {
212
                        if ( row.item ) {
212
                        if ( row.item ) {
213
                            return row.item.external_id + " (" + row.booking_id + ")";
213
                            return row.item.external_id + " (" + row.booking_id + ")";
214
                        } else {
214
                        } else {
Lines 217-227 Link Here
217
                    }
217
                    }
218
                },
218
                },
219
                {
219
                {
220
                    "data": "item.callnumber",
220
                    data: "item.callnumber",
221
                    "title": _("Callnumber"),
221
                    title: _("Callnumber"),
222
                    "searchable": true,
222
                    searchable: true,
223
                    "orderable": true,
223
                    orderable: true,
224
                    "render": function(data,type,row,meta) {
224
                    render: function(data,type,row,meta) {
225
                        if ( row.item ) {
225
                        if ( row.item ) {
226
                            return row.item.callnumber;
226
                            return row.item.callnumber;
227
                        } else {
227
                        } else {
Lines 230-240 Link Here
230
                    }
230
                    }
231
                },
231
                },
232
                {
232
                {
233
                    "data": "item.location",
233
                    data: "item.location",
234
                    "title": _("Location"),
234
                    title: _("Location"),
235
                    "searchable": false,
235
                    searchable: false,
236
                    "orderable": false,
236
                    orderable: false,
237
                    "render": function(data,type,row,meta) {
237
                    render: function(data,type,row,meta) {
238
                        if ( row.item ) {
238
                        if ( row.item ) {
239
                            if ( row.item.checked_out_date ) {
239
                            if ( row.item.checked_out_date ) {
240
                                return _("On loan, due: ") + $date(row.item.checked_out_date);
240
                                return _("On loan, due: ") + $date(row.item.checked_out_date);
Lines 247-257 Link Here
247
                    }
247
                    }
248
                },
248
                },
249
                {
249
                {
250
                    "data": "patron.firstname:patron.surname",
250
                    data: "patron.firstname:patron.surname",
251
                    "title": _("Patron"),
251
                    title: _("Patron"),
252
                    "searchable": true,
252
                    searchable: true,
253
                    "orderable": true,
253
                    orderable: true,
254
                    "render": function(data, type, row, meta) {
254
                    render: function(data, type, row, meta) {
255
                        return $patron_to_html(row.patron, {
255
                        return $patron_to_html(row.patron, {
256
                            display_cardnumber: true,
256
                            display_cardnumber: true,
257
                            url: true
257
                            url: true
Lines 259-271 Link Here
259
                    }
259
                    }
260
                },
260
                },
261
                {
261
                {
262
                    "data": "start_date",
262
                    data: "start_date",
263
                    "name": "start_date",
263
                    name: "start_date",
264
                    "title": _("Booking dates"),
264
                    title: _("Booking dates"),
265
                    "type": "date",
265
                    type: "date",
266
                    "searchable": false,
266
                    searchable: false,
267
                    "orderable": true,
267
                    orderable: true,
268
                    "render": function(data, type, row, meta) {
268
                    render: function(data, type, row, meta) {
269
                        return $date(row.start_date) + ' - ' + $date(row.end_date);
269
                        return $date(row.start_date) + ' - ' + $date(row.end_date);
270
                    }
270
                    }
271
                }]
271
                }]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt (-1 / +1 lines)
Lines 60-66 Link Here
60
[% END %]
60
[% END %]
61
<script>
61
<script>
62
    var clubs_dt_params = {
62
    var clubs_dt_params = {
63
        paginate: true,
63
        paging: true,
64
    };
64
    };
65
    $("#table_clubnoenrollmemnts").kohaTable(clubs_dt_params);
65
    $("#table_clubnoenrollmemnts").kohaTable(clubs_dt_params);
66
    $("#table_clubenrollments").kohaTable(clubs_dt_params);
66
    $("#table_clubenrollments").kohaTable(clubs_dt_params);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt (-1 lines)
Lines 74-80 Link Here
74
        $(document).ready(function () {
74
        $(document).ready(function () {
75
            $("#pending_updates table").kohaTable({
75
            $("#pending_updates table").kohaTable({
76
                paging: false,
76
                paging: false,
77
                info: true,
78
                searching: true,
77
                searching: true,
79
                order: [[2, "asc"]],
78
                order: [[2, "asc"]],
80
            });
79
            });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt (-1 / +1 lines)
Lines 173-179 Link Here
173
            $("#patron-lists-table").kohaTable({
173
            $("#patron-lists-table").kohaTable({
174
                autoWidth: false,
174
                autoWidth: false,
175
                pagingType: "full",
175
                pagingType: "full",
176
                "sorting": [[ 1, "asc" ]]
176
                order: [[ 1, "asc" ]]
177
            });
177
            });
178
178
179
            $(".delete_patron").on("click", function(){
179
            $(".delete_patron").on("click", function(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt (-17 / +16 lines)
Lines 336-372 Link Here
336
        $(document).ready(function() {
336
        $(document).ready(function() {
337
            const sale_table = document.getElementById('sale');
337
            const sale_table = document.getElementById('sale');
338
            const sale_kohaTable = $("#sale").kohaTable({
338
            const sale_kohaTable = $("#sale").kohaTable({
339
                "paginate": false,
339
                paginate: false,
340
                "searching": false,
340
                searching: false,
341
                "info": false,
341
                info: false,
342
                "columnDefs": [{
342
                columnDefs: [{
343
                    "targets": [-2],
343
                    "targets": [-2],
344
                    "orderable": false,
344
                    "orderable": false,
345
                    "searchable":  false,
345
                    "searchable":  false,
346
                }, {
346
                }, {
347
                    "targets": [-3],
347
                    targets: [-3],
348
                    "render": function ( data, type, full ) {
348
                    render: function ( data, type, full ) {
349
                        var price = Number.parseFloat(data);
349
                        var price = Number.parseFloat(data);
350
                        return price.format_price();
350
                        return price.format_price();
351
                    }
351
                    }
352
                }, {
352
                }, {
353
                    "targets": [-5],
353
                    targets: [-5],
354
                    "className":  "editable",
354
                    className:  "editable",
355
                }, {
355
                }, {
356
                    "targets": [-4],
356
                    targets: [-4],
357
                    "className":  "editable_int",
357
                    className:  "editable_int",
358
                }, {
358
                }, {
359
                    "targets": [-1],
359
                    targets: [-1],
360
                    "visible": false,
360
                    visible: false,
361
                    "searchable": false
361
                    searchable: false
362
                }],
362
                }],
363
                "order": [],
363
                rowCallback: function( row, data ) {
364
                "rowCallback": function( row, data ) {
365
                    const total = data[1] * data[2];
364
                    const total = data[1] * data[2];
366
                    data[3] = total;
365
                    data[3] = total;
367
                    sale_kohaTable.api().cell(row, 3).invalidate();
366
                    sale_kohaTable.api().cell(row, 3).invalidate();
368
                },
367
                },
369
                "footerCallback": function(tfoot, data, start, end, display) {
368
                footerCallback: function(tfoot, data, start, end, display) {
370
                    let total_price = 0;
369
                    let total_price = 0;
371
370
372
                    // Loop through the data to calculate the total
371
                    // Loop through the data to calculate the total
Lines 383-389 Link Here
383
                    // Update a related element and trigger change
382
                    // Update a related element and trigger change
384
                    $('#paid').val(total_price).trigger('change');
383
                    $('#paid').val(total_price).trigger('change');
385
                },
384
                },
386
                "autoWidth": false
385
                autoWidth: false
387
            });
386
            });
388
387
389
            $("#sale").on("click", "button.drop", function(){
388
            $("#sale").on("click", "button.drop", function(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt (-19 / +19 lines)
Lines 516-542 Link Here
516
516
517
        var cashups_table_url = "/api/v1/cash_registers/[% register.id | html %]/cashups?";
517
        var cashups_table_url = "/api/v1/cash_registers/[% register.id | html %]/cashups?";
518
        var cashups_table = $("#table_cashups").kohaTable({
518
        var cashups_table = $("#table_cashups").kohaTable({
519
            "ajax": {
519
            ajax: {
520
                "url": cashups_table_url
520
                "url": cashups_table_url
521
            },
521
            },
522
            "embed": [
522
            embed: [
523
               "manager"
523
               "manager"
524
            ],
524
            ],
525
            "order": [[ 0, "desc" ]],
525
            order: [[ 0, "desc" ]],
526
            "columns": [
526
            columns: [
527
                {
527
                {
528
                    "data": "timestamp",
528
                    data: "timestamp",
529
                    "searchable": true,
529
                    searchable: true,
530
                    "orderable": true,
530
                    orderable: true,
531
                    "render": function(data, type, row, meta) {
531
                    render: function(data, type, row, meta) {
532
                        return $datetime(row.timestamp);
532
                        return $datetime(row.timestamp);
533
                    }
533
                    }
534
                },
534
                },
535
                {
535
                {
536
                    "data": "manager.firstname:manager.surname",
536
                    data: "manager.firstname:manager.surname",
537
                    "searchable": true,
537
                    searchable: true,
538
                    "orderable": true,
538
                    orderable: true,
539
                    "render": function(data, type, row, meta) {
539
                    render: function(data, type, row, meta) {
540
                        var fullname;
540
                        var fullname;
541
                        if ( row.manager.firstname == null ) {
541
                        if ( row.manager.firstname == null ) {
542
                            fullname = row.manager.surname;
542
                            fullname = row.manager.surname;
Lines 548-568 Link Here
548
                    }
548
                    }
549
                },
549
                },
550
                {
550
                {
551
                    "data": "amount",
551
                    data: "amount",
552
                    "searchable": true,
552
                    searchable: true,
553
                    "orderable": true,
553
                    orderable: true,
554
                    "render": function(data, type, row, meta) {
554
                    render: function(data, type, row, meta) {
555
                        var amt = row.amount * -1;
555
                        var amt = row.amount * -1;
556
                        return escape_price(amt);
556
                        return escape_price(amt);
557
                    }
557
                    }
558
                },
558
                },
559
                {
559
                {
560
                    "data": function( row, type, val, meta ) {
560
                    data: function( row, type, val, meta ) {
561
                        var result = '<a class="btn btn-default btn-xs" role="button" data-bs-toggle="modal" data-cashup="'+encodeURIComponent(row.cashup_id)+'" data-register="[% register.description | html %]" href="#cashupSummaryModal"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Summary")+'</a>\n';
561
                        var result = '<a class="btn btn-default btn-xs" role="button" data-bs-toggle="modal" data-cashup="'+encodeURIComponent(row.cashup_id)+'" data-register="[% register.description | html %]" href="#cashupSummaryModal"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Summary")+'</a>\n';
562
                        return result;
562
                        return result;
563
                    },
563
                    },
564
                    "searchable": false,
564
                    searchable: false,
565
                    "orderable": false
565
                    orderable: false
566
                }
566
                }
567
            ]
567
            ]
568
        }, null, 1);
568
        }, null, 1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-4 / +4 lines)
Lines 2549-2558 Link Here
2549
                        $("#mana_search_result_label").text(_("Results from Mana Knowledge Base"));
2549
                        $("#mana_search_result_label").text(_("Results from Mana Knowledge Base"));
2550
                        $("#mana-loading").hide();
2550
                        $("#mana-loading").hide();
2551
                        $("#mana_results_datatable").kohaTable({
2551
                        $("#mana_results_datatable").kohaTable({
2552
                            "pagingType": "full",
2552
                            pagingType: "full",
2553
                            "autoWidth": false,
2553
                            autoWidth: false,
2554
                            "columnDefs": [
2554
                            columnDefs: [
2555
                                { "width": "35%", "targets": 1 }
2555
                                { "width": "35%", targets: 1 }
2556
                            ],
2556
                            ],
2557
                        });
2557
                        });
2558
2558
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt (-1 lines)
Lines 204-210 Link Here
204
204
205
            var lostitems_table = $("#lostitems-table").kohaTable(
205
            var lostitems_table = $("#lostitems-table").kohaTable(
206
                {
206
                {
207
                    order: [],
208
                    autoWidth: false,
207
                    autoWidth: false,
209
                    paging: false,
208
                    paging: false,
210
                },
209
                },
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-1 / +1 lines)
Lines 1329-1335 Link Here
1329
                        let tabSuggestionData = suggestionData.find(s => s.suggestiontype === `${tabName}`)
1329
                        let tabSuggestionData = suggestionData.find(s => s.suggestiontype === `${tabName}`)
1330
                        $("#table_" + tabName).kohaTable(
1330
                        $("#table_" + tabName).kohaTable(
1331
                            {
1331
                            {
1332
                                sorting: [[4, "asc"]],
1332
                                order: [[4, "asc"]],
1333
                                autoWidth: false,
1333
                                autoWidth: false,
1334
                                ajax: {
1334
                                ajax: {
1335
                                    url: "/api/v1/suggestions?q=" + JSON.stringify(tabSuggestionData.search_params),
1335
                                    url: "/api/v1/suggestions?q=" + JSON.stringify(tabSuggestionData.search_params),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt (-4 / +2 lines)
Lines 351-358 Link Here
351
                  { targets: [3, 4], type: "num-html" },
351
                  { targets: [3, 4], type: "num-html" },
352
              ],
352
              ],
353
              dom: "t",
353
              dom: "t",
354
              order: [],
354
                            paging: false,
355
              paging: false,
356
          });
355
          });
357
356
358
          $("#authorities").kohaTable({
357
          $("#authorities").kohaTable({
Lines 360-367 Link Here
360
                  { targets: [3], type: "num-html" },
359
                  { targets: [3], type: "num-html" },
361
              ],
360
              ],
362
              dom: "t",
361
              dom: "t",
363
              order: [],
362
                            paging: false,
364
              paging: false,
365
          });
363
          });
366
364
367
          $("#selectrecords").on("submit",function(){
365
          $("#selectrecords").on("submit",function(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt (-1 lines)
Lines 270-276 Link Here
270
270
271
            $("#checkouts, #checkouts_result").kohaTable({
271
            $("#checkouts, #checkouts_result").kohaTable({
272
                dom: "t",
272
                dom: "t",
273
                order: [],
274
                paging: false,
273
                paging: false,
275
            });
274
            });
276
275
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt (-4 / +2 lines)
Lines 358-365 Link Here
358
                    { targets: [1], type: "num-html" },
358
                    { targets: [1], type: "num-html" },
359
                ],
359
                ],
360
                dom: "t",
360
                dom: "t",
361
                order: [],
361
                                paging: false,
362
                paging: false,
363
            });
362
            });
364
363
365
            $("#authorities").kohaTable({
364
            $("#authorities").kohaTable({
Lines 367-374 Link Here
367
                    { targets: [1], type: "num-html" },
366
                    { targets: [1], type: "num-html" },
368
                ],
367
                ],
369
                dom: "t",
368
                dom: "t",
370
                order: [],
369
                                paging: false,
371
                paging: false,
372
            });
370
            });
373
371
374
            $("#mainformsubmit").click(function() {
372
            $("#mainformsubmit").click(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (-7 / +7 lines)
Lines 461-480 Link Here
461
        $(document).ready(function(){
461
        $(document).ready(function(){
462
            var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'inventory', 'inventoryt', 'json' ) | $raw %];
462
            var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'inventory', 'inventoryt', 'json' ) | $raw %];
463
            inventorydt = $("#inventoryt").kohaTable({
463
            inventorydt = $("#inventoryt").kohaTable({
464
                "pagingType": 'full_numbers',
464
                pagingType: 'full_numbers',
465
                "bKohaColumnsUseNames": true,
465
                bKohaColumnsUseNames: true,
466
                [% IF uploadedbarcodesflag %]
466
                [% IF uploadedbarcodesflag %]
467
                    // sort on callnumber
467
                    // sort on callnumber
468
                    "order": [[ 2, "asc" ]],
468
                    order: [[ 2, "asc" ]],
469
                [% ELSE %]
469
                [% ELSE %]
470
                    // first column contains checkboxes
470
                    // first column contains checkboxes
471
                    "columnDefs": [
471
                    columnDefs: [
472
                        { "orderable": false, "searchable":  false, "targets": [ 0 ] }
472
                        { orderable: false, searchable:  false, targets: [ 0 ] }
473
                    ],
473
                    ],
474
                    // 3rd column is callnumber
474
                    // 3rd column is callnumber
475
                    "order": [[ 2, "asc" ]],
475
                    order: [[ 2, "asc" ]],
476
                [% END %]
476
                [% END %]
477
                "drawCallback": function() {
477
                drawCallback: function() {
478
                    //bind the click handler script to the newly created elements held in the table
478
                    //bind the click handler script to the newly created elements held in the table
479
                    $('.openWin').bind('click',function(e){
479
                    $('.openWin').bind('click',function(e){
480
                        e.preventDefault();
480
                        e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt (-15 / +15 lines)
Lines 471-480 Link Here
471
471
472
            [% IF import_batch_id %]
472
            [% IF import_batch_id %]
473
                $("#records-table").kohaTable({
473
                $("#records-table").kohaTable({
474
                    "autoWidth": false,
474
                    autoWidth: false,
475
                    "searching": false,
475
                    searching: false,
476
                    "processing": true,
476
                    processing: true,
477
                    "serverSide":  true,
477
                    serverSide:  true,
478
                    ajax: {
478
                    ajax: {
479
                        url: "batch_records_ajax.pl",
479
                        url: "batch_records_ajax.pl",
480
                        data: function ( d ) {
480
                        data: function ( d ) {
Lines 483-500 Link Here
483
                        },
483
                        },
484
                    },
484
                    },
485
                    bKohaAjaxSVC: true,
485
                    bKohaAjaxSVC: true,
486
                    "pagingType": "full_numbers",
486
                    pagingType: "full_numbers",
487
                    "dom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">',
487
                    dom: '<"top pager"iflp>rt<"bottom pager"flp><"clear">',
488
                    "columns": [
488
                    columns: [
489
                        { "data": "import_record_id" },
489
                        { data: "import_record_id" },
490
                        { "data": "citation" },
490
                        { data: "citation" },
491
                        { "data": "status" },
491
                        { data: "status" },
492
                        { "data": "overlay_status" },
492
                        { data: "overlay_status" },
493
                        { "data": null, "defaultContent": "" },
493
                        { data: null, defaultContent: "" },
494
                        { "data": null, "defaultContent": "" },
494
                        { data: null, defaultContent: "" },
495
                        { "data": "matched" }
495
                        { data: "matched" }
496
                    ],
496
                    ],
497
                    "rowCallback": function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
497
                    rowCallback: function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
498
                        [% IF(record_type == 'auth') %]
498
                        [% IF(record_type == 'auth') %]
499
                            var record_details_url = "/cgi-bin/koha/authorities/detail.pl?authid=";
499
                            var record_details_url = "/cgi-bin/koha/authorities/detail.pl?authid=";
500
                        [% ELSE %]
500
                        [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-17 / +17 lines)
Lines 684-708 Link Here
684
                        }
684
                        }
685
                    },
685
                    },
686
                    bKohaAjaxSVC: true,
686
                    bKohaAjaxSVC: true,
687
                    'columns':[
687
                    columns: [
688
                        { "data": 'dt_public' },
688
                        { data: 'dt_public' },
689
                        { "data": 'dt_shelfname' },
689
                        { data: 'dt_shelfname' },
690
                        { "data": 'dt_count' },
690
                        { data: 'dt_count' },
691
                        { "data": 'dt_is_shared' },
691
                        { data: 'dt_is_shared' },
692
                        { "data": 'dt_owner' },
692
                        { data: 'dt_owner' },
693
                        { "data": 'dt_sortby' },
693
                        { data: 'dt_sortby' },
694
                        { "data": 'dt_created_on' },
694
                        { data: 'dt_created_on' },
695
                        { "data": 'dt_modification_time' },
695
                        { data: 'dt_modification_time' },
696
                        { "data": 'dt_action', "orderable": false, "className":  'actions' }
696
                        { data: 'dt_action', orderable: false, className:  'actions' }
697
                    ],
697
                    ],
698
                    "columnDefs": [
698
                    columnDefs: [
699
                        { "visible": false, "targets": [ 'NoVisible' ] }
699
                        { visible: false, targets: [ 'NoVisible' ] }
700
                    ],
700
                    ],
701
                    "autoWidth": false,
701
                    autoWidth: false,
702
                    "pagingType": 'full_numbers',
702
                    pagingType: 'full_numbers',
703
                    "searching": false,
703
                    searching: false,
704
                    "processing": true,
704
                    processing: true,
705
                    "orderCellsTop":  true
705
                    orderCellsTop: true
706
                });
706
                });
707
                _dt_add_delay_filters(dtListResults.api(), $("#listresultst"));
707
                _dt_add_delay_filters(dtListResults.api(), $("#listresultst"));
708
708
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt (-1 / +1 lines)
Lines 7-13 Link Here
7
    "draw": [% draw | html %],
7
    "draw": [% draw | html %],
8
    "recordsTotal": [% recordsTotal | html %],
8
    "recordsTotal": [% recordsTotal | html %],
9
    "recordsFiltered": [% recordsFiltered | html %],
9
    "recordsFiltered": [% recordsFiltered | html %],
10
    "data": [
10
    data: [
11
        [% FOREACH d IN data %]
11
        [% FOREACH d IN data %]
12
            {
12
            {
13
                "dt_public":
13
                "dt_public":
(-)a/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js (-1 lines)
Lines 4-10 $(document).ready(function () { Link Here
4
    $("#Aform").preventDoubleFormSubmit();
4
    $("#Aform").preventDoubleFormSubmit();
5
    $("#files").kohaTable({
5
    $("#files").kohaTable({
6
        pagingType: "full",
6
        pagingType: "full",
7
        order: [],
8
    });
7
    });
9
8
10
    checkOrderBudgets();
9
    checkOrderBudgets();
(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-1 lines)
Lines 1383-1389 $(document).ready(function () { Link Here
1383
            returnClaimsTable = $("#return-claims-table").kohaTable({
1383
            returnClaimsTable = $("#return-claims-table").kohaTable({
1384
                autoWidth: false,
1384
                autoWidth: false,
1385
                dom: "rt",
1385
                dom: "rt",
1386
                order: [],
1387
                columnDefs: [{ type: "anti-the", targets: ["anti-the"] }],
1386
                columnDefs: [{ type: "anti-the", targets: ["anti-the"] }],
1388
                columns: [
1387
                columns: [
1389
                    {
1388
                    {
(-)a/koha-tmpl/intranet-tmpl/prog/js/marc_subfields_structure.js (-1 lines)
Lines 30-36 $(document).ready(function () { Link Here
30
        populateHiddenCheckboxes($(this).attr("id").split("-")[1]);
30
        populateHiddenCheckboxes($(this).attr("id").split("-")[1]);
31
    });
31
    });
32
    $("#table_marcsubfieldstructure").kohaTable({
32
    $("#table_marcsubfieldstructure").kohaTable({
33
        order: [],
34
        paging: false,
33
        paging: false,
35
    });
34
    });
36
35
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt (-13 / +13 lines)
Lines 91-120 Link Here
91
91
92
            var fines_table = $("#finestable").kohaTable({
92
            var fines_table = $("#finestable").kohaTable({
93
                 [% IF ENABLE_OPAC_PAYMENTS %]
93
                 [% IF ENABLE_OPAC_PAYMENTS %]
94
                 "order": [[ 1, "desc" ]],
94
                 order: [[ 1, "desc" ]],
95
                 [% ELSE %]
95
                 [% ELSE %]
96
                 "order": [[ 0, "desc" ]],
96
                 order: [[ 0, "desc" ]],
97
                 [% END %]
97
                 [% END %]
98
                 "dom": '<"#filter_p">',
98
                 dom: '<"#filter_p">',
99
                 "responsive": {
99
                 responsive: {
100
                    "details": { "type": 'column',"target": -1 }
100
                    details: { "type": 'column',"target": -1 }
101
                 },
101
                 },
102
                 "columnDefs": [
102
                 columnDefs: [
103
                    { "className": 'dtr-control', "orderable": false, "targets": -1 }
103
                    { className: 'dtr-control', orderable: false, targets: -1 }
104
                 ],
104
                 ],
105
                 'drawCallback': function() {
105
                 drawCallback: function() {
106
                    show_hiddentfoot('#finestable');
106
                    show_hiddentfoot('#finestable');
107
                 }
107
                 }
108
            } );
108
            } );
109
109
110
            $('table[id^="finestable-"]').kohaTable({
110
            $('table[id^="finestable-"]').kohaTable({
111
                 "responsive": {
111
                 responsive: {
112
                    "details": { "type": 'column',"target": -1 }
112
                    details: { "type": 'column',"target": -1 }
113
                 },
113
                 },
114
                 "columnDefs": [
114
                 columnDefs: [
115
                    { "className": 'dtr-control', "orderable": false, "targets": -1 }
115
                    { className: 'dtr-control', orderable: false, targets: -1 }
116
                 ],
116
                 ],
117
                 'drawCallback': function() {
117
                 drawCallback: function() {
118
                    show_hiddentfoot('table[id^="finestable-"]');
118
                    show_hiddentfoot('table[id^="finestable-"]');
119
                 }
119
                 }
120
            });
120
            });
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt (-1 / +1 lines)
Lines 142-148 Link Here
142
            $("#course-items-table").kohaTable(
142
            $("#course-items-table").kohaTable(
143
                {
143
                {
144
                    dom: '<"top"<"table_controls"f>>t',
144
                    dom: '<"top"<"table_controls"f>>t',
145
                    sorting: [[1, "asc"]],
145
                    order: [[1, "asc"]],
146
                    language: {
146
                    language: {
147
                        search: "_INPUT_",
147
                        search: "_INPUT_",
148
                        searchPlaceholder: _("Search course reserves"),
148
                        searchPlaceholder: _("Search course reserves"),
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt (-1 / +1 lines)
Lines 89-95 Link Here
89
            $("#course_reserves_table").kohaTable(
89
            $("#course_reserves_table").kohaTable(
90
                {
90
                {
91
                    dom: '<"top"<"table_controls"f>>rt<"clear">',
91
                    dom: '<"top"<"table_controls"f>>rt<"clear">',
92
                    sorting: [[1, "asc"]],
92
                    order: [[1, "asc"]],
93
                    asColumnDefs: [{ aTargets: [1], sType: "nsb-nse" }],
93
                    asColumnDefs: [{ aTargets: [1], sType: "nsb-nse" }],
94
                    language: {
94
                    language: {
95
                        search: "_INPUT_",
95
                        search: "_INPUT_",
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-1 / +1 lines)
Lines 1900-1906 Link Here
1900
            $(".subscriptionst").kohaTable(
1900
            $(".subscriptionst").kohaTable(
1901
                {
1901
                {
1902
                    dom: '<"clearfix">t',
1902
                    dom: '<"clearfix">t',
1903
                    sorting: [[1, "desc"]],
1903
                    order: [[1, "desc"]],
1904
                    bKohaColumnsUseNames: true,
1904
                    bKohaColumnsUseNames: true,
1905
                    responsive: {
1905
                    responsive: {
1906
                        details: { type: "column", target: -1 },
1906
                        details: { type: "column", target: -1 },
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt (-1 / +1 lines)
Lines 192-198 Link Here
192
            var table = $("#table_holdshistory").kohaTable({
192
            var table = $("#table_holdshistory").kohaTable({
193
                dom: '<"top"<"table_entries"i><"table_controls"fB>>t',
193
                dom: '<"top"<"table_entries"i><"table_controls"fB>>t',
194
                autoWidth: false,
194
                autoWidth: false,
195
                sorting: [[4, "desc"]],
195
                order: [[4, "desc"]],
196
                language: {
196
                language: {
197
                    search: "_INPUT_",
197
                    search: "_INPUT_",
198
                    searchPlaceholder: _("Search"),
198
                    searchPlaceholder: _("Search"),
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-5 / +5 lines)
Lines 600-612 Link Here
600
600
601
        $(function() {
601
        $(function() {
602
            $("#suggestt").kohaTable({
602
            $("#suggestt").kohaTable({
603
                "order": [[ 1, "asc" ]],
603
                order: [[ 1, "asc" ]],
604
                "columnDefs": [
604
                columnDefs: [
605
                  [% IF ( loggedinusername ) %]{ "targets": [ 0 ], "orderable": false, "searchable": false }[% END %],
605
                  [% IF ( loggedinusername ) %]{ targets: [ 0 ], orderable: false, searchable: false }[% END %],
606
                    { "className": 'dtr-control', "orderable": false, "targets": -1 },
606
                    { className: 'dtr-control', orderable: false, targets: -1 },
607
                    { responsivePriority: 1, targets: 1 }
607
                    { responsivePriority: 1, targets: 1 }
608
                ],
608
                ],
609
                "responsive": {
609
                responsive: {
610
                    details: {
610
                    details: {
611
                        type: 'column',
611
                        type: 'column',
612
                        target: -1
612
                        target: -1
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt (-1 / +1 lines)
Lines 296-302 Link Here
296
            });
296
            });
297
297
298
            $("#mytagst").kohaTable({
298
            $("#mytagst").kohaTable({
299
                sorting: [[2, "asc"]],
299
                order: [[2, "asc"]],
300
                columnDefs: [
300
                columnDefs: [
301
                    { className: "dtr-control", orderable: false, targets: -1 },
301
                    { className: "dtr-control", orderable: false, targets: -1 },
302
                    { responsivePriority: 1, targets: 2 },
302
                    { responsivePriority: 1, targets: 2 },
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt (-1 / +1 lines)
Lines 148-154 Link Here
148
    <script>
148
    <script>
149
        $(function () {
149
        $(function () {
150
            $("#topissuest").kohaTable({
150
            $("#topissuest").kohaTable({
151
                sorting: [[3, "desc"]],
151
                order: [[3, "desc"]],
152
                columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
152
                columnDefs: [{ className: "dtr-control", orderable: false, targets: -1 }],
153
                responsive: {
153
                responsive: {
154
                    details: {
154
                    details: {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-9 / +9 lines)
Lines 1209-1225 Link Here
1209
                        tableInit( $(this).attr("id") );
1209
                        tableInit( $(this).attr("id") );
1210
                    })
1210
                    })
1211
                    .kohaTable({
1211
                    .kohaTable({
1212
                    "sorting" : [[ thIndex, 'asc' ]],
1212
                    order: [[ thIndex, 'asc' ]],
1213
                    "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1213
                    dom: '<"top"<"table_entries"><"table_controls"fB>>t',
1214
                    "columnDefs": [
1214
                    columnDefs: [
1215
                        { "visible": false, "targets" : [ "hidden" ] },
1215
                        { visible: false, "targets" : [ "hidden" ] },
1216
                        { "className": 'dtr-control', "orderable": false, "targets": -1 }
1216
                        { className: 'dtr-control', orderable: false, targets: -1 }
1217
                    ],
1217
                    ],
1218
                    "language": {
1218
                    language: {
1219
                        "search": "_INPUT_",
1219
                        search: "_INPUT_",
1220
                        "searchPlaceholder": _("Search")
1220
                        searchPlaceholder: _("Search")
1221
                    },
1221
                    },
1222
                    "responsive": {
1222
                    responsive: {
1223
                        details: {
1223
                        details: {
1224
                            type: 'column',
1224
                            type: 'column',
1225
                            target: -1
1225
                            target: -1
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-2 / +1 lines)
Lines 486-492 Link Here
486
                    dTables.each(function(){
486
                    dTables.each(function(){
487
                        var thIndex = $(this).find("th.psort").index();
487
                        var thIndex = $(this).find("th.psort").index();
488
                        $(this).kohaTable({
488
                        $(this).kohaTable({
489
                            sorting: [[thIndex, "asc"]],
489
                            order: [[thIndex, "asc"]],
490
                            dom: '<"top"<"table_entries"><"table_controls"f>>t<"clear">',
490
                            dom: '<"top"<"table_entries"><"table_controls"f>>t<"clear">',
491
                            columnDefs: [
491
                            columnDefs: [
492
                                { targets: ["noshow"], visible: false, searchable: false },
492
                                { targets: ["noshow"], visible: false, searchable: false },
493
- 

Return to bug 39715