|
Lines 17-42
Link Here
|
| 17 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
17 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
| 18 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
18 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 |
|
19 |
|
| 20 |
|
|
|
| 21 |
use strict; |
20 |
use strict; |
|
|
21 |
|
| 22 |
#use warnings; FIXME - Bug 2505 |
22 |
#use warnings; FIXME - Bug 2505 |
| 23 |
use CGI; |
23 |
use CGI; |
| 24 |
use C4::Auth; |
24 |
use C4::Auth; |
| 25 |
use C4::Output; |
25 |
use C4::Output; |
| 26 |
use C4::Context; |
26 |
use C4::Context; |
| 27 |
|
27 |
use Koha::Plugins; |
| 28 |
|
28 |
|
| 29 |
my $query = new CGI; |
29 |
my $query = new CGI; |
| 30 |
my ($template, $loggedinuser, $cookie) |
30 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
| 31 |
= get_template_and_user({template_name => "reports/reports-home.tmpl", |
31 |
{ template_name => "reports/reports-home.tmpl", |
| 32 |
query => $query, |
32 |
query => $query, |
| 33 |
type => "intranet", |
33 |
type => "intranet", |
| 34 |
authnotrequired => 0, |
34 |
authnotrequired => 0, |
| 35 |
flagsrequired => {reports => '*'}, |
35 |
flagsrequired => { reports => '*' }, |
| 36 |
debug => 1, |
36 |
debug => 1, |
| 37 |
}); |
37 |
} |
| 38 |
$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), |
38 |
); |
| 39 |
intranetstylesheet => C4::Context->preference("intranetstylesheet"), |
39 |
$template->param( |
| 40 |
IntranetNav => C4::Context->preference("IntranetNav"), |
40 |
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), |
| 41 |
); |
41 |
intranetstylesheet => C4::Context->preference("intranetstylesheet"), |
|
|
42 |
IntranetNav => C4::Context->preference("IntranetNav"), |
| 43 |
); |
| 44 |
|
| 45 |
my $plugins_enabled = C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins"); |
| 46 |
if ($plugins_enabled) { |
| 47 |
my @plugins = Koha::Plugins->new()->GetPlugins('report'); |
| 48 |
$template->param( plugins => \@plugins, ); |
| 49 |
} |
| 50 |
|
| 42 |
output_html_with_http_headers $query, $cookie, $template->output; |
51 |
output_html_with_http_headers $query, $cookie, $template->output; |
| 43 |
- |
|
|