Bug 22515: Improve logic determining how to show OPAC suggestions
authorOwen Leonard <oleonard@myacpl.org>
Mon, 27 Apr 2020 13:20:23 +0000 (13:20 +0000)
committerJoy Nelson <joy@bywatersolutions.com>
Mon, 11 May 2020 16:48:31 +0000 (16:48 +0000)
commit93f37f3a03fc1205b3c3cb54e650081dc3dd79ea
treec88d6d49f32b1fa11c033d0df0eaca62aac04c9a
parent18f3661179e6a556fc1c39a8841edb99e4e97cd9
Bug 22515: Improve logic determining how to show OPAC suggestions

This patch makes changes to the OPAC suggestions view so that the logic
around logged in users and the OPACViewOthersSuggestions preference is
more specific.

To reproduce the bug you should have pending purchase susggestions in
your system from more than one patron.

1. Set the OPACViewOthersSuggestions preference to "Show."
2. Log in to the OPAC as a user who has not submitted any suggestions.
3. Follow the link to the purchase suggestions page from the menu under
   the search bar.
4. The page will say that there are no  purchase suggestions.
5. Add "?suggested_by_anyone=1" to the end of the page URL.
6. You should see suggestions from other users.

To test, apply the patch and repeat steps 2-3 above. The suggestions
page should show other patrons' suggestions.

Test with different combinations of factors:

 - Logged in user, OPACViewOthersSuggestions off
 - No logged in user, OPACViewOthersSuggestions on
 - No logged in user, OPACViewOthersSuggestions off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt