View | Details | Raw Unified | Return to bug 18667
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/convert_report.tt (-7 / +12 lines)
Lines 1-16 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Reports &rsaquo; Convert report</title>
2
    <title>Koha &rsaquo; Reports &rsaquo; Convert report</title>
3
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
3
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4
    </head>
4
    </head>
5
    <body id="report_convert" class="catalog">
5
    <body id="rep_report_convert" class="rep">
6
        <div id="main" style="direction: ltr;">
6
        <div>
7
            [% IF msg == 'no_report' %]
7
            [% IF msg == 'no_report' %]
8
                There is no valid report for this id.
8
                There is no valid report for this id.
9
            [% ELSIF msg == 'can_be_updated' %]
9
            [% ELSIF msg == 'can_be_updated' %]
10
                <h3>Existing sql</h3>
10
                <div id="col1">
11
                <pre>[% current_sql %]</pre>
11
                    <h3>Existing SQL</h3>
12
                <h3>Updated sql</h3>
12
                    <span class="show_sql">[% current_sql | html_entity %]</span>
13
                <pre>[% updated_sql %]</pre>
13
                </div>
14
15
                <div id="col2">
16
                    <h3>Updated SQL</h3>
17
                    <span class="show_sql">[% updated_sql | html_entity %]</span>
18
                </div>
14
            [% ELSE %]
19
            [% ELSE %]
15
                Something went wrong.
20
                Something went wrong.
16
            [% END %]
21
            [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-3 / +15 lines)
Lines 32-40 Link Here
32
[% INCLUDE 'calendar.inc' %]
32
[% INCLUDE 'calendar.inc' %]
33
<style type="text/css">
33
<style type="text/css">
34
    #sql { width: 90%; height: 9em;}
34
    #sql { width: 90%; height: 9em;}
35
    #update_sql .modal-dialog { width: 80%; }
36
    ins { background-color: #e6ffe6; }
37
    del { background-color: #ffe6e6; }
38
    #col1, #col2 { width:45%; float:left; }
39
    #col1 ins, #col2 del { display: none; }
40
    .show_sql { font-family: monospace; }
35
</style>
41
</style>
36
[% IF ( saved1 ) %]
42
[% IF ( saved1 ) %]
37
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
43
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
44
<script type="text/javascript" src="[% interface %]/lib/jsdiff/jsdiff.min.js"></script>
38
[% INCLUDE 'datatables.inc' %]
45
[% INCLUDE 'datatables.inc' %]
39
[% END %]
46
[% END %]
40
47
Lines 172-182 $("#delColumn").on("click",function(){ Link Here
172
        var ltitle = $(this).text();
179
        var ltitle = $(this).text();
173
        var report_id = $(this).data("report_id");
180
        var report_id = $(this).data("report_id");
174
        var page = $(this).attr("href");
181
        var page = $(this).attr("href");
175
        $("#update_sql .modal-body").load(page + " div");
182
        $("#update_sql .modal-body").load(page + " div", function(){
183
            var diff1 = $("#col1 .show_sql").text();
184
            var diff2 = $("#col2 .show_sql").text();
185
            var diffs = diffString( escape(diff1), escape(diff2) );
186
            $("#col1 .show_sql,#col2 .show_sql").html(diffs);
187
        });
176
        $('#update_sql').modal('show');
188
        $('#update_sql').modal('show');
177
        $("#update_sql_button").attr("href", "/cgi-bin/koha/reports/guided_reports.pl?phase=Use saved&op=convert&report_id=" + report_id);
189
        $("#update_sql_button").attr("href", "/cgi-bin/koha/reports/guided_reports.pl?phase=Use saved&op=convert&report_id=" + report_id);
178
    });
190
    });
179
    $("#update_sql").on("hidden", function(){
191
192
    $("#update_sql").on("hidden.bs.modal", function(){
180
        $("#update_sql_label").html("");
193
        $("#update_sql_label").html("");
181
        $("#update_sql .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
194
        $("#update_sql .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
182
    });
195
    });
183
- 

Return to bug 18667