From 2ba1e472e6d9b194c2fec4bc7844c673cc967cad Mon Sep 17 00:00:00 2001
From: Nick Clemens
Date: Thu, 16 Mar 2017 11:28:29 -0400
Subject: [PATCH] Bug 18283 - Display improvements on report results - hide
code and change wording
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
This patch makes small display improvements to the report results page.
-Add toggle link for SQL code
-Change results count wording
-Add 'Notes:' label report notes
To test:
1 - Apply patch
2 - Run some reports
3 - Check that results page makes sense
4 - Hide and display code and ensure toggle works
Followed test plan, works as expected.
Signed-off-by: Marc Véron
Signed-off-by: Christopher Brannon
Signed-off-by: Jonathan Druart
Signed-off-by: Kyle M Hall
---
.../prog/en/includes/reports-toolbar.inc | 4 ++++
.../prog/en/modules/reports/guided_reports_start.tt | 13 ++++++++++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc
index 0ea3ceac32..75599fc9cc 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc
@@ -55,6 +55,10 @@
Open Document Spreadsheet
+
[% END %]
[% END %]
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 62ee1e4929..1c02b1c834 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
@@ -172,6 +172,12 @@ $("#delColumn").on("click",function(){
});
[% END %]
+ $(".toggle_sql").click(function(){
+ $("#sql_output").toggle();
+ $("#toggle_sql_hid").toggle();
+ $("#toggle_sql_vis").toggle();
+ });
+
$("#table_reports").delegate(".confirmdelete", 'click', function(){
$(this).parents('tr').attr("class","warn");
if(confirm(_("Are you sure you want to delete this saved report?"))){
@@ -826,9 +832,10 @@ canned reports and writing custom SQL reports.
[% IF ( execute ) %]
[% name %]
-[% IF ( notes ) %][% notes %]
[% END %]
-[% IF ( unlimited_total ) %]Total number of rows matching the (unlimited) query is [% unlimited_total %].
[% END %]
-[% sql |html %]
+[% IF ( notes ) %]Notes: [% notes %]
[% END %]
+[% IF ( unlimited_total ) %]Total number of results: [% unlimited_total %][% IF unlimited_total > limit %] ([% limit %] shown)[% END %].
[% END %]
+Report SQL:[% sql |html %]
+