Description
Alexis Ripetti
2020-11-12 16:36:56 UTC
Created attachment 113570 [details] [review] Bug 27005: Adding a filter in the datatable of opac-readingrecord page Test plan: 1) apply patch 2) go to the opac-readingrecord page / your checkout history 3) See that the filter is here and works fine This patch adds a DataTable initialization but the old one is still there. The configuration options from the old dataTable() call should be added to the KohaTable() one. Created attachment 115683 [details] [review] Bug 27005: Adding a filter in the datatable of opac-readingrecord page This patch adds a search field and export options to the patron's checkout history table in the OPAC. This patch also adds some showing/hiding classes to controls which should only be seen by users with or without JavaScript: The <select> for resorting the table is hidden when JS is enabled. The tabs for filtering checkouts from on-site checkouts are hidden when JS is disabled. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Log in to the OPAC as a user who has both regular and on-site checkouts. - Go to "Your checkout history." - The table of checkouts should have controls at the top: A search field, "Clear filter," "Copy," "CSV," and "Print." - Confirm that the search filter works: Enter some text which will return results among regular or on-site checkouts. - It should work correctly to filter the results. - If you switch tabs, the filter should persist, and correctly filter the results under "Checkouts" and "On-site checkouts." - The "Clear filter" button should work correctly to clear your search. - Test the export and print button to confirm that they work for each table. Created attachment 115737 [details] [review] Bug 27005: Adding a filter in the datatable of opac-readingrecord page This patch adds a search field and export options to the patron's checkout history table in the OPAC. This patch also adds some showing/hiding classes to controls which should only be seen by users with or without JavaScript: The <select> for resorting the table is hidden when JS is enabled. The tabs for filtering checkouts from on-site checkouts are hidden when JS is disabled. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Log in to the OPAC as a user who has both regular and on-site checkouts. - Go to "Your checkout history." - The table of checkouts should have controls at the top: A search field, "Clear filter," "Copy," "CSV," and "Print." - Confirm that the search filter works: Enter some text which will return results among regular or on-site checkouts. - It should work correctly to filter the results. - If you switch tabs, the filter should persist, and correctly filter the results under "Checkouts" and "On-site checkouts." - The "Clear filter" button should work correctly to clear your search. - Test the export and print button to confirm that they work for each table. Signed-off-by: David Nind <david@davidnind.com> I have one minor suggestion, if it is possible. For the export and print lists, in the type column the value is shown as standard_checkout and onsite_checkout. Ideally these should be shown as "normal" human readable information, such as Standard checkout or On-site checkout, instead of the name used by Koha. Testing notes: - To enable the on-site checkout feature, enable the OnSiteCheckouts system preference. Created attachment 115877 [details] [review] Bug 27005: (follow-up) Enable the exclusion of columns from export This patch copies code from the staff interface which allows us to add a class to table columns which should not be included in print or export operations. The hidden column which facilitates the "Checkouts" and "On-site checkouts" tabs can now be hidden in prints and exports. To test, apply the patch and follow the previous test plan. When testing the export and print buttons, confirm that the column with "standard_checkout" data is not included. Created attachment 115878 [details] [review] Bug 27005: (follow-up) Exclude links column from sort and export I'm adding this as an additional follow-up in case anyone disagrees that the "Links" column (defined in the OPACMySummaryHTML preference) should be excluded from print and export. Created attachment 115928 [details] [review] Bug 27005: Adding a filter in the datatable of opac-readingrecord page This patch adds a search field and export options to the patron's checkout history table in the OPAC. This patch also adds some showing/hiding classes to controls which should only be seen by users with or without JavaScript: The <select> for resorting the table is hidden when JS is enabled. The tabs for filtering checkouts from on-site checkouts are hidden when JS is disabled. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Log in to the OPAC as a user who has both regular and on-site checkouts. - Go to "Your checkout history." - The table of checkouts should have controls at the top: A search field, "Clear filter," "Copy," "CSV," and "Print." - Confirm that the search filter works: Enter some text which will return results among regular or on-site checkouts. - It should work correctly to filter the results. - If you switch tabs, the filter should persist, and correctly filter the results under "Checkouts" and "On-site checkouts." - The "Clear filter" button should work correctly to clear your search. - Test the export and print button to confirm that they work for each table. Signed-off-by: David Nind <david@davidnind.com> Created attachment 115929 [details] [review] Bug 27005: (follow-up) Enable the exclusion of columns from export This patch copies code from the staff interface which allows us to add a class to table columns which should not be included in print or export operations. The hidden column which facilitates the "Checkouts" and "On-site checkouts" tabs can now be hidden in prints and exports. To test, apply the patch and follow the previous test plan. When testing the export and print buttons, confirm that the column with "standard_checkout" data is not included. Signed-off-by: David Nind <david@davidnind.com> Created attachment 115930 [details] [review] Bug 27005: (follow-up) Exclude links column from sort and export I'm adding this as an additional follow-up in case anyone disagrees that the "Links" column (defined in the OPACMySummaryHTML preference) should be excluded from print and export. Signed-off-by: David Nind <david@davidnind.com> Hi Owen, I am a little confused by the following 2 warnings, can you please check? FAIL koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc OK filters FAIL forbidden patterns forbidden pattern: Font Awesome icons need the aria-hidden attribute for accessibility purpose (see bug 25166) (line 50) forbidden pattern: Font Awesome icons need the aria-hidden attribute for accessibility purpose (see bug 25166) (line 90) Created attachment 116020 [details] [review] Bug 27005: (follow-up) Add missing aria-hidden attributes Created attachment 116199 [details] [review] Bug 27005: Adding a filter in the datatable of opac-readingrecord page This patch adds a search field and export options to the patron's checkout history table in the OPAC. This patch also adds some showing/hiding classes to controls which should only be seen by users with or without JavaScript: The <select> for resorting the table is hidden when JS is enabled. The tabs for filtering checkouts from on-site checkouts are hidden when JS is disabled. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Log in to the OPAC as a user who has both regular and on-site checkouts. - Go to "Your checkout history." - The table of checkouts should have controls at the top: A search field, "Clear filter," "Copy," "CSV," and "Print." - Confirm that the search filter works: Enter some text which will return results among regular or on-site checkouts. - It should work correctly to filter the results. - If you switch tabs, the filter should persist, and correctly filter the results under "Checkouts" and "On-site checkouts." - The "Clear filter" button should work correctly to clear your search. - Test the export and print button to confirm that they work for each table. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 116200 [details] [review] Bug 27005: (follow-up) Enable the exclusion of columns from export This patch copies code from the staff interface which allows us to add a class to table columns which should not be included in print or export operations. The hidden column which facilitates the "Checkouts" and "On-site checkouts" tabs can now be hidden in prints and exports. To test, apply the patch and follow the previous test plan. When testing the export and print buttons, confirm that the column with "standard_checkout" data is not included. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 116201 [details] [review] Bug 27005: (follow-up) Exclude links column from sort and export I'm adding this as an additional follow-up in case anyone disagrees that the "Links" column (defined in the OPACMySummaryHTML preference) should be excluded from print and export. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 116202 [details] [review] Bug 27005: (follow-up) Add missing aria-hidden attributes Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Nice enhancement, works well. No regressions found and QA scripts are happy. Passing QA Pushed to master for 21.05, thanks to everybody involved! Enhancement not pushed to 20.11.x |