Bug 12029: Ability for patrons to dismiss OPAC messages
authorAleisha Amohia <aleishaamohia@hotmail.com>
Wed, 15 Feb 2023 08:57:08 +0000 (21:57 +1300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 20 Apr 2023 18:48:46 +0000 (15:48 -0300)
commit368dfdc7d0e43db6c31bc3bc8d6a294b00d585e3
treee3fbc7dee4abc77cfcb47f11cbddca02ec5362af
parent52f228c02a43c4f0492fc59643525bf79dcc09ad
Bug 12029: Ability for patrons to dismiss OPAC messages

This enhancement adds the ability for patrons to dismiss an OPAC
message, marking it as read to remove it from their summary page.

To test:
1) Update database and restart services
2) Log into the staff interface and go to your patron account
3) Click the Add message button
4) Add a message for the OPAC and Save
5) Log into the OPAC. Note there is a message on the homepage saying you
have a message. Go to your user summary and confirm the message
displays.
6) Click the button to dismiss the message. A confirmation box should
pop up - hitting Cancel should stop the action.
7) Dismiss the message again and this time Confirm. Make sure the
message is gone from the OPAC user summary and from the homepage.
8) Confirm tests pass t/db_dependent/Koha/Patron/Messages.t
9) Create a few more messages for the OPAC
10) Log into the OPAC and dismiss one of the messages
11) Confirm the count of unread messages on the OPAC home page is
correct

Sponsored-by: Koha-US
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Patron/Messages.pm
koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
opac/opac-dismiss-message.pl [new file with mode: 0755]