Lines 332-337
Link Here
|
332 |
<span>Other holdings ([% other_holdings_count || 0 | html %])</span> |
332 |
<span>Other holdings ([% other_holdings_count || 0 | html %])</span> |
333 |
[% END %] |
333 |
[% END %] |
334 |
[% END %] |
334 |
[% END %] |
|
|
335 |
[% IF group_holdings_count %] |
336 |
[% WRAPPER tab_item tabname= "group_holdings" %] |
337 |
<span>Group holdings ([% group_holdings_count || 0 | html %])</span> |
338 |
[% END %] |
339 |
[% END %] |
335 |
[% ELSE %] |
340 |
[% ELSE %] |
336 |
[% WRAPPER tab_item tabname= "holdings" %] |
341 |
[% WRAPPER tab_item tabname= "holdings" %] |
337 |
<span>Holdings ([% items_to_display_count || 0 | html %])</span> |
342 |
<span>Holdings ([% items_to_display_count || 0 | html %])</span> |
Lines 472-477
Link Here
|
472 |
[% END # /tab_panel %] |
477 |
[% END # /tab_panel %] |
473 |
|
478 |
|
474 |
[% IF Koha.Preference('SeparateHoldings') %] |
479 |
[% IF Koha.Preference('SeparateHoldings') %] |
|
|
480 |
[% WRAPPER tab_panel tabname="group_holdings" %] |
481 |
[% PROCESS items_table tab="group_holdings" %] |
482 |
[% END #/tab_panel %] |
475 |
[% WRAPPER tab_panel tabname="otherholdings" %] |
483 |
[% WRAPPER tab_panel tabname="otherholdings" %] |
476 |
[% PROCESS items_table tab="otherholdings" %] |
484 |
[% PROCESS items_table tab="otherholdings" %] |
477 |
[% END # /tab_panel %] |
485 |
[% END # /tab_panel %] |
Lines 2079-2084
Link Here
|
2079 |
// End bundle handling |
2087 |
// End bundle handling |
2080 |
[% END # /IF bundlesEnabled %] |
2088 |
[% END # /IF bundlesEnabled %] |
2081 |
|
2089 |
|
|
|
2090 |
let items_tab_ids = [ 'holdings', 'otherholdings', 'group_holdings' ]; |
2091 |
items_tab_ids.forEach( function( tab_id, index ) { |
2092 |
|
2093 |
// Early return if the tab is not shown (ie. no table) |
2094 |
if (!$("#%s-tab".format(tab_id)).length) return; |
2095 |
[% IF Koha.Preference('AlwaysShowHoldingsTableFilters') %] |
2096 |
build_items_table(tab_id, true, {}, build_items_table_drawncallback); |
2097 |
[% ELSE %] |
2098 |
build_items_table(tab_id, false, {}, build_items_table_drawncallback); |
2099 |
[% END %] |
2100 |
|
2101 |
[% IF bundlesEnabled %] |
2102 |
// Add event listener for opening and closing bundle details |
2103 |
$('#' + tab_id + '_table tbody').on('click', 'button.details-control', function () { |
2104 |
var button = $(this); |
2105 |
var tr = button.closest('tr'); |
2106 |
var dTable = button.closest('table').DataTable({ 'retrieve': true }); |
2107 |
|
2108 |
let row = dTable.row( tr ); |
2109 |
let data = row.data(); |
2110 |
let itemnumber = data.item_id; |
2111 |
let duedate = (data.checkout&&data.checkout.due_date) || null; |
2112 |
|
2113 |
if ( row.child.isShown() ) { |
2114 |
// This row is already open - close it |
2115 |
row.child.hide(); |
2116 |
tr.removeClass('shown'); |
2117 |
button.removeClass('active'); |
2118 |
} else { |
2119 |
// Open this row |
2120 |
createChild(row, itemnumber, duedate); |
2121 |
tr.addClass('shown'); |
2122 |
button.addClass('active'); |
2123 |
} |
2124 |
}); |
2125 |
[% END # /IF bundlesEnabled %] |
2126 |
}); |
2127 |
|
2082 |
[% IF Koha.Preference('AcquisitionDetails') %] |
2128 |
[% IF Koha.Preference('AcquisitionDetails') %] |
2083 |
var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %]; |
2129 |
var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %]; |
2084 |
var acquisitiondetails_table = $("#orders").kohaTable( |
2130 |
var acquisitiondetails_table = $("#orders").kohaTable( |
2085 |
- |
|
|