From b844e10d5d9d901eb2ea6212624d86bbb33104dc Mon Sep 17 00:00:00 2001
From: Kyle M Hall <kyle@bywatersolutions.com>
Date: Fri, 9 May 2014 09:35:03 -0400
Subject: [PATCH] [PASSED QA] Bug 12214 [QA Followup] - Clean up reports-toolbar.inc, show Edit link when SQL has errors
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
---
.../prog/en/includes/reports-toolbar.inc | 32 ++++++++++++++-----
1 files changed, 23 insertions(+), 9 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 782fc83..f9999fe 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc
@@ -1,17 +1,31 @@
<div id="toolbar" class="btn-toolbar">
- [% IF ( CAN_user_reports_create_reports ) %]<div class="btn-group">
- <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New report <span class="caret"></span></button>
+ [% IF ( CAN_user_reports_create_reports ) %]
+ <div class="btn-group">
+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New report <span class="caret"></span></button>
<ul class="dropdown-menu">
<li id="newmenuc"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">New guided report</a> </li>
<li id="newsql"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL">New SQL report</a> </li>
</ul>
- </div>[% END %]
-[% IF ( showsql || execute || editsql || save_successful ) %]
- [% UNLESS ( errors ) %][%# Unless there are errors saving a report %]
- [% UNLESS ( editsql ) %][%# Do not show edit button on edit page %]
- [% IF ( CAN_user_reports_create_reports ) %]<div class="btn-group"><a id="editreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Edit%20SQL"><i class="icon-pencil"></i> Edit</a></div>[% END %]
+ </div>
+ [% END %]
+
+ [% IF ( showsql || execute || editsql || save_successful || error ) %]
+ [% UNLESS ( editsql ) # Do not show edit button on edit page %]
+ [% IF ( CAN_user_reports_create_reports ) %]
+ <div class="btn-group">
+ <a id="editreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Edit%20SQL">
+ <i class="icon-pencil"></i> Edit
+ </a>
+ </div>
+ [% END %]
+ [% END %]
+
+ [% UNLESS ( errors ) # Unless there are errors saving a report %]
+ <div class="btn-group">
+ <a id="runreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Run%20this%20report">
+ <i class="icon-play"></i> Run report
+ </a>
+ </div>
[% END %]
- <div class="btn-group"><a id="runreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Run%20this%20report"><i class="icon-play"></i> Run report</a></div>
[% END %]
-[% END %]
</div>
--
1.7.2.5