Description
Owen Leonard
2021-05-25 16:22:28 UTC
Created attachment 125849 [details] [review] Bug 28453: Update pagination subroutine to generate Bootstrap markup This patch modifies Output.pm to change the HTML it generates when creating pagination bars. The changes allow the pagination menu to be styled like Bootstrap pagination, making them consistent with the pagination on catalog search results. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Test pages where the pagination_bar subroutine is called: - Administration -> Record matching rules. - Authorities -> Authority search results. - Cataloging -> Cataloging search results. - Cataloging -> MARC Editor -> Edit tag which is configured to use the unimarc_field_210c value builder. - Reports -> Saved SQL reports -> Results. - Tools -> Comments. - Lists -> List contents. The pagination bar markup was removed from the templates for these pages because it wasn't being used: - Administration -> Patron attribute types. - Tools -> Tags. Things noted from testing: - Administration -> Record matching rules: with 30 entries the pagination bar didn't appear (both before and after the patch was applied) - I'm assuming it should have kicked in at 20? - Cataloging -> MARC Editor -> Tag using unimarc_field_210c value builder: this worked after patch applied (before the patch was applied I couldn't get any results). However, when you click on the controls for anything after page 1, it says no results (even when there are more than 20 results). - Tools > Comments: The pagination only appears at the bottom - should this be added at the top as well? Created attachment 126836 [details] [review] Bug 28453: Update pagination subroutine to generate Bootstrap markup This patch modifies Output.pm to change the HTML it generates when creating pagination bars. The changes allow the pagination menu to be styled like Bootstrap pagination, making them consistent with the pagination on catalog search results. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Test pages where the pagination_bar subroutine is called: - Authorities -> Authority search results. - Cataloging -> Cataloging search results. - Cataloging -> MARC Editor -> Edit tag which is configured to use the unimarc_field_210c value builder. - Reports -> Saved SQL reports -> Results. - Tools -> Comments. - Lists -> List contents. The pagination bar markup was removed from the templates for these pages because it wasn't being used: - Administration -> Patron attribute types. - Administration -> Record matching rules. - Tools -> Tags. Created attachment 126837 [details] [review] Bug 28453: DO NOT PUSH - FOR MARC21 TESTING ONLY This patch changes the authority type searched by the UNIMARC 210$c plugin from EDITORS to PERSO_NAME in order to try to make it more easily testable by MARC21 users. FOR TESTING ONLY!! (In reply to David Nind from comment #2) > - Administration -> Record matching rules This was an error in my test plan. It is one of the pages which had unused pagination markup in the template. > - Cataloging -> MARC Editor -> Tag using unimarc_field_210c value builder: > this worked after patch applied I'm glad you caught this because I made a "temporary" change which ended up in the patch. In order to test using my MARC21 data I altered the search to use PERSO_NAME instead of EDITORS. This is now in the DO NOT PUSH patch which will enable testing of the pagination bar if you have PERSO_NAME authorities. > - Tools > Comments: The pagination only appears at the bottom - should this > be added at the top as well? I thought the same, but I didn't want to make any additions in this patch. Created attachment 126845 [details] [review] Bug 28453: Update pagination subroutine to generate Bootstrap markup This patch modifies Output.pm to change the HTML it generates when creating pagination bars. The changes allow the pagination menu to be styled like Bootstrap pagination, making them consistent with the pagination on catalog search results. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Test pages where the pagination_bar subroutine is called: - Authorities -> Authority search results. - Cataloging -> Cataloging search results. - Cataloging -> MARC Editor -> Edit tag which is configured to use the unimarc_field_210c value builder. - Reports -> Saved SQL reports -> Results. - Tools -> Comments. - Lists -> List contents. The pagination bar markup was removed from the templates for these pages because it wasn't being used: - Administration -> Patron attribute types. - Administration -> Record matching rules. - Tools -> Tags. Signed-off-by: David Nind <david@davidnind.com> Created attachment 126846 [details] [review] Bug 28453: DO NOT PUSH - FOR MARC21 TESTING ONLY This patch changes the authority type searched by the UNIMARC 210$c plugin from EDITORS to PERSO_NAME in order to try to make it more easily testable by MARC21 users. FOR TESTING ONLY!! Signed-off-by: David Nind <david@davidnind.com> Thanks Owen for fixing and clarifying - signed off now! I am sorry, but I believe there are some translation issues hiding here. In Output.pm: + . '<i class="fa fa-fw fa-angle-double-left"></i> First' . '</a></li>'; + . '" rel="prev">' . '<i class="fa fa-fw fa-angle-left"></i> Previous' . '</a></li>'; . '" rel="next">' . 'Next <i class="fa fa-fw fa-angle-right"></i>' . '</a></li>'; Created attachment 127210 [details] [review] Bug 28453: (follow-up) Make pagination labels translatable This patch moves the English strings out of Output.pm and adds classes to the pagination markup which can be used as hooks for JavaScript. The global JS include is modified to look for these hooks and add text labels to the links. Owen, it seems that you needs to adjust the two occurrences at the OPAC as well: opac/opac-authorities-home.pl: pagination_bar => pagination_bar( opac/opac-shelves.pl: pagination_bar => pagination_bar( opac/opac-shelves.pl: pagination_bar => pagination_bar( Created attachment 171076 [details] [review] Bug 28453: Update pagination subroutine to generate Bootstrap markup This patch modifies Output.pm to change the HTML it generates when creating pagination bars. The changes allow the pagination menu to be styled like Bootstrap pagination, making them consistent with the pagination on catalog search results. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Test pages where the pagination_bar subroutine is called: - Authorities -> Authority search results. - Cataloging -> Cataloging search results. - Cataloging -> MARC Editor -> Edit tag which is configured to use the unimarc_field_210c value builder. - Reports -> Saved SQL reports -> Results. - Tools -> Comments. - Lists -> List contents. The pagination bar markup was removed from the templates for these pages because it wasn't being used: - Administration -> Patron attribute types. - Administration -> Record matching rules. - Tools -> Tags. Created attachment 171077 [details] [review] Bug 28453: DO NOT PUSH - FOR MARC21 TESTING ONLY This patch changes the authority type searched by the UNIMARC 210$c plugin from EDITORS to PERSO_NAME in order to try to make it more easily testable by MARC21 users. FOR TESTING ONLY!! Signed-off-by: David Nind <david@davidnind.com> Created attachment 171078 [details] [review] Bug 28453: (follow-up) Make pagination labels translatable This patch moves the English strings out of Output.pm and adds classes to the pagination markup which can be used as hooks for JavaScript. The global JS include is modified to look for these hooks and add text labels to the links. I have tested again. The only issue I'm having is with the unimarc_field_210c value builder. I can't get it to generate any results, both before and after the patch. I ended up testing on a UNIMARC instance without the DO NOT PUSH patch: 1. Edit KTD .env file and change KOHA_MARC_FLAVOUR=unimarc 2. Start up KTD as normal: ktd up 3. Change the default framework so that 210$c uses the unimarc_field_210c.pl value builder (in the default KTD setup it is using unimarc_field_210c-bis.pl - this is mapped to biblioitems.publishercode) 4. Edit any record 5. Select the tag editor for 210$c 6. Try several combinations to get some search results (I used search terms that worked with normal authority searching) - I had no luck. Examples . a . c . france . Catel Maybe this is already broken or not working as it should? From previous testing (comment #2) it looks like it did work. Created attachment 171150 [details] Pagination bar screenshots - after the patches (PDF) When testing, I noticed some inconsistencies in how the pagination is displayed - compared to the standard catalog search results. I've attached a document with screenshots after the patches are applied, for easier comparison. For a future bug. - Standard catalog search results: . The pagination bar is displayed after the action buttons, and above the table of search results - in the section with the white background. - Authority record search results: . The pagination bar is displayed in the section with the white background, above the table of search results. . The number of search results is displayed after the pagination bar - "Results 1 to 20 of 246". - Cataloguing search results: . The pagination bar is displayed in the section with the white background, above the table of search results. . The number of results is displayed before the pagination bar - "74 result(s) found in catalog, 0 result(s) found in reservoir". - Cataloguing - unimarc_field_210c value builder: . Not getting any results before and after the patch. - Saved SQL reports - results from running a report: . This is for the pagination bar for the results of a report (the list of saved reports uses DataTables). . The pagination bar is displayed in the section with the white background, above the table of search results. . The number of results is displayed before the pagination bar - "Total number of results: 863 (20 shown) ". - Comments: . As noted in comment #2, the pagination bar only appears at the bottom of the list. . Tab headings are in plain text (Approved comments, Comments awaiting moderation) - created bug 37859 - Lists: . The pagination bar is displayed above the action buttons, outside the section with the white background. . The number of results is displayed before the pagination bar - "This list contains 25 titles". - Markup removed, as not being used: . Patron attribute search types: before and after the patch using DataTables(?) . Record matching results: not using any pagination, tested with 21 rules . Tags: before and after the patch using DataTables(?) Created attachment 175272 [details] [review] Bug 28453: Update pagination subroutine to generate Bootstrap markup This patch modifies Output.pm to change the HTML it generates when creating pagination bars. The changes allow the pagination menu to be styled like Bootstrap pagination, making them consistent with the pagination on catalog search results. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Test pages where the pagination_bar subroutine is called: - Authorities -> Authority search results. - Cataloging -> Cataloging search results. - Cataloging -> MARC Editor -> Edit tag which is configured to use the unimarc_field_210c value builder. - Reports -> Saved SQL reports -> Results. - Tools -> Comments. - Lists -> List contents. The pagination bar markup was removed from the templates for these pages because it wasn't being used: - Administration -> Patron attribute types. - Administration -> Record matching rules. - Tools -> Tags. Sponsored-by: Athens County Public Libraries Created attachment 175273 [details] [review] Bug 28453: DO NOT PUSH - FOR MARC21 TESTING ONLY This patch changes the authority type searched by the UNIMARC 210$c plugin from EDITORS to PERSO_NAME in order to try to make it more easily testable by MARC21 users. FOR TESTING ONLY!! Signed-off-by: David Nind <david@davidnind.com> Created attachment 175274 [details] [review] Bug 28453: (follow-up) Make pagination labels translatable This patch moves the English strings out of Output.pm and adds classes to the pagination markup which can be used as hooks for JavaScript. The global JS include is modified to look for these hooks and add text labels to the links. Created attachment 175279 [details] [review] Bug 28453: Update pagination subroutine to generate Bootstrap markup This patch modifies Output.pm to change the HTML it generates when creating pagination bars. The changes allow the pagination menu to be styled like Bootstrap pagination, making them consistent with the pagination on catalog search results. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Test pages where the pagination_bar subroutine is called: - Authorities -> Authority search results. - Cataloging -> Cataloging search results. - Cataloging -> MARC Editor -> Edit tag which is configured to use the unimarc_field_210c value builder. - Reports -> Saved SQL reports -> Results. - Tools -> Comments. - Lists -> List contents. The pagination bar markup was removed from the templates for these pages because it wasn't being used: - Administration -> Patron attribute types. - Administration -> Record matching rules. - Tools -> Tags. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Created attachment 175280 [details] [review] Bug 28453: DO NOT PUSH - FOR MARC21 TESTING ONLY This patch changes the authority type searched by the UNIMARC 210$c plugin from EDITORS to PERSO_NAME in order to try to make it more easily testable by MARC21 users. FOR TESTING ONLY!! Signed-off-by: David Nind <david@davidnind.com> Created attachment 175281 [details] [review] Bug 28453: (follow-up) Make pagination labels translatable This patch moves the English strings out of Output.pm and adds classes to the pagination markup which can be used as hooks for JavaScript. The global JS include is modified to look for these hooks and add text labels to the links. Signed-off-by: David Nind <david@davidnind.com> Is this change in the first patch expected? - <input type="hidden" name="authtypecode" value="PERSO_NAME" /> + <input type="hidden" name="authtypecode" value="EDITORS" /> What about the difference between DT's pagination and those pagination menus? Shouldn't we style them identically? Created attachment 176663 [details] [review] Bug 28453: Update pagination subroutine to generate Bootstrap markup This patch modifies Output.pm to change the HTML it generates when creating pagination bars. The changes allow the pagination menu to be styled like Bootstrap pagination, making them consistent with the pagination on catalog search results. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Test pages where the pagination_bar subroutine is called: - Authorities -> Authority search results. - Cataloging -> Cataloging search results. - Cataloging -> MARC Editor -> Edit tag which is configured to use the unimarc_field_210c value builder. - Reports -> Saved SQL reports -> Results. - Tools -> Comments. - Lists -> List contents. The pagination bar markup was removed from the templates for these pages because it wasn't being used: - Administration -> Patron attribute types. - Administration -> Record matching rules. - Tools -> Tags. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Created attachment 176664 [details] [review] Bug 28453: DO NOT PUSH - FOR MARC21 TESTING ONLY This patch changes the authority type searched by the UNIMARC 210$c plugin from EDITORS to PERSO_NAME in order to try to make it more easily testable by MARC21 users. FOR TESTING ONLY!! Signed-off-by: David Nind <david@davidnind.com> Created attachment 176665 [details] [review] Bug 28453: (follow-up) Make pagination labels translatable This patch moves the English strings out of Output.pm and adds classes to the pagination markup which can be used as hooks for JavaScript. The global JS include is modified to look for these hooks and add text labels to the links. Signed-off-by: David Nind <david@davidnind.com> (In reply to Jonathan Druart from comment #23) > Is this change in the first patch expected? No that was included by mistake. I have re-uploaded the patches without that change. (In reply to Jonathan Druart from comment #24) > What about the difference between DT's pagination and those pagination menus? I think that is a question that requires more feedback from users. My rationale for having them be different is that the controls trigger very different actions: The Bootstrap-styled links will cause a new page to load. The DT controls only affect the table. In my opinion it is correct that users have a clue about this difference. Created attachment 176666 [details] [review] Bug 28453: Update pagination subroutine to generate Bootstrap markup This patch modifies Output.pm to change the HTML it generates when creating pagination bars. The changes allow the pagination menu to be styled like Bootstrap pagination, making them consistent with the pagination on catalog search results. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Test pages where the pagination_bar subroutine is called: - Authorities -> Authority search results. - Cataloging -> Cataloging search results. - Cataloging -> MARC Editor -> Edit tag which is configured to use the unimarc_field_210c value builder. - Reports -> Saved SQL reports -> Results. - Tools -> Comments. - Lists -> List contents. The pagination bar markup was removed from the templates for these pages because it wasn't being used: - Administration -> Patron attribute types. - Administration -> Record matching rules. - Tools -> Tags. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 176667 [details] [review] Bug 28453: (follow-up) Make pagination labels translatable This patch moves the English strings out of Output.pm and adds classes to the pagination markup which can be used as hooks for JavaScript. The global JS include is modified to look for these hooks and add text labels to the links. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |