[% IF msg == 'no_report' %]
There is no valid report for this id.
[% ELSIF msg == 'can_be_updated' %]
-
Existing sql
-[% current_sql %]-
Updated sql
-[% updated_sql %]+
+
+
+ Existing SQL
+ [% current_sql | html_entity %] +
+
[% ELSE %]
Something went wrong.
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
@@ -32,9 +32,16 @@
[% INCLUDE 'calendar.inc' %]
[% IF ( saved1 ) %]
+
[% INCLUDE 'datatables.inc' %]
[% END %]
@@ -172,11 +179,17 @@ $("#delColumn").on("click",function(){
var ltitle = $(this).text();
var report_id = $(this).data("report_id");
var page = $(this).attr("href");
- $("#update_sql .modal-body").load(page + " div");
+ $("#update_sql .modal-body").load(page + " div", function(){
+ var diff1 = $("#col1 .show_sql").text();
+ var diff2 = $("#col2 .show_sql").text();
+ var diffs = diffString( escape(diff1), escape(diff2) );
+ $("#col1 .show_sql,#col2 .show_sql").html(diffs);
+ });
$('#update_sql').modal('show');
$("#update_sql_button").attr("href", "/cgi-bin/koha/reports/guided_reports.pl?phase=Use saved&op=convert&report_id=" + report_id);
});
- $("#update_sql").on("hidden", function(){
+
+ $("#update_sql").on("hidden.bs.modal", function(){
$("#update_sql_label").html("");
$("#update_sql .modal-body").html("Updated SQL
+ [% updated_sql | html_entity %] + "+_("Loading")+"
");
});
--