@@ -, +, @@ circulation.pl the table click on it each one numbers are correct --- koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 15 +++++++++++++++ koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 19 ++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -385,6 +385,21 @@ legend { width: auto; } +details > summary { + cursor: pointer; +} + +details > summary::before { + content: "\f0da"; + display: inline-block; + font-family: FontAwesome; + width: 1em; +} + +details[open] > summary::before { + content: "\f0d7"; +} + #floating-save { background-color: rgba(185, 216, 217, 0.6); bottom: 3%; --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -475,7 +475,7 @@ $(document).ready(function() { fnCallback(json) } ); }, - "fnInitComplete": function(oSettings) { + "fnInitComplete": function(oSettings, json) { // Disable rowGrouping plugin after first use // so any sorting on the table doesn't use it var oSettings = issuesTable.fnSettings(); @@ -488,6 +488,23 @@ $(document).ready(function() { } oSettings.aaSortingFixed = null; + + // Build a summary of checkouts grouped by itemtype + var checkoutsByItype = json.aaData.reduce(function (obj, row) { + obj[row.itemtype_description] = (obj[row.itemtype_description] || 0) + 1; + return obj; + }, {}); + var ul = $('