From 692d1a1053276b2c6312d25fd2a940fa748db739 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 23 Mar 2016 16:04:47 +0000 Subject: [PATCH] Bug 16125: Remove the flagged boolean in circ/circulation.tt MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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 Signed-off-by: Brendan A Gallagher --- circ/circulation.pl | 7 ------- .../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 75799bd524..e527b7ecd6 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 eaae5d72e4..57e5cf2b80 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 %] - -
-- 2.39.5