Created attachment 125831 [details] Screenshot of the proposed change I propose to convert the HTML <select> for choosing the number of report results shown into a Bootstrap dropdown menu. See attached screenshot.
Created attachment 125832 [details] [review] Bug 29186: Move reports result limit menu into toolbar This patch creates a new Bootstrap button menu for selecting the number of search results to be shown. This replaces the HTML <select>. To test, apply the patch and go to Reports -> Saved reports. - Test the appearance and functionality of the "Rows per page" button in various situations: - A report that returns more than 10 results - A report that returns fewer than 10 results - A report that returns no results - Test that the batch operations button menu appears correctly when there are biblionumbers, itemnumbers, or cardnumbers in the results. - When there are no results, or fewer than 10 results with no batch operations possible the toolbar shouldn't appear at all.
Created attachment 125888 [details] [review] Bug 29186: Move reports result limit menu into toolbar This patch creates a new Bootstrap button menu for selecting the number of search results to be shown. This replaces the HTML <select>. To test, apply the patch and go to Reports -> Saved reports. - Test the appearance and functionality of the "Rows per page" button in various situations: - A report that returns more than 10 results - A report that returns fewer than 10 results - A report that returns no results - Test that the batch operations button menu appears correctly when there are biblionumbers, itemnumbers, or cardnumbers in the results. - When there are no results, or fewer than 10 results with no batch operations possible the toolbar shouldn't appear at all. Signed-off-by: George Williams <george@nekls.org> Signed-off-by: George Williams <george@nekls.org>
Tested on BibLibre sandbox. Works per the test plan.
Hi Owen, I am seeing something a little odd here, can you please check? Tested on the standard sample database with a bit below 1000 items: 1) Create a new SQL report: select * from items; 2) Run the report 3) By default, 20 results show on first page. 4) Switch to 1000 5) All results show, but the pull down disappears and you can't switch the setting again.
Created attachment 126044 [details] [review] Bug 29186: (QA follow-up) Correct the check for showing limit menu The template conditional for showing the limit menu should be changed from: [% IF ( unlimited_total > limit ) %] to: [% IF ( unlimited_total >= limit ) %] ...to avoid hiding the menu when there are exactly 1000 results. I have also changed other parts of the template that used the same check.
Hi Owen, I have both patches applied and did a restart_all, but for my sample query (select * from items) I still have the issue that after switching to 1000 results per page, I can't switch back. :( There is also a tiny issue with the results display: Total number of results: 961 . Should we just remove the .?
Created attachment 126672 [details] [review] Bug 29186: (QA follow-up) Correct the check for showing limit menu The template conditional for showing the limit menu should be changed to: [% IF ( unlimited_total > 10 && limit <= 1000 ) %] - "unlimited_total > 10" so that the "rows per page" button only shows if there are more than 10 total results, because 10 is the smallest increment the "rows per page" control offers. - "limit <= 1000" so that the "rows per page" button will show when the current result limit is less than or equal to 1000, because 1000 is the upper limit to the "rows per page" control.
Created attachment 126800 [details] [review] Bug 29186: Move reports result limit menu into toolbar This patch creates a new Bootstrap button menu for selecting the number of search results to be shown. This replaces the HTML <select>. To test, apply the patch and go to Reports -> Saved reports. - Test the appearance and functionality of the "Rows per page" button in various situations: - A report that returns more than 10 results - A report that returns fewer than 10 results - A report that returns no results - Test that the batch operations button menu appears correctly when there are biblionumbers, itemnumbers, or cardnumbers in the results. - When there are no results, or fewer than 10 results with no batch operations possible the toolbar shouldn't appear at all. Signed-off-by: George Williams <george@nekls.org> Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 126801 [details] [review] Bug 29186: (QA follow-up) Correct the check for showing limit menu The template conditional for showing the limit menu should be changed to: [% IF ( unlimited_total > 10 && limit <= 1000 ) %] - "unlimited_total > 10" so that the "rows per page" button only shows if there are more than 10 total results, because 10 is the smallest increment the "rows per page" control offers. - "limit <= 1000" so that the "rows per page" button will show when the current result limit is less than or equal to 1000, because 1000 is the upper limit to the "rows per page" control. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 21.11, thanks to everybody involved!