From afbbfce0eeafb8dc9703d9c7fa3c3a0434155cfb 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 Bug 16782 - missing , fixed now Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- .../en/modules/reports/guided_reports_start.tt | 14 ++++++++++++-- 1 file changed, 12 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 5902b92cfe..4ec8f332aa 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,20 @@ 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 + Yes [% ELSE %] - No + No [% END %] + + + [% IF (savedreport.public) %] + [% OPACBaseURL %]/cgi-bin/koha/svc/report?id=[% savedreport.id | html %] + [% ELSE %] + [% staffClientBaseURL %]/cgi-bin/koha/svc/report?id=[% savedreport.id | html %] + [% END %] + [% IF (usecache) %] [% savedreport.cache_expiry %] [% END %] [% FOR result IN savedreport.results %] -- 2.39.5