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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/chart.inc (-18 / +18 lines)
Lines 21-29 Link Here
21
            <li>
21
            <li>
22
                <label for="x_element">x column:</label>
22
                <label for="x_element">x column:</label>
23
                <select id="x_element" name="x">
23
                <select id="x_element" name="x">
24
                    <option value="[% supposed_x %]" selected>[% supposed_x %]</option>
24
                    <option value="[% supposed_x | html %]" selected>[% supposed_x | html %]</option>
25
                    [% FOREACH header IN header_row %]
25
                    [% FOREACH header IN header_row %]
26
                        <option value="[% header.cell %]">[% header.cell %]</option>
26
                        <option value="[% header.cell | html %]">[% header.cell | html %]</option>
27
                    [% END %]
27
                    [% END %]
28
                </select>
28
                </select>
29
            </li>
29
            </li>
Lines 40-61 Link Here
40
            [% column = 1 %]
40
            [% column = 1 %]
41
            <li>
41
            <li>
42
                [% FOREACH header IN header_row %]
42
                [% FOREACH header IN header_row %]
43
                    <fieldset class="chart-column-conf" id="column_[% column %]" style="display: inline !important;">
43
                    <fieldset class="chart-column-conf" id="column_[% column | html %]" style="display: inline !important;">
44
                        <legend>
44
                        <legend>
45
                            Column [% column %]
45
                            Column [% column | html %]
46
                            <a class="chart-column-delete" href="#" data-column="[% column %]">
46
                            <a class="chart-column-delete" href="#" data-column="[% column | html %]">
47
                                <img src="[% interface %]/[% theme %]/img/x.png" alt="Delete" />
47
                                <img src="[% interface | html %]/[% theme | html %]/img/x.png" alt="Delete" />
48
                            </a>
48
                            </a>
49
                        </legend>
49
                        </legend>
50
                        <div>
50
                        <div>
51
                            <label for="y_[% column %]" >y:</label>
51
                            <label for="y_[% column | html %]" >y:</label>
52
                            <select id="y_[% column %]" name="y">
52
                            <select id="y_[% column | html %]" name="y">
53
                                <option value="[% supposed_x %]" selected>[% supposed_x %]</option>
53
                                <option value="[% supposed_x | html %]" selected>[% supposed_x | html %]</option>
54
                                [% FOREACH h IN header_row %]
54
                                [% FOREACH h IN header_row %]
55
                                    [% IF header.cell == h.cell %]
55
                                    [% IF header.cell == h.cell %]
56
                                        <option value="[% h.cell %]" selected>[% h.cell %]</option>
56
                                        <option value="[% h.cell | html %]" selected>[% h.cell | html %]</option>
57
                                    [% ELSE %]
57
                                    [% ELSE %]
58
                                        <option value="[% h.cell %]">[% h.cell %]</option>
58
                                        <option value="[% h.cell | html %]">[% h.cell | html %]</option>
59
                                    [% END %]
59
                                    [% END %]
60
                            [% END %]
60
                            [% END %]
61
                            </select>
61
                            </select>
Lines 63-75 Link Here
63
63
64
                        <div class="chart-column-group">
64
                        <div class="chart-column-group">
65
                            [% i = 1 %]
65
                            [% i = 1 %]
66
                            <label for="group_[% column %]">Group:</label>
66
                            <label for="group_[% column | html %]">Group:</label>
67
                            <select id="group_[% column %]" name="group">
67
                            <select id="group_[% column | html %]" name="group">
68
                                [% FOREACH h IN header_row %]
68
                                [% FOREACH h IN header_row %]
69
                                    [% IF i == column %]
69
                                    [% IF i == column %]
70
                                        <option value="[% i %]" selected>[% i %]</option>
70
                                        <option value="[% i | html %]" selected>[% i | html %]</option>
71
                                    [% ELSE %]
71
                                    [% ELSE %]
72
                                        <option value="[% i %]">[% i %]</option>
72
                                        <option value="[% i | html %]">[% i | html %]</option>
73
                                    [% END %]
73
                                    [% END %]
74
                                    [% i = i + 1 %]
74
                                    [% i = i + 1 %]
75
                                [% END %]
75
                                [% END %]
Lines 77-84 Link Here
77
                        </div>
77
                        </div>
78
78
79
                        <div class="chart-column-line">
79
                        <div class="chart-column-line">
80
                            <label for="line_[% column %]">line:</label>
80
                            <label for="line_[% column | html %]">line:</label>
81
                            <input class="column-line" id="column-line" name="[% header.cell %]" type="checkbox">
81
                            <input class="column-line" id="column-line" name="[% header.cell | html %]" type="checkbox">
82
                        </div>
82
                        </div>
83
                    </fieldset>
83
                    </fieldset>
84
                    [% column = column + 1 %]
84
                    [% column = column + 1 %]
Lines 91-96 Link Here
91
        </ol>
91
        </ol>
92
    </fieldset>
92
    </fieldset>
93
    [% item = { cell = supposed_x } %]
93
    [% item = { cell = supposed_x } %]
94
    [% header_row.unshift(item) %]
94
    [% header_row.unshift(item) | html %]
95
    <div id="chart"></div>
95
    <div id="chart"></div>
96
</div>
96
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc (-1 / +1 lines)
Lines 61-67 Link Here
61
                    <li><a id="tab" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=tab&amp;report_id=[% id | html %]&amp;reportname=[% name |uri %][% PROCESS params %]">Tab separated text</a></li>
61
                    <li><a id="tab" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=tab&amp;report_id=[% id | html %]&amp;reportname=[% name |uri %][% PROCESS params %]">Tab separated text</a></li>
62
                    <li><a id="ods" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=ods&amp;report_id=[% id | html %]&amp;reportname=[% name |uri %][% PROCESS params %]">Open Document Spreadsheet</a></li>
62
                    <li><a id="ods" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=ods&amp;report_id=[% id | html %]&amp;reportname=[% name |uri %][% PROCESS params %]">Open Document Spreadsheet</a></li>
63
                    [% IF (results.json) %]
63
                    [% IF (results.json) %]
64
                        <li><a id="download-chart" href="#">Download chart</a></li>
64
                        <li><a id="download-chart" href="#">Chart (.svg)</a></li>
65
                    [% END %]
65
                    [% END %]
66
                </ul>
66
                </ul>
67
            </div>
67
            </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-5 / +4 lines)
Lines 1048-1061 $(document).ready(function() { Link Here
1048
                    var lines = [];
1048
                    var lines = [];
1049
                    var options = {};
1049
                    var options = {};
1050
1050
1051
                    headers = [% header_row.json %];
1051
                    headers = [% header_row.json | $raw %];
1052
1052
1053
                    var results;
1053
                    var results;
1054
                    if ($('input[name="chart-include-all"]').prop('checked')) {
1054
                    if ($('input[name="chart-include-all"]').prop('checked')) {
1055
                        results = [% allresults.json %]
1055
                        results = [% allresults.json | $raw %]
1056
                    }
1056
                    }
1057
                    else {
1057
                    else {
1058
                        results = [% results.json %]
1058
                        results = [% results.json | $raw %]
1059
                    }
1059
                    }
1060
1060
1061
                    if ($('input[name="chart-exclude-last"]').prop('checked')) {
1061
                    if ($('input[name="chart-exclude-last"]').prop('checked')) {
Lines 1105-1111 $(document).ready(function() { Link Here
1105
                    options.lines = lines;
1105
                    options.lines = lines;
1106
1106
1107
                    chart = create_chart(kept_headers, kept_results, x_elements, y_elements, groups, options);
1107
                    chart = create_chart(kept_headers, kept_results, x_elements, y_elements, groups, options);
1108
                    $('#chart').prepend('<div style="font-size: 1rem; text-align: center;">' + "[% name %]" + '</div>');
1108
                    $('#chart').prepend('<div style="font-size: 1rem; text-align: center;">' + "[% name | html %]" + '</div>');
1109
                    $('#download-chart').show();
1109
                    $('#download-chart').show();
1110
                    $("#draw-chart").html(_(btn_text));
1110
                    $("#draw-chart").html(_(btn_text));
1111
                    $("html, body").animate({ scrollTop: $(document).height() }, "slow");
1111
                    $("html, body").animate({ scrollTop: $(document).height() }, "slow");
1112
- 

Return to bug 17282