|
Lines 2492-2497
Link Here
|
| 2492 |
}); |
2492 |
}); |
| 2493 |
[% END %] |
2493 |
[% END %] |
| 2494 |
|
2494 |
|
|
|
2495 |
const can_edit_items_from = [% To.json(can_edit_items_from) | $raw %]; |
| 2496 |
const item_type_image_locations = [% To.json(item_type_image_locations) | $raw %]; |
| 2495 |
let table_url = "/api/v1/biblios/[% biblio.biblionumber | uri %]/items?"; |
2497 |
let table_url = "/api/v1/biblios/[% biblio.biblionumber | uri %]/items?"; |
| 2496 |
var items_table = $("#table_items").kohaTable({ |
2498 |
var items_table = $("#table_items").kohaTable({ |
| 2497 |
ajax: { url: table_url }, |
2499 |
ajax: { url: table_url }, |
|
Lines 2529-2535
Link Here
|
| 2529 |
searchable: true, |
2531 |
searchable: true, |
| 2530 |
orderable: true, |
2532 |
orderable: true, |
| 2531 |
render: function (data, type, row, meta) { |
2533 |
render: function (data, type, row, meta) { |
| 2532 |
return row._strings.item_type_id.str; // FIXME Display the image |
2534 |
let node = ''; |
|
|
2535 |
[% UNLESS noItemTypeImages %] |
| 2536 |
let image_location = item_type_image_locations[row.item_type_id]; |
| 2537 |
let item_type_description = row._strings.item_type_id.str; |
| 2538 |
node += image_location |
| 2539 |
? '<img src="%s" alt="%s" title="%s" /> '.format(image_location, item_type_description, item_type_description) |
| 2540 |
: ''; |
| 2541 |
[% END %] |
| 2542 |
node += '<span class="itypedesc itypetext">%s</span>'.format(item_type_description); |
| 2543 |
return node; |
| 2533 |
} |
2544 |
} |
| 2534 |
}, |
2545 |
}, |
| 2535 |
[% END %] |
2546 |
[% END %] |
| 2536 |
- |
|
|