From 76b4894ea9976bf08260c664b272598fba26d006 Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Thu, 19 Oct 2017 16:23:43 +1300 Subject: [PATCH] Bug 16782 - disclose JSON URL for reports on the saved report page It has always annoyed me that you had to look at the help to divine the url for a report. This patch works it out and displays it for you in a new column on the saved reports table. Requirements: - OPACBaseURL and staffClientBaseURL preferences must be set for the urls to be complete. It's ok if they are not, but it's better if they are. - You must have a saved report that is public to your OPAC, and one that is not public. To test: - create a public saved report and a private staff report. They can be anything. - view the saved reports page, note that under a new heading of JSON URL the link to the json feed for that report shows. - copying and pasting that link into the address bar, or clicking it, should take you to the results of the selected report. sponsored-by: Catalyst IT --- .../prog/en/modules/reports/guided_reports_start.tt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 5902b92..c2550c6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -389,6 +389,7 @@ canned reports and writing custom SQL reports.

Last edit Last run Public + JSON URL [% IF (usecache) %] Cache expiry (seconds) [% END %] Saved results [% IF has_obsolete_reports %]Update[% END %] @@ -419,11 +420,19 @@ canned reports and writing custom SQL reports.

[% savedreport.date_created | $KohaDates %] [% savedreport.last_modified | $KohaDates with_hours => 1 %] [% savedreport.last_run | $KohaDates with_hours => 1 %] + + [% IF (savedreport.public) %] + Yes + [% ELSE %] + No + [% END %] + [% IF (savedreport.public) %] - Yes + [% OPACBaseURL %]/cgi-bin/koha/svc/report?id=[% savedreport.id | html %] [% ELSE %] - No + [% staffClientBaseURL %]/cgi-bin/koha/svc/report?id=[% savedreport.id | html %] [% END %] + [% IF (usecache) %] [% savedreport.cache_expiry %] [% END %] [% FOR result IN savedreport.results %] -- 2.7.4