Lines 16-21
Link Here
|
16 |
[% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %] |
16 |
[% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %] |
17 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
17 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
18 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
18 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
|
|
19 |
[% IF Koha.Preference('StaffLocationOnDetail') == 'column' %] |
20 |
<th id="[% tab | html %]_shelvingloction" data-colname="[% tab | html %]_shelvinglocation">Shelving location</th> |
21 |
[% END %] |
19 |
<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th> |
22 |
<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th> |
20 |
[% IF Koha.Preference('EnableItemGroups') %] |
23 |
[% IF Koha.Preference('EnableItemGroups') %] |
21 |
<th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th> |
24 |
<th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th> |
Lines 377-383
Link Here
|
377 |
searchable: true, |
380 |
searchable: true, |
378 |
orderable: true, |
381 |
orderable: true, |
379 |
render: function (data, type, row, meta) { |
382 |
render: function (data, type, row, meta) { |
380 |
return escape_str(row._strings.holding_library_id ? row._strings.holding_library_id.str : row.holding_library_id); |
383 |
let nodes = '<span class="holdingbranchdesc">%s</span>'.format(escape_str(row._strings.holding_library_id.str)); |
|
|
384 |
[% IF ( Koha.Preference('StaffLocationOnDetail') == 'home' || Koha.Preference('StaffLocationOnDetail') == 'both' ) %] |
385 |
nodes += '<span class="shelvingloc">' |
386 |
[%# If permanent location is defined, show description or code and %] |
387 |
[%# display current location in parentheses. If not, display current location. %] |
388 |
[%# Note that permanent location is a code, and location may be an authval. %] |
389 |
let loc_str = row._strings.location.str; |
390 |
if ( row.permanent_location && row.permanent_location != row.location ) { |
391 |
let permanent_loc_str = av_loc.get(row.permanent_location); |
392 |
nodes += '%s (%s)'.format(escape_str(permanent_loc_str), escape_str(loc_str)); |
393 |
} else { |
394 |
nodes += escape_str(loc_str); |
395 |
} |
396 |
[% END %] |
397 |
nodes += '</span>'; |
398 |
return nodes; |
381 |
} |
399 |
} |
382 |
}, |
400 |
}, |
383 |
{ |
401 |
{ |
Lines 386-407
Link Here
|
386 |
searchable: true, |
404 |
searchable: true, |
387 |
orderable: true, |
405 |
orderable: true, |
388 |
render: function (data, type, row, meta) { |
406 |
render: function (data, type, row, meta) { |
389 |
let nodes = '<span class="homebranchdesc">%s</span>'.format(escape_str(row._strings.home_library_id ? row._strings.home_library_id.str : row.home_library_id)); |
407 |
let nodes = '<span class="homebranchdesc">%s</span>'.format(escape_str(row._strings.home_library_id.str)); |
390 |
nodes += '<span class="shelvingloc">' |
408 |
[% IF ( Koha.Preference('StaffLocationOnDetail') == 'home' || Koha.Preference('StaffLocationOnDetail') == 'both' ) %] |
391 |
[%# If permanent location is defined, show description or code and %] |
409 |
nodes += '<span class="shelvingloc">' |
392 |
[%# display current location in parentheses. If not, display current location. %] |
410 |
let loc_str = row._strings.location.str; |
393 |
[%# Note that permanent location is a code, and location may be an authval. %] |
411 |
if ( row.permanent_location && row.permanent_location != row.location ) { |
394 |
let loc_str = row._strings.location ? row._strings.location.str : row.location; |
412 |
let permanent_loc_str = av_loc.get(row.permanent_location); |
395 |
if ( row.permanent_location && row.permanent_location != row.location ) { |
413 |
nodes += '%s (%s)'.format(escape_str(permanent_loc_str), escape_str(loc_str)); |
396 |
let permanent_loc_str = av_loc.get(row.permanent_location); |
414 |
} else { |
397 |
nodes += '%s (%s)'.format(escape_str(permanent_loc_str), escape_str(loc_str)); |
415 |
nodes += escape_str(loc_str); |
398 |
} else { |
416 |
} |
399 |
nodes += escape_str(loc_str); |
417 |
[% END %] |
400 |
} |
|
|
401 |
nodes += '</span>'; |
418 |
nodes += '</span>'; |
402 |
return nodes; |
419 |
return nodes; |
403 |
} |
420 |
} |
404 |
}, |
421 |
}, |
|
|
422 |
[% IF Koha.Preference('StaffLocationOnDetail') == 'column' %] |
423 |
{ |
424 |
data: "me.location", |
425 |
searchable: true, |
426 |
orderable: true, |
427 |
render: function (data, type, row, meta) { |
428 |
return escape_str(row._strings.collection_code.str); |
429 |
} |
430 |
}, |
431 |
[% END %] |
405 |
{ |
432 |
{ |
406 |
data: "me.collection_code", |
433 |
data: "me.collection_code", |
407 |
searchable: true, |
434 |
searchable: true, |