-
+
Reports
Guided reports
- [% IF UseKohaPlugins %]
-
Report Plugins
-
- [% END %]
-
+
+
+ [% IF UseKohaPlugins && CAN_user_plugins_report %]
+
+ [% END %]
--- a/reports/reports-home.pl
+++ a/reports/reports-home.pl
@@ -17,26 +17,35 @@
# with Koha; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
use strict;
+
#use warnings; FIXME - Bug 2505
use CGI;
use C4::Auth;
use C4::Output;
use C4::Context;
-
+use Koha::Plugins;
my $query = new CGI;
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "reports/reports-home.tmpl",
- query => $query,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => {reports => '*'},
- debug => 1,
- });
-$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
- intranetstylesheet => C4::Context->preference("intranetstylesheet"),
- IntranetNav => C4::Context->preference("IntranetNav"),
- );
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+ { template_name => "reports/reports-home.tmpl",
+ query => $query,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => { reports => '*' },
+ debug => 1,
+ }
+);
+$template->param(
+ intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+ intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+ IntranetNav => C4::Context->preference("IntranetNav"),
+);
+
+my $plugins_enabled = C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins");
+if ($plugins_enabled) {
+ my @plugins = Koha::Plugins->new()->GetPlugins('report');
+ $template->param( plugins => \@plugins, );
+}
+
output_html_with_http_headers $query, $cookie, $template->output;
--