|
Lines 410-437
Link Here
|
| 410 |
orderable: true, |
410 |
orderable: true, |
| 411 |
[% END %] |
411 |
[% END %] |
| 412 |
render: function (data, type, row, meta) { |
412 |
render: function (data, type, row, meta) { |
| 413 |
let node = ''; |
413 |
let nodes = ""; |
| 414 |
[% IF Koha.Preference('UseDisplayModule') %] |
414 |
let effective_item_type_id_str = row._strings.effective_item_type_id ? row._strings.effective_item_type_id.str : row.effective_item_type_id; |
| 415 |
let effective_item_type_description = row._strings.effective_item_type_id ? row._strings.effective_item_type_id.str : row.effective_item_type_id; |
415 |
let item_type_id_str = row._strings.item_type_id ? row._strings.item_type_id.str : row.item_type_id; |
|
|
416 |
|
| 417 |
let image_location = item_type_image_locations[row.effective_item_type_id]; |
| 416 |
[% UNLESS noItemTypeImages %] |
418 |
[% UNLESS noItemTypeImages %] |
| 417 |
let image_location = item_type_image_locations[row.effective_item_type_id]; |
419 |
nodes += image_location |
| 418 |
node += image_location |
420 |
? '<img class="itemtype-image" src="%s" alt="" /> '.format(escape_str(image_location), escape_str(effective_item_type_id_str), escape_str(effective_item_type_id_str)) |
| 419 |
? '<img class="itemtype-image" src="%s" alt="" /> '.format(escape_str(image_location), escape_str(effective_item_type_description), escape_str(effective_item_type_description)) |
|
|
| 420 |
: ''; |
421 |
: ''; |
| 421 |
[% END %] |
422 |
[% END %] |
| 422 |
node += '<span class="itypedesc itypetext">%s</span>'.format(escape_str(effective_item_type_description)); |
423 |
|
|
|
424 |
[% IF Koha.Preference('UseDisplayModule') %] |
| 425 |
if (item_type_id_str != effective_item_type_id_str) { |
| 426 |
nodes += '<a href="javascript:void(0)" onClick="handlePermanentLocation(this)" data-header="' + _("Permanent item type") + '" data-body="' + item_type_id_str + '">'; |
| 427 |
nodes += ' <i class="fa fa-info-circle" aria-hidden="true"></i>'; |
| 428 |
nodes += ' ' + escape_str(effective_item_type_id_str || ''); |
| 429 |
nodes += '</a> '; |
| 430 |
} else { |
| 431 |
nodes += escape_str(effective_item_type_id_str || ''); |
| 432 |
} |
| 423 |
[% ELSE %] |
433 |
[% ELSE %] |
| 424 |
let item_type_description = row._strings.item_type_id ? row._strings.item_type_id.str : row.item_type_id; |
434 |
nodes += escape_str(effective_item_type_id_str || ''); |
| 425 |
[% UNLESS noItemTypeImages %] |
|
|
| 426 |
let image_location = item_type_image_locations[row.item_type_id]; |
| 427 |
node += image_location |
| 428 |
? '<img class="itemtype-image" src="%s" alt="" /> '.format(escape_str(image_location), escape_str(item_type_description), escape_str(item_type_description)) |
| 429 |
: ''; |
| 430 |
[% END %] |
| 431 |
node += '<span class="itypedesc itypetext">%s</span>'.format(escape_str(item_type_description)); |
| 432 |
[% END %] |
435 |
[% END %] |
| 433 |
|
436 |
|
| 434 |
return node; |
437 |
nodes = '<span class="itypedesc itypetext">' + nodes + '</span>'; |
|
|
438 |
return nodes; |
| 435 |
} |
439 |
} |
| 436 |
}, |
440 |
}, |
| 437 |
[% END %] |
441 |
[% END %] |
| 438 |
- |
|
|