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

(-)a/admin/columns_settings.yml (-11 / +21 lines)
Lines 303-323 modules: Link Here
303
        -
303
        -
304
          columnname: illrequest_id
304
          columnname: illrequest_id
305
        -
305
        -
306
          columnname: metadata_Author
306
          columnname: metadata_author
307
        -
307
        -
308
          columnname: metadata_Title
308
          columnname: metadata_title
309
        -
309
        -
310
          columnname: metadata_Item_part_title
310
          columnname: metadata_item_part_title
311
        -
311
        -
312
          columnname: metadata_Issue
312
          columnname: metadata_issue
313
        -
313
        -
314
          columnname: metadata_Volume
314
          columnname: metadata_volume
315
        -
315
        -
316
          columnname: metadata_Year
316
          columnname: metadata_year
317
        -
317
        -
318
          columnname: metadata_Item_part_pages
318
          columnname: metadata_item_part_pages
319
        -
319
        -
320
          columnname: metadata_Type
320
          columnname: metadata_type
321
        -
321
        -
322
          columnname: orderid
322
          columnname: orderid
323
        -
323
        -
Lines 325-343 modules: Link Here
325
        -
325
        -
326
          columnname: patron_cardnumber
326
          columnname: patron_cardnumber
327
        -
327
        -
328
          columnname: biblio_id
328
          columnname: patron
329
        -
329
        -
330
          columnname: borrowernumber
330
          columnname: biblio_id
331
        -
331
        -
332
          columnname: library_branchname
332
          columnname: library_branchname
333
        -
333
        -
334
          columnname: status
334
          columnname: status
335
        -
335
        -
336
          columnname: placed
336
          columnname: placed
337
          cannot_be_toggled: 1
338
          cannot_be_modified: 1
339
          is_hidden: 1
337
        -
340
        -
338
          columnname: replied
341
          columnname: placed_formatted
339
        -
342
        -
340
          columnname: updated
343
          columnname: updated
344
          cannot_be_toggled: 1
345
          cannot_be_modified: 1
346
          is_hidden: 1
347
        -
348
          columnname: updated_formatted
349
        -
350
          columnname: replied
341
        -
351
        -
342
          columnname: completed
352
          columnname: completed
343
        -
353
        -
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-26 / +22 lines)
Lines 512-519 Link Here
512
                                    <th scope="col">Order ID</th>
512
                                    <th scope="col">Order ID</th>
513
                                    <th scope="col">Patron ID</th>
513
                                    <th scope="col">Patron ID</th>
514
                                    <th scope="col" class="patron_cardnumber">Patron barcode</th>
514
                                    <th scope="col" class="patron_cardnumber">Patron barcode</th>
515
                                    <th scope="col">Biblio ID</th>
516
                                    <th scope="col">Patron</th>
515
                                    <th scope="col">Patron</th>
516
                                    <th scope="col">Biblio ID</th>
517
                                    <th scope="col">Branch</th>
517
                                    <th scope="col">Branch</th>
518
                                    <th scope="col">Status</th>
518
                                    <th scope="col">Status</th>
519
                                    <th scope="col" class="placed">&nbsp;</th>
519
                                    <th scope="col" class="placed">&nbsp;</th>
Lines 521-526 Link Here
521
                                    <th scope="col">Replied</th>
521
                                    <th scope="col">Replied</th>
522
                                    <th scope="col" class="updated">&nbsp;</th>
522
                                    <th scope="col" class="updated">&nbsp;</th>
523
                                    <th scope="col" class="updated_formatted">Updated on</th>
523
                                    <th scope="col" class="updated_formatted">Updated on</th>
524
                                    <th scope="col">Replied</th>
524
                                    <th scope="col">Completed on</th>
525
                                    <th scope="col">Completed on</th>
525
                                    <th scope="col">Access URL</th>
526
                                    <th scope="col">Access URL</th>
526
                                    <th scope="col">Cost</th>
527
                                    <th scope="col">Cost</th>
Lines 601-607 Link Here
601
                            var sel = $('#illfilter_status option:selected').val();
602
                            var sel = $('#illfilter_status option:selected').val();
602
                            if (sel && sel.length > 0) {
603
                            if (sel && sel.length > 0) {
603
                                activeFilters[me] = function() {
604
                                activeFilters[me] = function() {
604
                                    table.column(5).search(sel);
605
                                    table.api().column(15).search(sel);
605
                                }
606
                                }
606
                            } else {
607
                            } else {
607
                                if (activeFilters.hasOwnProperty(me)) {
608
                                if (activeFilters.hasOwnProperty(me)) {
Lines 618-624 Link Here
618
                    prep: function(tableData, oData) {
619
                    prep: function(tableData, oData) {
619
                        var uniques = {};
620
                        var uniques = {};
620
                        tableData.forEach(function(row) {
621
                        tableData.forEach(function(row) {
621
                            uniques[row.library.branchname] = 1
622
                            uniques[row.library_branchname] = 1
622
                        });
623
                        });
623
                        Object.keys(uniques).sort().forEach(function(unique) {
624
                        Object.keys(uniques).sort().forEach(function(unique) {
624
                            $('#illfilter_branchname').append(
625
                            $('#illfilter_branchname').append(
Lines 633-639 Link Here
633
                            var sel = $('#illfilter_branchname option:selected').val();
634
                            var sel = $('#illfilter_branchname option:selected').val();
634
                            if (sel && sel.length > 0) {
635
                            if (sel && sel.length > 0) {
635
                                activeFilters[me] = function() {
636
                                activeFilters[me] = function() {
636
                                    table.column(4).search(sel);
637
                                    table.api().column(14).search(sel);
637
                                }
638
                                }
638
                            } else {
639
                            } else {
639
                                if (activeFilters.hasOwnProperty(me)) {
640
                                if (activeFilters.hasOwnProperty(me)) {
Lines 653-659 Link Here
653
                            var val = $('#illfilter_barcode').val();
654
                            var val = $('#illfilter_barcode').val();
654
                            if (val && val.length > 0) {
655
                            if (val && val.length > 0) {
655
                                activeFilters[me] = function() {
656
                                activeFilters[me] = function() {
656
                                    table.column(12).search(val);
657
                                    table.api().column(11).search(val);
657
                                }
658
                                }
658
                            } else {
659
                            } else {
659
                                if (activeFilters.hasOwnProperty(me)) {
660
                                if (activeFilters.hasOwnProperty(me)) {
Lines 722-729 Link Here
722
                if ( row.patron_firstname ) {
723
                if ( row.patron_firstname ) {
723
                    patronLink = patronLink + row.patron_firstname + ' ';
724
                    patronLink = patronLink + row.patron_firstname + ' ';
724
                }
725
                }
725
                patronLink = patronLink + row.patron_surname +
726
                patronLink = patronLink + row.patron_surname + '</a>';
726
                    ' [' + row.patron_cardnumber + ' ]</a>';
727
                return patronLink;
727
                return patronLink;
728
            };
728
            };
729
729
Lines 869-879 Link Here
869
                });
869
                });
870
            });
870
            });
871
871
872
        // Display the modal containing request supplier metadata
872
            // Display the modal containing request supplier metadata
873
        $('#ill-request-display-metadata').on('click', function(e) {
873
            $('#ill-request-display-metadata').on('click', function(e) {
874
            e.preventDefault();
874
                e.preventDefault();
875
            $('#dataPreview').modal({show:true});
875
                $('#dataPreview').modal({show:true});
876
        });
876
            });
877
877
878
            // Get our data from the API and process it prior to passing
878
            // Get our data from the API and process it prior to passing
879
            // it to datatables
879
            // it to datatables
Lines 899-904 Link Here
899
                        var colObj = $.extend({}, thisCol);
899
                        var colObj = $.extend({}, thisCol);
900
                        colObj.name = colName;
900
                        colObj.name = colName;
901
                        colObj.className = colName;
901
                        colObj.className = colName;
902
                        colObj.defaultContent = '';
902
903
903
                        // We may need to process the data going in this
904
                        // We may need to process the data going in this
904
                        // column, so do it if necessary
905
                        // column, so do it if necessary
Lines 922-927 Link Here
922
                    });
923
                    });
923
924
924
                    // Initialise the datatable
925
                    // Initialise the datatable
926
                    table = KohaTable("ill-requests", {})
925
                    var illTable = KohaTable("ill-requests", {
927
                    var illTable = KohaTable("ill-requests", {
926
                        'aoColumnDefs': [
928
                        'aoColumnDefs': [
927
                            { // Last column shouldn't be sortable or searchable
929
                            { // Last column shouldn't be sortable or searchable
Lines 929-948 Link Here
929
                                'bSortable': false,
931
                                'bSortable': false,
930
                                'bSearchable': false
932
                                'bSearchable': false
931
                            },
933
                            },
932
                            { // Hide the two date columns we use just for sorting
933
                                'aTargets': [ 'placed', 'updated' ],
934
                                'bVisible': false,
935
                                'bSearchable': true
936
                            },
937
                            { // When sorting 'placed', we want to use the
934
                            { // When sorting 'placed', we want to use the
938
                              // unformatted column
935
                              // unformatted column
939
                              'aTargets': [ 'placed_formatted'],
936
                              'aTargets': [ 'placed_formatted'],
940
                              'iDataSort': 7
937
                              'iDataSort': 16
941
                            },
938
                            },
942
                            { // When sorting 'updated', we want to use the
939
                            { // When sorting 'updated', we want to use the
943
                              // unformatted column
940
                              // unformatted column
944
                              'aTargets': [ 'updated_formatted'],
941
                              'aTargets': [ 'updated_formatted'],
945
                              'iDataSort': 9
942
                              'iDataSort': 18
946
                            },
943
                            },
947
                            {
944
                            {
948
                              'aTargets': [ 'patron_cardnumber' ],
945
                              'aTargets': [ 'patron_cardnumber' ],
Lines 950-956 Link Here
950
                              'bSearchable': true
947
                              'bSearchable': true
951
                            }
948
                            }
952
                        ],
949
                        ],
953
                        'aaSorting': [[ 9, 'desc' ]], // Default sort, updated descending
950
                        'aaSorting': [[ 18, 'desc' ]], // Default sort, updated descending
954
                        'processing': true, // Display a message when manipulating
951
                        'processing': true, // Display a message when manipulating
955
                        'sPaginationType': "full_numbers", // Pagination display
952
                        'sPaginationType': "full_numbers", // Pagination display
956
                        'deferRender': true, // Improve performance on big datasets
953
                        'deferRender': true, // Improve performance on big datasets
Lines 981-988 Link Here
981
                        var placedEnd = $('#illfilter_dateplaced_end').datepicker('getDate');
978
                        var placedEnd = $('#illfilter_dateplaced_end').datepicker('getDate');
982
                        var modifiedStart = $('#illfilter_datemodified_start').datepicker('getDate');
979
                        var modifiedStart = $('#illfilter_datemodified_start').datepicker('getDate');
983
                        var modifiedEnd = $('#illfilter_datemodified_end').datepicker('getDate');
980
                        var modifiedEnd = $('#illfilter_datemodified_end').datepicker('getDate');
984
                        var rowPlaced = data[6] ? new Date(data[6]) : null;
981
                        var rowPlaced = data[16] ? new Date(data[16]) : null;
985
                        var rowModified = data[8] ? new Date(data[8]) : null;
982
                        var rowModified = data[18] ? new Date(data[18]) : null;
986
                        var placedPassed = true;
983
                        var placedPassed = true;
987
                        var modifiedPassed = true;
984
                        var modifiedPassed = true;
988
                        if (placedStart && rowPlaced && rowPlaced < placedStart) {
985
                        if (placedStart && rowPlaced && rowPlaced < placedStart) {
Lines 1006-1012 Link Here
1006
            );
1003
            );
1007
1004
1008
            var clearSearch = function() {
1005
            var clearSearch = function() {
1009
                table.search('').columns().search('');
1006
                table.api().search('').columns().search('');
1010
                activeFilters = {};
1007
                activeFilters = {};
1011
                for (var filter in filterable) {
1008
                for (var filter in filterable) {
1012
                    if (
1009
                    if (
Lines 1016-1022 Link Here
1016
                        filterable[filter].clear();
1013
                        filterable[filter].clear();
1017
                    }
1014
                    }
1018
                }
1015
                }
1019
                table.draw();
1016
                table.api().draw();
1020
            };
1017
            };
1021
1018
1022
            // Apply any search filters, or clear any previous
1019
            // Apply any search filters, or clear any previous
Lines 1029-1035 Link Here
1029
                        activeFilters[active]();
1026
                        activeFilters[active]();
1030
                    }
1027
                    }
1031
                }
1028
                }
1032
                table.draw();
1029
                table.api().draw();
1033
            });
1030
            });
1034
1031
1035
            // Clear all filters
1032
            // Clear all filters
1036
- 

Return to bug 21063