Lines 190-196
Link Here
|
190 |
}); |
190 |
}); |
191 |
const item_types_notforloan = new Map(all_item_types.map( it => [it.itemtype, it.notforloan] )); |
191 |
const item_types_notforloan = new Map(all_item_types.map( it => [it.itemtype, it.notforloan] )); |
192 |
|
192 |
|
193 |
const can_edit_items_from = [% To.json(can_edit_items_from || {}) | $raw %]; |
193 |
const can_edit_items_from = [% To.json(can_edit_items_from || []) | $raw %]; |
194 |
const item_type_image_locations = [% To.json(item_type_image_locations) | $raw %]; |
194 |
const item_type_image_locations = [% To.json(item_type_image_locations) | $raw %]; |
195 |
const av_loc = new Map([% To.json(AuthorisedValues.Get('LOC')) | $raw %].map( av => [av.authorised_value, av.lib])); |
195 |
const av_loc = new Map([% To.json(AuthorisedValues.Get('LOC')) | $raw %].map( av => [av.authorised_value, av.lib])); |
196 |
const av_lost = new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.itemlost' })) | $raw %].map( av => [av.authorised_value, av.lib])); |
196 |
const av_lost = new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.itemlost' })) | $raw %].map( av => [av.authorised_value, av.lib])); |
Lines 300-306
Link Here
|
300 |
searchable: false, |
300 |
searchable: false, |
301 |
orderable: false, |
301 |
orderable: false, |
302 |
render: function (data, type, row, meta) { |
302 |
render: function (data, type, row, meta) { |
303 |
if ( can_edit_items_from[row.holding_library_id] ){ |
303 |
if ( can_edit_items_from.includes(row.home_library_id) || !can_edit_items_from.length ){ |
304 |
if ( items_selection[tab_id].includes(row.item_id) ) { |
304 |
if ( items_selection[tab_id].includes(row.item_id) ) { |
305 |
return '<input type="checkbox" value="%s" name="itemnumber" checked />'.format(row.item_id); |
305 |
return '<input type="checkbox" value="%s" name="itemnumber" checked />'.format(row.item_id); |
306 |
} else { |
306 |
} else { |
Lines 752-758
Link Here
|
752 |
{ |
752 |
{ |
753 |
data: function( row, type, val, meta ) { |
753 |
data: function( row, type, val, meta ) { |
754 |
let nodes = ''; |
754 |
let nodes = ''; |
755 |
if ( can_edit_items_from[row.holding_library_id] ){ |
755 |
if ( can_edit_items_from.includes(row.home_library_id) || !can_edit_items_from.length ){ |
756 |
[% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %] |
756 |
[% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %] |
757 |
nodes += '<div class="btn-group">'; |
757 |
nodes += '<div class="btn-group">'; |
758 |
nodes += ' <a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=%s&itemnumber=%s#edititem"><i class="fa-solid fa-pencil"></i> %s</a><a class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>'.format(row.biblio_id, row.item_id, _("Edit")); |
758 |
nodes += ' <a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=%s&itemnumber=%s#edititem"><i class="fa-solid fa-pencil"></i> %s</a><a class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>'.format(row.biblio_id, row.item_id, _("Edit")); |
759 |
- |
|
|