On the patron detail page, the "Patron lists" tab renders completely empty when no patron lists exist in the system. The tab is shown (because the borrowernumber 51 (koha) for example has manage_patron_lists permission), but the dynamically loaded content from patron-lists-tab.tt contains no HTML, both [% IF in_lists %] and [% IF available_lists && CAN_user_tools_manage_patron_lists %] evaluate to false. Other tabs follow the convention of showing an empty state message (e.g. "Patron has nothing on hold." for holds, "Patron has nothing booked." for bookings). The patron lists tab should do the same, with a message like "No patron lists. Create a new list." linking to /cgi-bin/koha/patron_lists/add-modify.pl.
Created attachment 194739 [details] [review] Bug 42014: Show empty state message on patron lists tab - When no patron lists exist in the system, the patron lists tab on the patron detail page renders completely blank - Other tabs follow the convention of showing a message in the empty state (e.g. "Patron has nothing on hold.") - Add an empty state message with a link to create a new patron list, matching the established pattern To test: - Go to a patron detail page and click the "Patron lists" tab - If no patron lists exist, observe the tab is blank - Apply patch - Repeat the above steps - Verify the tab now shows "Patron is not on any list." with a link to create a new patron list - Click the link and create a patron list - Return to the patron detail page and verify the "Add patron to list" dropdown now appears instead
In a case where the logged in user has permission to manage lists, "Patron is not on any list" displays even if the patron is on a list.
Thanks, will check.
Created attachment 194771 [details] [review] Bug 42014: (follow-up) Only show empty state when patron is not on any list - The empty state message was shown when available_lists was empty but the patron was already on all existing lists - Add !in_lists guard so the message only displays when the patron is truly not on any list
Created attachment 194781 [details] [review] Bug 42014: Show empty state message on patron lists tab - When no patron lists exist in the system, the patron lists tab on the patron detail page renders completely blank - Other tabs follow the convention of showing a message in the empty state (e.g. "Patron has nothing on hold.") - Add an empty state message with a link to create a new patron list, matching the established pattern To test: - Go to a patron detail page and click the "Patron lists" tab - If no patron lists exist, observe the tab is blank - Apply patch - Repeat the above steps - Verify the tab now shows "Patron is not on any list." with a link to create a new patron list - Click the link and create a patron list - Return to the patron detail page and verify the "Add patron to list" dropdown now appears instead Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 194782 [details] [review] Bug 42014: (follow-up) Only show empty state when patron is not on any list - The empty state message was shown when available_lists was empty but the patron was already on all existing lists - Add !in_lists guard so the message only displays when the patron is truly not on any list Signed-off-by: Owen Leonard <oleonard@myacpl.org>