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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-2 / +2 lines)
Lines 1326-1332 Link Here
1326
                    let suggestionData = [% To.json(suggestions) | $raw %];
1326
                    let suggestionData = [% To.json(suggestions) | $raw %];
1327
                    var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
1327
                    var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
1328
                    function loadDatatable(tabName) {
1328
                    function loadDatatable(tabName) {
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
                                sorting: [[4, "asc"]],
Lines 1479-1485 Link Here
1479
                                    {
1479
                                    {
1480
                                        data: "status",
1480
                                        data: "status",
1481
                                        searchable: false,
1481
                                        searchable: false,
1482
                                        orderable: false,
1482
                                        orderable: true,
1483
                                        render: function (data, type, row, meta) {
1483
                                        render: function (data, type, row, meta) {
1484
                                            if(row.status === 'ASKED') return '<span>%s</span>'.format(_("Pending"));
1484
                                            if(row.status === 'ASKED') return '<span>%s</span>'.format(_("Pending"));
1485
                                            if(row.status === 'ACCEPTED') return '<span>%s</span>'.format(_("Accepted"));
1485
                                            if(row.status === 'ACCEPTED') return '<span>%s</span>'.format(_("Accepted"));
(-)a/suggestion/suggestion.pl (-4 / +10 lines)
Lines 456-469 if ( $op eq 'else' ) { Link Here
456
            || $search_params->{$f} eq '';
456
            || $search_params->{$f} eq '';
457
    }
457
    }
458
    for my $bi (qw (title author isbn publishercode copyrightdate collectiontitle)) {
458
    for my $bi (qw (title author isbn publishercode copyrightdate collectiontitle)) {
459
        $search_params->{$bi} = { 'LIKE' => "%" . $search_params->{$bi} . "%" } if $search_params->{$bi};
459
        if ( $search_params->{$bi} ) {
460
            $search_params->{"me.$bi"} = { 'like' => "%" . $search_params->{$bi} . "%" };
461
            delete $search_params->{$bi};
462
        }
460
    }
463
    }
461
464
462
    $search_params->{archived} = 0 if !$filter_archived;
465
    $search_params->{archived} = 0 if !$filter_archived;
463
    foreach my $key ( keys %$search_params ) {
466
    foreach my $key ( keys %$search_params ) {
464
        if ( $key eq 'branchcode' ) {
467
        if ( $key eq 'branchcode' ) {
465
            my $branch_param = delete $search_params->{$key};
468
            if ( $displayby ne 'branchcode' ) {
466
            $search_params->{"me.branchcode"} = $branch_param;
469
                my $branch_param = delete $search_params->{$key};
470
                $search_params->{"me.branchcode"} = $branch_param;
471
            } else {
472
                delete $search_params->{$key};
473
            }
467
        }
474
        }
468
    }
475
    }
469
476
470
- 

Return to bug 33430