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" class="" style="width:45%;float:left;">
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" class="" style="width:45%; float:left;">
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 / +14 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 ins, #col2 del { display: none; }
39
    .show_sql { font-family: monospace; }
35
</style>
40
</style>
36
[% IF ( saved1 ) %]
41
[% IF ( saved1 ) %]
37
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
42
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
43
<script type="text/javascript" src="[% interface %]/lib/jsdiff/jsdiff.min.js"></script>
38
[% INCLUDE 'datatables.inc' %]
44
[% INCLUDE 'datatables.inc' %]
39
[% END %]
45
[% END %]
40
46
Lines 172-182 $("#delColumn").on("click",function(){ Link Here
172
        var ltitle = $(this).text();
178
        var ltitle = $(this).text();
173
        var report_id = $(this).data("report_id");
179
        var report_id = $(this).data("report_id");
174
        var page = $(this).attr("href");
180
        var page = $(this).attr("href");
175
        $("#update_sql .modal-body").load(page + " div");
181
        $("#update_sql .modal-body").load(page + " div", function(){
182
            var diff1 = $("#col1 .show_sql").text();
183
            var diff2 = $("#col2 .show_sql").text();
184
            var diffs = diffString( escape(diff1), escape(diff2) );
185
            $("#col1 .show_sql,#col2 .show_sql").html(diffs);
186
        });
176
        $('#update_sql').modal('show');
187
        $('#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);
188
        $("#update_sql_button").attr("href", "/cgi-bin/koha/reports/guided_reports.pl?phase=Use saved&op=convert&report_id=" + report_id);
178
    });
189
    });
179
    $("#update_sql").on("hidden", function(){
190
191
    $("#update_sql").on("hidden.bs.modal", function(){
180
        $("#update_sql_label").html("");
192
        $("#update_sql_label").html("");
181
        $("#update_sql .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
193
        $("#update_sql .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
182
    });
194
    });
183
- 

Return to bug 18667