From 1814ae1769ead4d16e0fe26e871483339f2715cb Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Mon, 24 Sep 2018 12:22:09 +0000 Subject: [PATCH] Bug 17282: add template's variable filters Signed-off-by: Michal Denar Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- .../intranet-tmpl/prog/en/includes/chart.inc | 36 +++++++++---------- .../prog/en/includes/reports-toolbar.inc | 2 +- .../modules/reports/guided_reports_start.tt | 8 ++--- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/chart.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/chart.inc index e20fb88bdf..03a28f09c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/chart.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/chart.inc @@ -21,9 +21,9 @@
  • @@ -40,22 +40,22 @@ [% column = 1 %]
  • [% FOREACH header IN header_row %] -
    +
    - Column [% column %] - - Delete + Column [% column | html %] + + Delete
    - - + [% FOREACH h IN header_row %] [% IF header.cell == h.cell %] - + [% ELSE %] - + [% END %] [% END %] @@ -63,13 +63,13 @@
    [% i = 1 %] - - [% FOREACH h IN header_row %] [% IF i == column %] - + [% ELSE %] - + [% END %] [% i = i + 1 %] [% END %] @@ -77,8 +77,8 @@
    - - + +
    [% column = column + 1 %] @@ -91,6 +91,6 @@
    [% item = { cell = supposed_x } %] - [% header_row.unshift(item) %] + [% header_row.unshift(item) | html %]
    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 674fac943a..83ad6af1b2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc @@ -61,7 +61,7 @@
  • Tab separated text
  • Open Document Spreadsheet
  • [% IF (results.json) %] -
  • Download chart
  • +
  • Chart (.svg)
  • [% END %] 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 1bf82b01c6..0f4a7d804d 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 @@ -1048,14 +1048,14 @@ $(document).ready(function() { var lines = []; var options = {}; - headers = [% header_row.json %]; + headers = [% header_row.json | $raw %]; var results; if ($('input[name="chart-include-all"]').prop('checked')) { - results = [% allresults.json %] + results = [% allresults.json | $raw %] } else { - results = [% results.json %] + results = [% results.json | $raw %] } if ($('input[name="chart-exclude-last"]').prop('checked')) { @@ -1105,7 +1105,7 @@ $(document).ready(function() { options.lines = lines; chart = create_chart(kept_headers, kept_results, x_elements, y_elements, groups, options); - $('#chart').prepend('
    ' + "[% name %]" + '
    '); + $('#chart').prepend('
    ' + "[% name | html %]" + '
    '); $('#download-chart').show(); $("#draw-chart").html(_(btn_text)); $("html, body").animate({ scrollTop: $(document).height() }, "slow"); -- 2.39.5