From d966752992aba8ba0aaa0f81c066ae2e28e70771 Mon Sep 17 00:00:00 2001
From: Nick Clemens <nick@quecheelibrary.org>
Date: Wed, 15 Apr 2015 17:20:22 -0400
Subject: [PATCH] [Signed-off] Bug 7646 - Printing w/o the SQL Code showing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This patch provides the same function but adds a 'Print results' button rather than the link.
Looks a little cleaner to my eye and there doesn't seem to be an option to print with SQL.

To test:
Go to Home > Reports > Guided reports wizard > Saved reports
Select a report and run it
You will find a new link "Print w/o SQL" above the title
Hit this link.
The report (this page) will print without the SQL statement.

Works as expected. Print function is displayed as Button.
Signed-off-by: Marc Véron <veron@veron.ch>
---
 koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc |    6 ++++++
 1 file changed, 6 insertions(+)

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 b7e7a79..e444dc3 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc
@@ -28,4 +28,10 @@
             </div>
         [% END %]
     [% END %]
+
+    [% IF ( execute) %]
+         <div class="btn-group">
+             <a id="printresults" class="btn btn-small" href="javascript:window.print()" OnClick="document.getElementById('sql_output').className += ' noprint';" class="noprint">Print results</a>
+        </div>
+    [% END %]
 </div>
-- 
1.7.10.4