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 eaecee422f..5291fda6f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc @@ -14,29 +14,49 @@ [% END %] [% IF ( showsql || execute || editsql || save_successful ) %] - [% IF ( CAN_user_reports_create_reports ) %] - [% UNLESS ( editsql ) # Do not show edit button on edit page %] -
- - Edit - -
- [% END %] -
- - Duplicate - -
- [% END %] - - [% IF ( CAN_user_reports_delete_reports ) %] + [% IF ( CAN_user_reports_delete_reports && !CAN_user_reports_create_reports ) %]
Delete
- [% END %] + [% ELSE %] + [% IF ( CAN_user_reports_create_reports || CAN_user_reports_delete_reports ) %] +
+ + +
+ [% END %] + [% END %] + [% END %] + + [% IF ( showsql || execute || editsql || save_successful ) %] [% UNLESS ( errors ) # Unless there are errors saving a report %]
@@ -103,10 +123,9 @@
- Show SQL code -
-
- +
[% IF allresults.size %] 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 198c32051d..9551980fb2 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 @@ -5,6 +5,7 @@ [% USE Koha %] [% USE TablesSettings %] [% USE JSON.Escape %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [%- BLOCK area_name -%] @@ -1930,10 +1931,14 @@ }); [% END %] - $(".toggle_sql").click(function(){ - $("#sql_output").toggle(); - $("#toggle_sql_hid").toggle(); - $("#toggle_sql_vis").toggle(); + $("#toggle_sql").click(function(){ + var sql_output = $("#sql_output"); + sql_output.toggle(); + if( sql_output.is(":visible") ){ + $(this).button('complete'); + } else { + $(this).button('reset'); + } if( !showsql ){ showsql = CodeMirror.fromTextArea(sql, { lineNumbers: false,