Lines 1857-1870
Link Here
|
1857 |
|
1857 |
|
1858 |
[% IF bundlesEnabled %] |
1858 |
[% IF bundlesEnabled %] |
1859 |
// Add event listener for opening and closing bundle details |
1859 |
// Add event listener for opening and closing bundle details |
1860 |
$('#' + table_name + ' tbody').on('click', 'button.details-control', function () { |
1860 |
$('#' + tab_id + '_table tbody').on('click', 'button.details-control', function () { |
1861 |
var button = $(this); |
1861 |
var button = $(this); |
1862 |
var tr = button.closest('tr'); |
1862 |
var tr = button.closest('tr'); |
1863 |
var dTable = button.closest('table').DataTable({ 'retrieve': true }); |
1863 |
var dTable = button.closest('table').DataTable({ 'retrieve': true }); |
1864 |
|
1864 |
|
1865 |
var itemnumber = tr.data('itemnumber'); |
1865 |
let row = dTable.row( tr ); |
1866 |
var duedate = tr.data('duedate'); |
1866 |
let data = row.data(); |
1867 |
var row = dTable.row( tr ); |
1867 |
let itemnumber = data.item_id; |
|
|
1868 |
let duedate = (data.checkout&&data.checkout.due_date) || null; |
1868 |
|
1869 |
|
1869 |
if ( row.child.isShown() ) { |
1870 |
if ( row.child.isShown() ) { |
1870 |
// This row is already open - close it |
1871 |
// This row is already open - close it |
Lines 2186-2192
Link Here
|
2186 |
[% IF Koha.Preference('UseRecalls') %] |
2187 |
[% IF Koha.Preference('UseRecalls') %] |
2187 |
embed.push('recall', 'recall+strings', 'recall.patron') |
2188 |
embed.push('recall', 'recall+strings', 'recall.patron') |
2188 |
[% END %] |
2189 |
[% END %] |
2189 |
embed.push('in_bundle', 'bundle_host'); |
2190 |
[% IF bundlesEnabled %] |
|
|
2191 |
embed.push('in_bundle', 'bundle_host', 'bundle_items_lost+count', 'bundle_items_not_lost+count'); |
2192 |
[% END %] |
2190 |
[% IF Koha.Preference('UseCourseReserves') %] |
2193 |
[% IF Koha.Preference('UseCourseReserves') %] |
2191 |
embed.push('course_item.course_reserves.course'); |
2194 |
embed.push('course_item.course_reserves.course'); |
2192 |
[% END %] |
2195 |
[% END %] |
Lines 2460-2468
Link Here
|
2460 |
nodes += '<span class="restricted">(%s)</span>'.format(escape_str(av_restricted.get(row.restricted_status.toString()))); |
2463 |
nodes += '<span class="restricted">(%s)</span>'.format(escape_str(av_restricted.get(row.restricted_status.toString()))); |
2461 |
} |
2464 |
} |
2462 |
|
2465 |
|
2463 |
if ( row.in_bundle ) { |
2466 |
[% IF bundlesEnabled %] |
2464 |
nodes += '<span class="bundled">%s</span>'.format(_("In bundle: %s").format($biblio_to_html(row.bundle_host.biblio, { link: true }))); |
2467 |
if ( row.in_bundle ) { |
2465 |
} |
2468 |
nodes += '<span class="bundled">%s</span>'.format(_("In bundle: %s").format($biblio_to_html(row.bundle_host.biblio, { link: true }))); |
|
|
2469 |
} |
2470 |
[% END %] |
2466 |
return nodes; |
2471 |
return nodes; |
2467 |
} |
2472 |
} |
2468 |
}, |
2473 |
}, |
Lines 2659-2665
Link Here
|
2659 |
} |
2664 |
} |
2660 |
[% IF bundlesEnabled %] |
2665 |
[% IF bundlesEnabled %] |
2661 |
// FIXME How do we handle that correctly? |
2666 |
// FIXME How do we handle that correctly? |
2662 |
//nodes += '<button class="btn btn-default btn-xs details-control"><i class="fa fa-folder"></i> Manage bundle (%s|%s)</button>'.format(escape_str(row.bundled), escape_str(row.bundled_lost)); |
2667 |
nodes += '<button class="btn btn-default btn-xs details-control"><i class="fa fa-folder"></i> Manage bundle (%s|%s)</button>'.format(escape_str(row.bundle_items_not_lost_count), escape_str(row.bundle_items_lost_count)); |
2663 |
[% END %] |
2668 |
[% END %] |
2664 |
|
2669 |
|
2665 |
return nodes; |
2670 |
return nodes; |
2666 |
- |
|
|