<li><a id="ods" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&format=ods&sql=[% sql |uri %]&reportname=[% name |uri %]">Open Document Spreadsheet</a></li>
</ul>
</div>
+ <div class="btn-group">
+ <a class="btn btn-default btn-sm toggle_sql" id="toggle_sql_hid" href="#"><i class="fa fa-eye"></i> Show sql code</a>
+ <a class="btn btn-default btn-sm toggle_sql" id="toggle_sql_vis" href="#" style="display:none;"><i class="fa fa-eye-slash"></i> Hide sql code</a>
+ </div>
[% END %]
[% END %]
});
[% 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?"))){
[% IF ( execute ) %]
<h1>[% name %]</h1>
-[% IF ( notes ) %]<p>[% notes %]</p>[% END %]
-[% IF ( unlimited_total ) %]<p>Total number of rows matching the (unlimited) query is [% unlimited_total %].</p>[% END %]
-<pre id="sql_output">[% sql |html %]</pre>
+[% IF ( notes ) %]<p><span class="label">Notes:</span> [% notes %]</p>[% END %]
+[% IF ( unlimited_total ) %]<p><span class="label">Total number of results:</span> [% unlimited_total %][% IF unlimited_total > limit %] ([% limit %] shown)[% END %].</p>[% END %]
+<div id="sql_output" style="display:none;"><span class="label">Report SQL:</span><pre>[% sql |html %]</pre></div>
+</br>
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="get" id="limitselect">
<input type="hidden" name="phase" value="Run this report"/>