When Koha renders the table of funds and subfunds for the acq homepage and the funds page in Administration, it inserts a little triangle button next to each parent fund that can be used to collapse the associated sub-funds. However, it only inserts these little buttons for parent funds within the first 20 funds returned. Beyond the 20th fund, all funds & subfunds and listed correctly but the triangle button isn't offered and subfunds cannot be collapsed. This page defaults to 20 entries per page and it looks like we're only inserting collapse buttons for what's shown at page load. If one adjusts the table to show only 10 entries, the 11th-20th parent funds will still show their collapse button successfully, but changing the number of entries to show doesn't reload the page. To recreate: - Have 20 funds, no subfunds - Add a subfund to the first fund in your list - see that the parent fund has a little triangle you can use to collapse its subfund - note that this has pushed the last fund in your list onto a second page - add a subfund to the last fund in your list - confirm this parent fund on does *not* get a little triangle button and you cannot collapse it
Created attachment 188199 [details] [review] Bug 40988: Remove pagination for funds on acqui home As well as the fund list view (admin/aqbudgets.pl)
I've tried many things to fix this problem, even using another tree table plugin (https://github.com/reside-ic/TreeTables - which works great btw). But finally noticed that we might now want the pagination at all? Can you confirm? If we remove pagination then the expand/collapse icons work for all budgets/funds.
(In reply to Jonathan Druart from comment #2) > I've tried many things to fix this problem, even using another tree table > plugin (https://github.com/reside-ic/TreeTables - which works great btw). > But finally noticed that we might now want the pagination at all? Can you > confirm? > > If we remove pagination then the expand/collapse icons work for all > budgets/funds. Removing pagination would be great for libraries with a moderate number of funds, but would result in slow pages loads for libraries with a lot of funds and orders. Our preferred course here would be to get collapse/expand functionality working across paginated funds and then file a new bug to get this table to allow configuration of how many rows to show by default.
It's currently paginate client-side, this patch shouldn't impact performance significantly.
Created attachment 188592 [details] [review] Bug 40988: Remove pagination for funds on acqui home As well as the fund list view (admin/aqbudgets.pl) Signed-off-by: Sarah Berry <sberry@pascolibraries.org>
Created attachment 188593 [details] [review] Bug 40988: Remove pagination for funds on acqui home As well as the fund list view (admin/aqbudgets.pl) Signed-off-by: Sarah Berry <sberry@pascolibraries.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Nice work everyone! Pushed to main for 25.11