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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-4 / +9 lines)
Lines 6-12 Link Here
6
[% USE raw %]
6
[% USE raw %]
7
[% USE Asset %]
7
[% USE Asset %]
8
[% USE To %]
8
[% USE To %]
9
9
[% USE AuthorisedValues %]
10
[% SET search_results_block_id = 'searchresults' %]
10
[% SET search_results_block_id = 'searchresults' %]
11
11
12
[%# Display a simple form %]
12
[%# Display a simple form %]
Lines 308-313 Link Here
308
        [% CASE %]
308
        [% CASE %]
309
            let patron_search_url = '/api/v1/patrons';
309
            let patron_search_url = '/api/v1/patrons';
310
        [% END %]
310
        [% END %]
311
312
        const av_bsort1= new Map([% To.json(AuthorisedValues.Get('Bsort1')) | $raw %].map( av => [av.authorised_value, av.lib]));
313
        const av_bsort2= new Map([% To.json(AuthorisedValues.Get('Bsort2')) | $raw %].map( av => [av.authorised_value, av.lib]));
314
311
        $(document).ready(function(){
315
        $(document).ready(function(){
312
316
313
            let parent_block = $("#[% search_results_block_id | html %]");
317
            let parent_block = $("#[% search_results_block_id | html %]");
Lines 623-629 Link Here
623
                                "searchable": true,
627
                                "searchable": true,
624
                                "orderable": true,
628
                                "orderable": true,
625
                                "render": function( data, type, row, meta ) {
629
                                "render": function( data, type, row, meta ) {
626
                                    return escape_str(data);
630
                                    let bsort2_lib = av_bsort2.get( data.toString() ) || data;
631
                                    return escape_str( bsort2_lib );
627
                                }
632
                                }
628
                            }
633
                            }
629
634
Lines 633-639 Link Here
633
                                "searchable": true,
638
                                "searchable": true,
634
                                "orderable": true,
639
                                "orderable": true,
635
                                "render": function( data, type, row, meta ) {
640
                                "render": function( data, type, row, meta ) {
636
                                    return escape_str(data);
641
                                    let bsort1_lib = av_bsort1.get( data.toString() ) || data;
642
                                    return escape_str( bsort1_lib );
637
                                }
643
                                }
638
                            }
644
                            }
639
645
640
- 

Return to bug 34608