Bugzilla – Attachment 17108 Details for
Bug 9965
Improve integration of report plugins with existing reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9965 - Improve integration of report plugins with existing reports
Bug-9965---Improve-integration-of-report-plugins-w.patch (text/plain), 4.12 KB, created by
Kyle M Hall (khall)
on 2013-04-01 18:33:40 UTC
(
hide
)
Description:
Bug 9965 - Improve integration of report plugins with existing reports
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-04-01 18:33:40 UTC
Size:
4.12 KB
patch
obsolete
>From 7a5d768da68af5143d3afce6a31f9bae7ebb044b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 1 Apr 2013 14:31:50 -0400 >Subject: [PATCH] Bug 9965 - Improve integration of report plugins with existing reports > >Right now we have a link to in the Reports module to access all report >plugins. It would probably be better for the report plugins were just >listed on the reports page directly. > >Test Plan: >1) Install one or more report plugins >2) Apply patch >3) Browse to reports-home.pl >4) Observe the report plugins are listed under 'Other reports' >--- > .../prog/en/modules/reports/reports-home.tt | 23 ++++++++---- > reports/reports-home.pl | 37 ++++++++++++------- > 2 files changed, 38 insertions(+), 22 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt >index c7744fa..4f6ac73 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt >@@ -12,7 +12,7 @@ > <div id="bd"> > <div id="yui-main"> > >- <div class="yui-g"> >+ <div class="yui-gb"> > <h1>Reports</h1> > <div class="yui-u first"><h2>Guided reports</h2> > <ul> >@@ -37,13 +37,6 @@ > <li><a href="/cgi-bin/koha/reports/reserves_stats.pl">Holds</a></li> > </ul> > >- [% IF UseKohaPlugins %] >- <h2>Report Plugins</h2> >- <ul> >- <li><a href="/cgi-bin/koha/plugins/plugins-home.pl?method=report">Report Plugins</a></li> >- </ul> >- [% END %] >- > </div> > > <div class="yui-u"><h2>Top lists</h2> >@@ -67,6 +60,20 @@ > <li><a href="http://wiki.koha-community.org/wiki/SQL_Reports_Library" target="blank">Koha reports library</a></li> > <!--<li><a href="/cgi-bin/koha/reports/stats.screen.pl">Till reconciliation</a></li> --> > </ul></div> >+ >+ >+ [% IF UseKohaPlugins && CAN_user_plugins_report %] >+ <div class="yui-u"> >+ <h2>Other reports</h2> >+ >+ <ul> >+ [% FOREACH plugin IN plugins %] >+ <li><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=report">[% plugin.metadata.name %]</a></li> >+ [% END %] >+ </ul> >+ >+ </div> >+ [% END %] > </div> > > </div> >diff --git a/reports/reports-home.pl b/reports/reports-home.pl >index d536b01..7e1aec7 100755 >--- a/reports/reports-home.pl >+++ b/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; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9965
:
17108
|
18039