Bug 20518

Summary: Don't show "Messages" header and link on patron details if there are no messages
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, katrin.fischer, maksim.sen, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 20520    
Attachments: Bug 20518 - Don't show "Messages" header and link on patron details if there are no messages
Bug 20518 - Don't show "Messages" header and link on patron details if there are no messages
Bug 20518 - Don't show "Messages" header and link on patron details if there are no messages

Description Owen Leonard 2018-04-04 16:02:55 UTC
On the patron detail page (moremember.pl), a "Messages" header is displayed whether or not there are messages on the account. It should show only when there are messages.

In addition "Add a new message" link is redundant because of the button in the toolbar.
Comment 1 Owen Leonard 2018-04-04 16:45:34 UTC Comment hidden (obsolete)
Comment 2 Maksim Sen 2018-04-06 15:10:05 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2018-04-07 09:49:34 UTC
Created attachment 73827 [details] [review]
Bug 20518 - Don't show "Messages" header and link on patron details if there are no messages

This patch modifies the patron detail page so that the "Messages" header
is not displayed if there are no messages.

Unrelated: A minor change was made to moremember.pl to quiet an error in
the log, "Use of uninitialized value $print in string eq at
members/moremember.pl line 219."

To test, apply the patch and open the detail page for a patron who has
no messages. There should be no "Messages" header or "add message" link.

Add a message to the patron's account. The message should appear, along
with the "Messages" header and "add message" link.

The error logs should show no errors.

Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2018-04-07 09:50:32 UTC
I wonder if we should make the same changes on the checkouts tab. The button in the toolbar has been implemented with 16.xx I think, so it should hopefully be well established by now (separate bug).
Comment 5 Jonathan Druart 2018-04-09 19:13:03 UTC
We already have "Add message" in the toolbar, should not we remove this one?
Comment 6 Katrin Fischer 2018-04-10 05:24:09 UTC
I think this is a good cosmetic fix, but we could rethink removing some in favor of the existing button separately. That said, I think the add link makes sense when there are already some messages.
Comment 7 Jonathan Druart 2018-04-11 19:54:43 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 8 Nick Clemens 2018-05-14 19:28:13 UTC
Enhancement, not backported for 17.11.x