Lines 315-333
function build_itemst(show_filters, dt_options) {
Link Here
|
315 |
if (can_be_edited) { |
315 |
if (can_be_edited) { |
316 |
nodes += '<td>' |
316 |
nodes += '<td>' |
317 |
nodes += '<div class="btn-group dropup">'; |
317 |
nodes += '<div class="btn-group dropup">'; |
318 |
nodes += '<a class="btn btn-default btn-xs dropdown-toggle" id="itemactions' + row.item_id + '" role="button" data-toggle="dropdown" href="#">'; |
318 |
nodes += '<a class="btn btn-default btn-xs dropdown-toggle" id="itemactions' + row.item_id + '" role="button" data-bs-toggle="dropdown" href="#">'; |
319 |
nodes += 'Actions <b class="caret"></b>'; |
319 |
nodes += 'Actions <b class="caret"></b>'; |
320 |
nodes += '</a>'; |
320 |
nodes += '</a>'; |
321 |
nodes += '<ul class="dropdown-menu" role="menu" aria-labelledby="itemactions' + row.item_id + '">'; |
321 |
nodes += '<ul class="dropdown-menu" role="menu" aria-labelledby="itemactions' + row.item_id + '">'; |
322 |
if (row.biblio_id != biblionumber) { // Host item |
322 |
if (row.biblio_id != biblionumber) { // Host item |
323 |
nodes += '<li><a href="additem.pl?op=edititem&biblionumber=' + row.biblio_id + '&itemnumber=' + row.item_id + '#edititem">Edit in host</a> <a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&biblionumber=' + row.biblio_id + '&hostitemnumber=' + row.item_id + '&searchid=' + row.searchid + '">Delink</a></li>'; |
323 |
nodes += '<li><a class="dropdown-item" href="additem.pl?op=edititem&biblionumber=' + row.biblio_id + '&itemnumber=' + row.item_id + '#edititem">Edit in host</a> <a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&biblionumber=' + row.biblio_id + '&hostitemnumber=' + row.item_id + '&searchid=' + row.searchid + '">Delink</a></li>'; |
324 |
} else { |
324 |
} else { |
325 |
if (can_edit_items_from.includes(row.home_library_id) || !can_edit_items_from.length) { |
325 |
if (can_edit_items_from.includes(row.home_library_id) || !can_edit_items_from.length) { |
326 |
nodes += '<li><a href="additem.pl?op=edititem&biblionumber=' + row.biblio_id + '&itemnumber=' + row.item_id + '&searchid=' + row.searchid + '#edititem">Edit</a></li>'; |
326 |
nodes += '<li><a class="dropdown-item" href="additem.pl?op=edititem&biblionumber=' + row.biblio_id + '&itemnumber=' + row.item_id + '&searchid=' + row.searchid + '#edititem">Edit</a></li>'; |
327 |
} |
327 |
} |
328 |
nodes += '<li><a href="additem.pl?op=dupeitem&biblionumber=' + row.biblio_id + '&itemnumber=' + row.item_id + '&searchid=' + row.searchid + '#additema">Duplicate</a></li>'; |
328 |
nodes += '<li><a class="dropdown-item" href="additem.pl?op=dupeitem&biblionumber=' + row.biblio_id + '&itemnumber=' + row.item_id + '&searchid=' + row.searchid + '#additema">Duplicate</a></li>'; |
329 |
nodes += '<li class="print_label">'; |
329 |
nodes += '<li class="print_label">'; |
330 |
nodes += '<a class="submit-form-link" target="_blank" href="#" data-op="cud-add" data-number_list="' + row.item_id + '" data-number_type="itemnumber" data-method="post" data-action="/cgi-bin/koha/labels/label-edit-batch.pl" data-new_tab="true">Print label</a>'; |
330 |
nodes += '<a class="dropdown-item submit-form-link" target="_blank" href="#" data-op="cud-add" data-number_list="' + row.item_id + '" data-number_type="itemnumber" data-method="post" data-action="/cgi-bin/koha/labels/label-edit-batch.pl" data-new_tab="true">Print label</a>'; |
331 |
nodes += '</li>'; |
331 |
nodes += '</li>'; |
332 |
if (can_edit_items_from.includes(row.home_library_id) || !can_edit_items_from.length) { |
332 |
if (can_edit_items_from.includes(row.home_library_id) || !can_edit_items_from.length) { |
333 |
let csrfToken = $('meta[name="csrf-token"]').attr('content'); |
333 |
let csrfToken = $('meta[name="csrf-token"]').attr('content'); |
Lines 339-351
function build_itemst(show_filters, dt_options) {
Link Here
|
339 |
nodes += '<input type="hidden" name="itemnumber" value="' + row.item_id + '" />'; |
339 |
nodes += '<input type="hidden" name="itemnumber" value="' + row.item_id + '" />'; |
340 |
nodes += '<input type="hidden" name="searchid" value="' + row.searchid + '" />'; |
340 |
nodes += '<input type="hidden" name="searchid" value="' + row.searchid + '" />'; |
341 |
nodes += '</form>'; |
341 |
nodes += '</form>'; |
342 |
nodes += '<a class="delete" data-item="' + row.item_id + '" href="#">Delete</a>'; |
342 |
nodes += '<a class="dropdown-item delete" data-item="' + row.item_id + '" href="#">Delete</a>'; |
343 |
nodes += '</li>'; |
343 |
nodes += '</li>'; |
344 |
} |
344 |
} |
345 |
} |
345 |
} |
346 |
if ( opac_base_url ) { |
346 |
if ( opac_base_url ) { |
347 |
var href = opac_base_url + "/cgi-bin/koha/opac-detail.pl?biblionumber=" + row.biblio_id; |
347 |
var href = opac_base_url + "/cgi-bin/koha/opac-detail.pl?biblionumber=" + row.biblio_id; |
348 |
nodes+= '<li class="view-in-opac"><a target="_blank" href="' + href + '">OPAC view</a></li>' |
348 |
nodes+= '<li class="view-in-opac"><a class="dropdown-item" target="_blank" href="' + href + '">OPAC view</a></li>' |
349 |
} |
349 |
} |
350 |
nodes += '</ul>'; |
350 |
nodes += '</ul>'; |
351 |
nodes += '</div>'; |
351 |
nodes += '</div>'; |
352 |
- |
|
|