From 0c4a559ac7aed7a09d3bd4aaa3465725864ab83b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 23 Mar 2016 16:04:47 +0000 Subject: [PATCH] [PASSED QA] Bug 16125: Remove the flagged boolean in circ/circulation.tt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before 15632, flagged was passed in any cases: GetMessages returned an arrayref, so: my $bor_messages_loop = GetMessages( $borrowernumber, 'B', $branch ); if($bor_messages_loop){ $template->param(flagged => 1 ); } set 'flagged'. It seems that this variable is not needed as it's always set. Test plan: Confirm that the "Add a new message" link is always displayed (even if no message exist). Note that a "Attention" is displayed but should not, that already existed before bug 15632. Signed-off-by: Marc VĂ©ron Signed-off-by: Katrin Fischer --- circ/circulation.pl | 7 ------- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 13 ++----------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 75799bd..e527b7e 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -288,7 +288,6 @@ if ($borrowernumber) { { #borrowercard expired, no issues $template->param( - flagged => "1", noissues => ($force_allow_issue) ? 0 : "1", forceallow => $force_allow_issue, expired => "1", @@ -301,7 +300,6 @@ if ($borrowernumber) { { # borrower card soon to expire warn librarian $template->param( "warndeparture" => $borrower->{dateexpiry} , - flagged => "1" ); if (C4::Context->preference('ReturnBeforeExpiry')){ $template->param("returnbeforeexpiry" => 1); @@ -470,7 +468,6 @@ if ($borrowernumber) { #title my $flags = $borrower->{'flags'}; foreach my $flag ( sort keys %$flags ) { - $template->param( flagged=> 1); $flags->{$flag}->{'message'} =~ s#\n#
#g; if ( $flags->{$flag}->{'noissues'} ) { $template->param( @@ -563,10 +560,6 @@ my $patron_messages = Koha::Patron::Messages->search( } ); -if( $librarian_messages->count or $patron_messages->count ) { - $template->param(flagged => 1) -} - my $fast_cataloging = 0; if (defined getframeworkinfo('FA')) { $fast_cataloging = 1 diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index eaae5d7..57e5cf2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -409,7 +409,7 @@ $(document).ready(function() { [% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %] - [% UNLESS flagged && noissues %] + [% UNLESS noissues %] [% END %] [% END %] @@ -607,12 +607,7 @@ No patron matched [% message %] [% END %] [% IF ( !noissues ) || ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') )%] -[% IF ( flagged ) %]
-[% ELSE %] -
- -[% END %]
@@ -638,7 +633,7 @@ No patron matched [% message %] [% END %] - [% UNLESS flagged and noissues %] + [% UNLESS noissues %]
[% IF NEEDSCONFIRMATION %] @@ -713,7 +708,6 @@ No patron matched [% message %]
[% END %] - [% IF flagged %] [% IF ( noissues ) %] [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
@@ -862,9 +856,6 @@ No patron matched [% message %]
- [% END %] - -
-- 1.9.1