# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id$
use strict;
require Exporter;
if ( $borr->{'debarred'} || $borr->{'gonenoaddress'} || $borr->{'lost'} ) {
$borr->{'flagged'} = 1;
}
-
+# $make flagged available everywhere in the template
+my $patron_flagged = $borr->{'flagged'};
if ( $borr->{'amountoutstanding'} > 5 ) {
$borr->{'amountoverfive'} = 1;
}
my @bordat;
$bordat[0] = $borr;
-$template->param( BORROWER_INFO => \@bordat );
-$template->param( borrowernumber => $borrowernumber );
+$template->param( BORROWER_INFO => \@bordat,
+ borrowernumber => $borrowernumber,
+ patron_flagged => $patron_flagged,
+ );
#get issued items ....
my ($countissues,$issues) = GetPendingIssues($borrowernumber);
# load the branches
my $branches = GetBranches();
my @branch_loop;
-for my $branch_hash ( keys %$branches ) {
+for my $branch_hash (sort keys %$branches ) {
my $selected=(C4::Context->userenv && ($branch_hash eq C4::Context->userenv->{branch})) if (C4::Context->preference('SearchMyLibraryFirst'));
push @branch_loop,
{