X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=tools%2Fholidays.pl;h=b3912eb261c190cb69fbfe13219aff679accd7d2;hb=31a3a7ed9353958e3f684fffc62316caf21e3e77;hp=eb3bc9c3773c588149c77d313ba21feca2e5370a;hpb=84d7a0e3ef830a0b55ca2685ea163a068f2d5979;p=koha_fer diff --git a/tools/holidays.pl b/tools/holidays.pl index eb3bc9c377..b3912eb261 100755 --- a/tools/holidays.pl +++ b/tools/holidays.pl @@ -65,18 +65,20 @@ if ( $onlymine ) { $branch = C4::Context->userenv->{'branch'}; } my $branchname = GetBranchName($branch); -my $branches = GetBranches($onlymine); +my $branches = GetBranches($onlymine); my @branchloop; -for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { - my $selected = 1 if $thisbranch eq $branch; - my %row =(value => $thisbranch, - selected => $selected, - branchname => $branches->{$thisbranch}->{'branchname'}, - ); - push @branchloop, \%row; +for my $thisbranch ( + sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } + keys %{$branches} ) { + push @branchloop, + { value => $thisbranch, + selected => $thisbranch eq $branch, + branchname => $branches->{$thisbranch}->{'branchname'}, + }; } + # branches calculated - put branch codes in a single string so they can be passed in a form -my $branchcodes = join("|", keys %$branches); +my $branchcodes = join '|', keys %{$branches}; # Get all the holidays @@ -145,6 +147,7 @@ $template->param(WEEK_DAYS_LOOP => \@week_days, keydate => $keydate, branchcodes => $branchcodes, branch => $branch, + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), branchname => $branchname );