Lines 25-30
use C4::Auth;
Link Here
|
25 |
use CGI qw ( -utf8 ); |
25 |
use CGI qw ( -utf8 ); |
26 |
use C4::Output; |
26 |
use C4::Output; |
27 |
use Koha::DateUtils;; |
27 |
use Koha::DateUtils;; |
|
|
28 |
use Koha::Reports; |
28 |
|
29 |
|
29 |
use vars qw($debug); |
30 |
use vars qw($debug); |
30 |
|
31 |
|
Lines 106-119
foreach my $job ( values %$jobs ) {
Link Here
|
106 |
|
107 |
|
107 |
@jobloop = sort { $a->{TIME} cmp $b->{TIME} } @jobloop; |
108 |
@jobloop = sort { $a->{TIME} cmp $b->{TIME} } @jobloop; |
108 |
|
109 |
|
109 |
my $reports = get_saved_reports(); |
110 |
my @reports = Koha::Reports->search({}); |
110 |
if ( defined $id ) { |
111 |
my @savedreports; |
111 |
foreach my $report (@$reports) { |
112 |
foreach my $report (@reports) { |
112 |
$report->{'selected'} = 1 if $report->{'id'} eq $id; |
113 |
my $is_selected = defined $id ? $report->id eq $id : 0; |
113 |
} |
114 |
push @savedreports, { |
|
|
115 |
'id' => $report->id, |
116 |
'report_name' => $report->report_name, |
117 |
'selected' => $is_selected, |
118 |
}; |
114 |
} |
119 |
} |
115 |
|
120 |
|
116 |
$template->param( 'savedreports' => $reports ); |
121 |
$template->param( 'savedreports' => \@savedreports ); |
117 |
$template->param( JOBS => \@jobloop ); |
122 |
$template->param( JOBS => \@jobloop ); |
118 |
my $time = localtime(time); |
123 |
my $time = localtime(time); |
119 |
$template->param( 'time' => $time ); |
124 |
$template->param( 'time' => $time ); |
120 |
- |
|
|