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

(-)a/admin/marc-overlay-rules.pl (-1 / +1 lines)
Lines 133-139 elsif ($op eq 'doedit' || $op eq 'add') { Link Here
133
}
133
}
134
134
135
my $categories = Koha::Patron::Categories->search_with_library_limits( {},
135
my $categories = Koha::Patron::Categories->search_with_library_limits( {},
136
    { order_by => ['description'] } )->unblessed;
136
    { order_by => ['description'], columns => [ 'categorycode', 'description' ] } )->unblessed;
137
137
138
$template->param(
138
$template->param(
139
    rules      => $rules,
139
    rules      => $rules,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt (-1 / +2 lines)
Lines 456-461 Link Here
456
        });
456
        });
457
457
458
        var categories = [% To.json( categories ) | $raw %];
458
        var categories = [% To.json( categories ) | $raw %];
459
        // Add * => * to this array of objects, and *reduce* it to one object
460
        // Note: This allows displaying a sorted list of categories later, but we still depend on an object!
459
        categories.unshift({ categorycode: '*', description: '*'});
461
        categories.unshift({ categorycode: '*', description: '*'});
460
        categories = categories.reduce( ( a,c ) => ( { ...a, [c.categorycode]: c.description } ), {} );
462
        categories = categories.reduce( ( a,c ) => ( { ...a, [c.categorycode]: c.description } ), {} );
461
463
462
- 

Return to bug 33335