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

(-)a/admin/marc-overlay-rules.pl (-4 / +6 lines)
Lines 132-142 elsif ($op eq 'doedit' || $op eq 'add') { Link Here
132
    }
132
    }
133
}
133
}
134
134
135
my $categorycodes = Koha::Patron::Categories->search_with_library_limits({}, {order_by => ['description']});
135
my $categories = Koha::Patron::Categories->search_with_library_limits( {},
136
    { order_by => ['description'] } )->unblessed;
137
136
$template->param(
138
$template->param(
137
    rules         => $rules,
139
    rules      => $rules,
138
    categorycodes => $categorycodes,
140
    categories => $categories,
139
    messages      => $errors
141
    messages   => $errors
140
);
142
);
141
143
142
output_html_with_http_headers $input, $cookie, $template->output;
144
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt (-7 / +5 lines)
Lines 1-4 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE To %]
2
[% USE Asset %]
3
[% USE Asset %]
3
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
4
[% USE Koha %]
5
[% USE Koha %]
Lines 454-464 Link Here
454
          }
455
          }
455
        });
456
        });
456
457
457
        var $category = {};
458
        var categories = [% To.json( categories ) | $raw %];
458
459
        categories.unshift({ categorycode: '*', description: '*'});
459
        [% FOR categorycode IN categorycodes %]
460
        categories = categories.reduce( ( a,c ) => ( { ...a, [c.categorycode]: c.description } ), {} );
460
            $category["[% categorycode.categorycode %]"] = "[% categorycode.description | html %]";
461
        [% END %]
462
461
463
        var module_filter_options = {
462
        var module_filter_options = {
464
        source: {
463
        source: {
Lines 471-477 Link Here
471
            import_lexile: _("import_lexile.pl")
470
            import_lexile: _("import_lexile.pl")
472
        },
471
        },
473
472
474
        categorycode: $category
473
            categorycode: categories,
475
        };
474
        };
476
475
477
        //Kind of hack: Replace filter value with label when one exist
476
        //Kind of hack: Replace filter value with label when one exist
478
- 

Return to bug 33335