Datatables on z3950_search.pl will say "Showing 1 to 20 of 20 entries", which makes you think that there are only 20 search results. However, if you scroll to the bottom of the page, you'll often see it saying something like "Showing page 1 of 501". We should hide the "Showing 1 to 20 of 20 entries" datatables information if we're not going to implement a JSON sourced table.
Created attachment 105933 [details] [review] Bug 25777: Disable misleading datatables table information display z3950 This patch disables the table information display on z3950_search.pl, since it only includes search result counts for that page, which is misleading to end users. To test: 1) Do not apply the patch 2) Do a Z39.50 search for "test" against Library of Congress 3) Note the bottom of the page says "Show 1 to 20 of 20" and "Showing page 1 of 501" 4) Apply the patch and restart Plack 5) Repeat Step #2 6) Note the bottom of the page now only says "Showing page 1 of 501"
Should be fixed on other Z3950 search pages as well. I would also remove the search box as it only filter on the first page.
(In reply to Jonathan Druart from comment #2) > Should be fixed on other Z3950 search pages as well. > > I would also remove the search box as it only filter on the first page. Mmm I was wondering about that. Fixed this one a bit too hastily. I'll re-visit it.
Ava, did you mean to take over as Assignee? (I hope you will as I haven't had time for this one.)
(In reply to David Cook from comment #4) > Ava, did you mean to take over as Assignee? > > (I hope you will as I haven't had time for this one.) Yes I did! I was planning on working on it yesterday but I think the Library of Congress was down. If it's up today I will work on it
Created attachment 115626 [details] [review] Bug 25777: Disable misleading datatables table information display z3950 This patch disables the table information display on z3950_search.pl, since it only includes search result counts for that page, which is misleading to end users. To test: 1) Do not apply the patch 2) Do a Z39.50 search for "test" against Library of Congress 3) Note the bottom of the page says "Show 1 to 20 of 20" and "Showing page 1 of 501" 4) Apply the patch and restart Plack 5) Repeat Step #2 6) Note the bottom of the page now only says "Showing page 1 of 501" 7) Note the search bar is gone
Created attachment 115787 [details] [review] Bug 25777: Disable misleading datatables table information display z3950 This patch disables the table information display on z3950_search.pl, since it only includes search result counts for that page, which is misleading to end users. To test: 1) Do not apply the patch 2) Do a Z39.50 search for "test" against Library of Congress 3) Note the bottom of the page says "Show 1 to 20 of 20" and "Showing page 1 of 501" 4) Apply the patch and restart Plack 5) Repeat Step #2 6) Note the bottom of the page now only says "Showing page 1 of 501" 7) Note the search bar is gone Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 115788 [details] [review] Bug 25777: (follow-up) Make the same configuration change to Z39.50 search in Acquisitions To test, apply the patch and go to Acquisitions -> Vendor -> Basket -> Add to basket -> From external source. Perform a Z39.50 search and check that the DataTable of results doesn't have a search filter or number of results information at the top.
Created attachment 116269 [details] [review] Bug 25777: Disable misleading datatables table information display z3950 This patch disables the table information display on z3950_search.pl, since it only includes search result counts for that page, which is misleading to end users. To test: 1) Do not apply the patch 2) Do a Z39.50 search for "test" against Library of Congress 3) Note the bottom of the page says "Show 1 to 20 of 20" and "Showing page 1 of 501" 4) Apply the patch and restart Plack 5) Repeat Step #2 6) Note the bottom of the page now only says "Showing page 1 of 501" 7) Note the search bar is gone Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 116270 [details] [review] Bug 25777: (follow-up) Make the same configuration change to Z39.50 search in Acquisitions To test, apply the patch and go to Acquisitions -> Vendor -> Basket -> Add to basket -> From external source. Perform a Z39.50 search and check that the DataTable of results doesn't have a search filter or number of results information at the top.
Created attachment 116306 [details] [review] Bug 25777: Disable misleading datatables table information display z3950 This patch disables the table information display on z3950_search.pl, since it only includes search result counts for that page, which is misleading to end users. To test: 1) Do not apply the patch 2) Do a Z39.50 search for "test" against Library of Congress 3) Note the bottom of the page says "Show 1 to 20 of 20" and "Showing page 1 of 501" 4) Apply the patch and restart Plack 5) Repeat Step #2 6) Note the bottom of the page now only says "Showing page 1 of 501" 7) Note the search bar is gone Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Cook <dcook@prosentient.com.au>
Created attachment 116307 [details] [review] Bug 25777: (follow-up) Make the same configuration change to Z39.50 search in Acquisitions To test, apply the patch and go to Acquisitions -> Vendor -> Basket -> Add to basket -> From external source. Perform a Z39.50 search and check that the DataTable of results doesn't have a search filter or number of results information at the top. Signed-off-by: David Cook <dcook@prosentient.com.au>
2020 lasted so long that I forgot that I wrote that first patch...
git grep -E "bPaginate.*true" koha-tmpl/intranet-tmpl/lib/datatables/datatables.js: "bPaginate": true, koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt: "bPaginate" : true,
- "bPaginate": false + "bPaginate": false, - "bPaginate": false + "paginate": false, Two very small patches. But not the same ;)
Not sure if this is a bug btw or just reading the documentation or so ?
Created attachment 116391 [details] [review] Bug 25777: (QA follow-up) Correct option: paging The correct upgrade from the old "bPaginate" option is "paging"
Sorry for asking again, but should not both spots be changed to use "paging" now? +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt @@ -246,7 +246,9 @@ { "aTargets": [ 1 ], "sType": "nsb-nse" }, ], "aaSorting": [[ 1, "asc" ]], - "bPaginate": false + "bPaginate": false, + "searching": false, + "bInfo":false
(In reply to Katrin Fischer from comment #18) > Sorry for asking again, but should not both spots be changed to use "paging" > now? Both are valid at this time. This may change later in a future DataTables upgrade. I chose to change it in my patch because I was touching that part of the template anyway. Without an established rule that these options should be updated I don't think it should be a QA failure.
(In reply to Owen Leonard from comment #19) > Without an established rule that these options should be updated I don't > think it should be a QA failure. When patches of even two lines are inconsistent..
- "bPaginate": false + "paging": false, + "searching": false, + "info":false - "bPaginate": false + "bPaginate": false, + "searching": false, + "bInfo":false Come on, what are we doing here? Please squash and be consistent :)
Created attachment 117367 [details] [review] Bug 25777: Disable misleading datatables table information display z3950 This patch disables the table information display on z3950_search.pl, since it only includes search result counts for that page, which is misleading to end users. To test: 1) Do not apply the patch 2) Do a Z39.50 search from cataloguing for "test" against Library of Congress. 3) Note the bottom of the page says "Show 1 to 20 of 20" and "Showing page 1 of 501" 4) Do a Z39.50 search from Acquisitions for "test" against Library of Congress (Acquisitions -> Vendor -> Basket -> Add to basket -> From external source). 5) Apply the patch and restart Plack 6) Repeat Step #2 7) Note the bottom of the page now only says "Showing page 1 of 501" 8) Note the search bar is gone 9) Repeat step #4 10) Note the bottom of the page now only says "Showing page 1 of 501" 11) Note the search bar is gone Squashed and mixed authorship added below Co-authored-by: Owen Leonard <oleonard@myacpl.org> Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Patches squashed, syntax updated to be consistent between the two files, QA scripts passing, tests passing, manual testing proves it works as expected. Passing QA
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.04
Pushed to 20.05.x for 20.05.10
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.