Bug 20518 - Don't show "Messages" header and link on patron details if there are no messages
Summary: Don't show "Messages" header and link on patron details if there are no messages
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 20520
  Show dependency treegraph
 
Reported: 2018-04-04 16:02 UTC by Owen Leonard
Modified: 2018-05-14 19:28 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20518 - Don't show "Messages" header and link on patron details if there are no messages (6.10 KB, patch)
2018-04-04 16:45 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20518 - Don't show "Messages" header and link on patron details if there are no messages (6.15 KB, patch)
2018-04-06 15:10 UTC, Maksim Sen
Details | Diff | Splinter Review
Bug 20518 - Don't show "Messages" header and link on patron details if there are no messages (6.22 KB, patch)
2018-04-07 09:49 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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