From da2fe9be9d7664ee3e82eb24a59d3c05950efc82 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 Signed-off-by: Mark Tompsett --- .../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 dcf8f5a..f9a998f 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 @@ -164,6 +164,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 %] @@ -194,11 +195,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.1.4