Fix for Bug 7024 - Can't delete other library's messages with AllowAllMessageDeletion on
authorOwen Leonard <oleonard@myacpl.org>
Thu, 13 Oct 2011 14:02:38 +0000 (10:02 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Sat, 15 Oct 2011 06:56:05 +0000 (19:56 +1300)
The display of messages "to the patron" on the checkout screen
lacked the same logic controlling messages "to other librarians,"
affecting conditions under which the [Delete] link would be shown.
This match makes the two categories consistent with each other:
A delete link will be shown if the logged in branch matches the
branch where the message was set OR if AllowAllMessageDeletion
is turned on.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt

index 385579c..061f376 100644 (file)
@@ -632,7 +632,10 @@ No patron matched <span class="ex">[% message %]</span>
                                </li>
                        [% END %]
                        [% FOREACH bor_messages_loo IN bor_messages_loop %]
-                               <li><span class="">[% bor_messages_loo.message_date_formatted %] [% bor_messages_loo.branchcode %] <i>"[% bor_messages_loo.message %]"</i></span> [% IF ( bor_messages_loo.can_delete ) %]<a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>[% END %]</li>
+                               <li><span class="">[% bor_messages_loo.message_date_formatted %] [% bor_messages_loo.branchcode %] <i>"[% bor_messages_loo.message %]"</i></span> [% IF ( bor_messages_loo.can_delete ) %]<a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
+                [% ELSIF ( all_messages_del ) %]
+                    <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
+                [% END %]</li>
                        [% END %]
 
                </ul>