Lines 6-11
Link Here
|
6 |
[% USE raw %] |
6 |
[% USE raw %] |
7 |
[% USE Asset %] |
7 |
[% USE Asset %] |
8 |
[% USE To %] |
8 |
[% USE To %] |
|
|
9 |
[% USE AuthorisedValues %] |
9 |
|
10 |
|
10 |
[% SET search_results_block_id = 'searchresults' %] |
11 |
[% SET search_results_block_id = 'searchresults' %] |
11 |
|
12 |
|
Lines 314-319
Link Here
|
314 |
[% CASE %] |
315 |
[% CASE %] |
315 |
let patron_search_url = '/api/v1/patrons'; |
316 |
let patron_search_url = '/api/v1/patrons'; |
316 |
[% END %] |
317 |
[% END %] |
|
|
318 |
|
319 |
const av_bsort1= new Map([% To.json(AuthorisedValues.Get('Bsort1')) | $raw %].map( av => [av.authorised_value, av.lib])); |
320 |
const av_bsort2= new Map([% To.json(AuthorisedValues.Get('Bsort2')) | $raw %].map( av => [av.authorised_value, av.lib])); |
321 |
|
317 |
$(document).ready(function(){ |
322 |
$(document).ready(function(){ |
318 |
|
323 |
|
319 |
let parent_block = $("#[% search_results_block_id | html %]"); |
324 |
let parent_block = $("#[% search_results_block_id | html %]"); |
Lines 629-635
Link Here
|
629 |
"searchable": true, |
634 |
"searchable": true, |
630 |
"orderable": true, |
635 |
"orderable": true, |
631 |
"render": function( data, type, row, meta ) { |
636 |
"render": function( data, type, row, meta ) { |
632 |
return escape_str(data); |
637 |
let bsort1_lib = av_bsort1.get( data.toString() ) || data; |
|
|
638 |
return escape_str( bsort1_lib ); |
633 |
} |
639 |
} |
634 |
} |
640 |
} |
635 |
|
641 |
|
Lines 639-645
Link Here
|
639 |
"searchable": true, |
645 |
"searchable": true, |
640 |
"orderable": true, |
646 |
"orderable": true, |
641 |
"render": function( data, type, row, meta ) { |
647 |
"render": function( data, type, row, meta ) { |
642 |
return escape_str(data); |
648 |
let bsort2_lib = av_bsort2.get( data.toString() ) || data; |
|
|
649 |
return escape_str( bsort2_lib ); |
643 |
} |
650 |
} |
644 |
} |
651 |
} |
645 |
|
652 |
|
646 |
- |
|
|