Except catalogue search results the pagination is generated by C4::Output::pagination_bar, id don't think it's the right way.
I'm not sure I understand this bug, but I'm very much in favour of creating more standardized ways of paginating in Koha, especially in the staff client...
Created attachment 59769 [details] [review] Bug 18008: Make pagination generated in templates It generates pagination in bootstrap style (as bug 18005 also do) Modified pages: acqui/neworderbiblio.pl authorities/authorities-home.pl catalogue/itemsearch.pl cataloguing/addbooks.pl cataloguing/value_builder/marc21_linking_section.pl cataloguing/value_builder/unimarc_field_210c.pl cataloguing/value_builder/unimarc_field_4XX.pl reports/guided_reports.pl reviews/reviewswaiting.pl tags/review.pl virtualshelves/shelves.pl note, that on itemsearch.pl, this pagination is used just as fallback when the javascript is off Test plan: 0) Apply the patch 1) go through pages from the list above/use cataloguing plugins, and make the data to be big enough for pagination 2) confirm that pagination looks nice and behave correctly 3) git grep pagination_bar should return just C4/Output.pm and opac templates (I'll deal with it on another bugs)
(In reply to David Cook from comment #1) > I'm not sure I understand this bug, but I'm very much in favour of creating > more standardized ways of paginating in Koha, especially in the staff > client... Thank for your interest, any feedback is appreciated, of course ;) Here is my first attempt to make pagination a bit more usable.
Created attachment 63023 [details] [review] Bug 18008: Make pagination generated in templates It generates pagination in bootstrap style (as bug 18005 also do) Modified pages: acqui/neworderbiblio.pl authorities/authorities-home.pl cataloguing/addbooks.pl cataloguing/value_builder/marc21_linking_section.pl cataloguing/value_builder/unimarc_field_210c.pl cataloguing/value_builder/unimarc_field_4XX.pl reports/guided_reports.pl reviews/reviewswaiting.pl tags/review.pl virtualshelves/shelves.pl Test plan: 0) Apply the patch 1) go through pages from the list above/use cataloguing plugins, and make the data to be big enough for pagination 2) confirm that pagination looks nice and behave correctly 3) git grep pagination_bar should return just C4/Output.pm and opac templates (I'll deal with it on another bugs)
Hi Josef When I apply this patch on an up to date clean branch I get the following error: Applying: Bug 18008: Make pagination generated in templates Using index info to reconstruct a base tree... M acqui/neworderbiblio.pl M cataloguing/value_builder/marc21_linking_section.pl M cataloguing/value_builder/unimarc_field_4XX.pl M koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt M koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt M koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt M koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt M koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt M reports/guided_reports.pl M reviews/reviewswaiting.pl M tags/review.pl M virtualshelves/shelves.pl Falling back to patching base and 3-way merge... Auto-merging virtualshelves/shelves.pl Auto-merging tags/review.pl Auto-merging reviews/reviewswaiting.pl CONFLICT (content): Merge conflict in reviews/reviewswaiting.pl Auto-merging reports/guided_reports.pl Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt Auto-merging cataloguing/value_builder/unimarc_field_4XX.pl Auto-merging cataloguing/value_builder/marc21_linking_section.pl Auto-merging acqui/neworderbiblio.pl Failed to merge in the changes. Patch failed at 0001 Bug 18008: Make pagination generated in templates The copy of the patch that failed is found in: /home/vagrant/kohaclone/.git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-18008-Make-pagination-generated-in-templates-1W76fJ.patch
Created attachment 67588 [details] [review] Bug 18008: Make pagination generated in templates It generates pagination in bootstrap style (as bug 18005 also do) Modified pages: acqui/neworderbiblio.pl authorities/authorities-home.pl cataloguing/addbooks.pl cataloguing/value_builder/marc21_linking_section.pl cataloguing/value_builder/unimarc_field_210c.pl cataloguing/value_builder/unimarc_field_4XX.pl reports/guided_reports.pl reviews/reviewswaiting.pl tags/review.pl virtualshelves/shelves.pl Test plan: 0) Apply the patch 1) go through pages from the list above/use cataloguing plugins, and make the data to be big enough for pagination 2) confirm that pagination looks nice and behave correctly 3) git grep pagination_bar should return just C4/Output.pm and opac templates (I'll deal with it on another bugs)
(In reply to Alex Buckley from comment #5) > Hi Josef > > When I apply this patch on an up to date clean branch I get the following > error: > Thanks for testing, I've just rebased on master, should be OK now...
Hi Josef Thanks for rebasing, I have tested the patch and functionally everything works well, however running QA test tools it fails for pagination.inc (see the below test output). Can you please fix this up and then I'll be happy to sign off on this patch. FAIL koha-tmpl/intranet-tmpl/prog/en/includes/pagination.inc FAIL forbidden patterns forbidden pattern: Do not use line breaks inside template tags (bug 18675) (line 1) OK git manipulation OK spelling OK tt_valid OK valid_template
Created attachment 67672 [details] [review] Bug 18008: Make pagination generated in templates It generates pagination in bootstrap style (as bug 18005 also do) Modified pages: acqui/neworderbiblio.pl authorities/authorities-home.pl cataloguing/addbooks.pl cataloguing/value_builder/marc21_linking_section.pl cataloguing/value_builder/unimarc_field_210c.pl cataloguing/value_builder/unimarc_field_4XX.pl reports/guided_reports.pl reviews/reviewswaiting.pl tags/review.pl virtualshelves/shelves.pl Test plan: 0) Apply the patch 1) go through pages from the list above/use cataloguing plugins, and make the data to be big enough for pagination 2) confirm that pagination looks nice and behave correctly 3) git grep pagination_bar should return just C4/Output.pm and opac templates (I'll deal with it on another bugs)
(In reply to Alex Buckley from comment #8) > Hi Josef > > Thanks for rebasing, I have tested the patch and functionally everything > works well, however running QA test tools it fails for pagination.inc (see > the below test output). Can you please fix this up and then I'll be happy to > sign off on this patch. > > > FAIL koha-tmpl/intranet-tmpl/prog/en/includes/pagination.inc > FAIL forbidden patterns > forbidden pattern: Do not use line breaks inside template tags (bug 18675) > (line 1) > OK git manipulation > OK spelling > OK tt_valid > OK valid_template It was because of comments in pagination.inc, now fixed, thanks
I didn't get through the whole test plan, but I ran into a few things: In the template for reviews/reviewswaiting.pl the pagination bar is picking up some style conflicts from the container it's in. I suggest moving it outside div.statictabs. I don't see that pagination is used by tags/review.pl or reports/guided_reports.pl because they're in DataTables now. Can the code be removed?
Created attachment 67717 [details] [review] Bug 18008: Make pagination generated in templates It generates pagination in bootstrap style (as bug 18005 also do) Modified pages: acqui/neworderbiblio.pl authorities/authorities-home.pl cataloguing/addbooks.pl cataloguing/value_builder/marc21_linking_section.pl cataloguing/value_builder/unimarc_field_210c.pl cataloguing/value_builder/unimarc_field_4XX.pl reports/guided_reports.pl reviews/reviewswaiting.pl tags/review.pl virtualshelves/shelves.pl Test plan: 0) Apply the patch 1) go through pages from the list above/use cataloguing plugins, and make the data to be big enough for pagination 2) confirm that pagination looks nice and behave correctly 3) git grep pagination_bar should return just C4/Output.pm and opac templates (I'll deal with it on another bugs)
(In reply to Owen Leonard from comment #11) > I didn't get through the whole test plan, but I ran into a few things: > > In the template for reviews/reviewswaiting.pl the pagination bar is picking > up some style conflicts from the container it's in. I suggest moving it > outside div.statictabs. > > I don't see that pagination is used by tags/review.pl or > reports/guided_reports.pl because they're in DataTables now. Can the code be > removed? Thanks for testing, I tried to address all this issues in new patch
Created attachment 73398 [details] [review] Bug 18008: Make pagination generated in templates It generates pagination in bootstrap style (as bug 18005 also do) Modified pages: acqui/neworderbiblio.pl authorities/authorities-home.pl cataloguing/addbooks.pl cataloguing/value_builder/marc21_linking_section.pl cataloguing/value_builder/unimarc_field_210c.pl cataloguing/value_builder/unimarc_field_4XX.pl reports/guided_reports.pl reviews/reviewswaiting.pl tags/review.pl virtualshelves/shelves.pl Test plan: 0) Apply the patch 1) go through pages from the list above/use cataloguing plugins, and make the data to be big enough for pagination 2) confirm that pagination looks nice and behave correctly 3) git grep pagination_bar should return just C4/Output.pm and opac templates (I'll deal with it on another bugs)
Just rebased on master
It call for rebase :-)
Created attachment 79366 [details] [review] Bug 18008: Make pagination generated in templates It generates pagination in bootstrap style (as bug 18005 also do) Modified pages: acqui/neworderbiblio.pl authorities/authorities-home.pl cataloguing/addbooks.pl cataloguing/value_builder/marc21_linking_section.pl cataloguing/value_builder/unimarc_field_210c.pl cataloguing/value_builder/unimarc_field_4XX.pl reports/guided_reports.pl reviews/reviewswaiting.pl tags/review.pl virtualshelves/shelves.pl Test plan: 0) Apply the patch 1) go through pages from the list above/use cataloguing plugins, and make the data to be big enough for pagination 2) confirm that pagination looks nice and behave correctly 3) git grep pagination_bar should return just C4/Output.pm and opac templates (I'll deal with it on another bugs)
Rebased on and adapted to master ;)
> cataloguing/value_builder/unimarc_field_210c.pl I don't see any pagination on this page. > cataloguing/value_builder/unimarc_field_4XX.pl > cataloguing/value_builder/marc21_linking_section.pl Pagination appears to have been removed altogether from these pages, but I don't think that's correct.
*** Bug 18029 has been marked as a duplicate of this bug. ***