It would be very nice if a patron could add their star rating to a book that they have currently checked out. Generally, a patron will want to star a book once they have read it versus looking for a book in the catalog. Currently, a patron can only star a book from the Record view.
Created attachment 102938 [details] [review] Bug 25110: Allow patrons to add star ratings to titles on their summary/checkout page This patch adds the ability for logged-in patrons to add star ratings to titles in their list of current checkouts and on the reading history page. The reading history page previously only showed existing ratings. Now it will allow the entry of ratings as well. The JS and markup for the feature are in separate include files to facilitate re-use. To test, apply the patch and set the OpacStarRatings to all, "results, details, and user" pages. - Log in to the OPAC as a user with checkouts. - On the "your summary" page, test the features of setting star ratings: - Any title with existing ratings should show the rating and the average rating number. - Set a rating. Confirm that it shows a message with your rating. - Click the "cancel rating" link, and confirm that your rating is removed. - Set a rating and reload the page. Confirm that the rating was saved. - Test the "cancel rating" link on the title you set before you reloaded the page. The rating should be cancelled. - Test the same functionality on the "your reading history" page. - Test these pages with the OpacStarRatings preference set to "only details" or "no." The pages should function correctly.
I can see the "Rate Me" button on the account summary on a checked-out item, however, clicking the button does not do anything. It tries to do something, but nothing changes. On a side note, I did have a hard time finding this "Rate me" button and wondered if either it should be in line with the text "Average Rating" and/or had stars next to it to indicate that there was the ability to star the book.
Created attachment 103017 [details] [review] Bug 25110: Allow patrons to add star ratings to titles on their summary/checkout page This patch adds the ability for logged-in patrons to add star ratings to titles in their list of current checkouts and on the reading history page. The reading history page previously only showed existing ratings. Now it will allow the entry of ratings as well. The JS and markup for the feature are in separate include files to facilitate re-use. It includes markup for non-js display of ratings and js-driven ratings controls. To test, apply the patch and set the OpacStarRatings to all, "results, details, and user" pages. - Log in to the OPAC as a user with checkouts. - On the "your summary" page, test the features of setting star ratings: - Any title with existing ratings should show the rating and the average rating number. - Set a rating. Confirm that it shows a message with your rating. - Click the "cancel rating" link, and confirm that your rating is removed. - Set a rating and reload the page. Confirm that the rating was saved. - Test the "cancel rating" link on the title you set before you reloaded the page. The rating should be cancelled. - Test the same functionality on the "your reading history" page. - Test these pages with the OpacStarRatings preference set to "only details" or "no." The pages should function correctly.
(In reply to Kelly McElligott from comment #3) > I can see the "Rate Me" button on the account summary on a checked-out item Thanks for testing Kelly. If you saw a "Rate me" button you either had JavaScript disabled or there was a JavaScript error on the page. If you can test again, please clear your browser cache after applying the patch. I modified the patch to remove the non-js functionality because it conflicted with the form wrapping the table of checkouts. If you disable JavaScript in your browser you should see the rating information but not see any controls.
Ah! I see now Owen! Yes, it is working however, I would like to talk about keeping the rating system consistent with how it looks in the results page, where the user can hover over the stars and rate the book. I think for the user to see stars, they understand that it can be rated?! Just my thoughts on this! Kelly
When I tested this I saw the "stars" briefly then the empty dropdown appeared with the "rate me" button next to it. There were rating numbers in the dropdown but you had to click on the dropdown to see them. I agree with Kelly that this really needs to appear the same as the other rating points. I am sure you are working on that and I think this is a great enhancement. Keep it up! Ed
The ratings feature has never allowed the user to set a rating on the search results page. To make that change is certainly possible but I would consider it out of scope for this bug. Ed: Did you clear your browser cache after applying the patch?
Hi Owen, I misspoke, I meant to keep the star ratings consistent to the full record view in the catalog. To have the user see the 5 stars and rate the same way would be great. Having a dropdown with numbers has a different look and may not be as intuitive to the user. thanks for working on this.
Created attachment 103080 [details] Screenshot of ratings on user account page
Created attachment 103081 [details] Screenshot of ratings on reading history page
(In reply to Kelly McElligott from comment #9) > Having a dropdown with numbers has a different look and may > not be as intuitive to the user. Please see the attached screenshots. If you see a dropdown something has gone wrong. Can you look for JavaScript errors in the browser console?
I get the same thing. The JavaScript error in the console is: Google Chrome: DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:8080/opac-tmpl/lib/jquery/plugins/jquery.barrating.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE Firefox: Source map error: Error: request failed with status 404 Resource URL: http://127.0.0.1:8080/opac-tmpl/lib/jquery/plugins/jquery.barrating.min_19.1200077.js Source Map URL: jquery.barrating.min.js.map In both cases cached cleared in browser, flush_memcached and restart_all in koha-testing-docker after applying the patch.
Created attachment 103365 [details] [review] Bug 25110: Allow patrons to add star ratings to titles on their summary/checkout page This patch adds the ability for logged-in patrons to add star ratings to titles in their list of current checkouts and on the reading history page. The reading history page previously only showed existing ratings. Now it will allow the entry of ratings as well. The JS and markup for the feature are in separate include files to facilitate re-use. It includes markup for non-js display of ratings and js-driven ratings controls. To test, apply the patch and set the OpacStarRatings to all, "results, details, and user" pages. - Log in to the OPAC as a user with checkouts. - On the "your summary" page, test the features of setting star ratings: - Any title with existing ratings should show the rating and the average rating number. - Set a rating. Confirm that it shows a message with your rating. - Click the "cancel rating" link, and confirm that your rating is removed. - Set a rating and reload the page. Confirm that the rating was saved. - Test the "cancel rating" link on the title you set before you reloaded the page. The rating should be cancelled. - Test the same functionality on the "your reading history" page. - Test these pages with the OpacStarRatings preference set to "only details" or "no." The pages should function correctly. Edit: Add JS file which was missing from the commit!
Created attachment 103405 [details] [review] Bug 25110: Allow patrons to add star ratings to titles on their summary/checkout page This patch adds the ability for logged-in patrons to add star ratings to titles in their list of current checkouts and on the reading history page. The reading history page previously only showed existing ratings. Now it will allow the entry of ratings as well. The JS and markup for the feature are in separate include files to facilitate re-use. It includes markup for non-js display of ratings and js-driven ratings controls. To test, apply the patch and set the OpacStarRatings to all, "results, details, and user" pages. - Log in to the OPAC as a user with checkouts. - On the "your summary" page, test the features of setting star ratings: - Any title with existing ratings should show the rating and the average rating number. - Set a rating. Confirm that it shows a message with your rating. - Click the "cancel rating" link, and confirm that your rating is removed. - Set a rating and reload the page. Confirm that the rating was saved. - Test the "cancel rating" link on the title you set before you reloaded the page. The rating should be cancelled. - Test the same functionality on the "your reading history" page. - Test these pages with the OpacStarRatings preference set to "only details" or "no." The pages should function correctly. Edit: Add JS file which was missing from the commit! Signed-off-by: David Nind <david@davidnind.com>
Caught by the new QA tools check: FAIL koha-tmpl/opac-tmpl/bootstrap/en/includes/user-star-ratings.inc OK filters FAIL forbidden patterns forbidden pattern: Font Awesome icons need the aria-hidden attribute for accessibility purpose (see bug 25166) (line 45) forbidden pattern: Font Awesome icons need the aria-hidden attribute for accessibility purpose (see bug 25166) (line 49) Will try to provide a follow-up later.
Created attachment 103718 [details] [review] Bug 25110: Allow patrons to add star ratings to titles on their summary/checkout page This patch adds the ability for logged-in patrons to add star ratings to titles in their list of current checkouts and on the reading history page. The reading history page previously only showed existing ratings. Now it will allow the entry of ratings as well. The JS and markup for the feature are in separate include files to facilitate re-use. It includes markup for non-js display of ratings and js-driven ratings controls. To test, apply the patch and set the OpacStarRatings to all, "results, details, and user" pages. - Log in to the OPAC as a user with checkouts. - On the "your summary" page, test the features of setting star ratings: - Any title with existing ratings should show the rating and the average rating number. - Set a rating. Confirm that it shows a message with your rating. - Click the "cancel rating" link, and confirm that your rating is removed. - Set a rating and reload the page. Confirm that the rating was saved. - Test the "cancel rating" link on the title you set before you reloaded the page. The rating should be cancelled. - Test the same functionality on the "your reading history" page. - Test these pages with the OpacStarRatings preference set to "only details" or "no." The pages should function correctly. Edit: Add JS file which was missing from the commit! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 103719 [details] [review] Bug 25110: (QA follow-up) Add aria-hidden="true" to FA icons Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work everyone! Pushed to master for 20.05
enhancement not backported to 19.11