From 8a17e45f7e56967069dc33440f90ffc4ab9a5131 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Sun, 12 Aug 2012 12:11:10 +0200 Subject: Bug 746947: Determine the size of the images dynamically for graphical reports r=dkl a=LpSolit --- template/en/default/reports/report.html.tmpl | 78 ++++++++-------------------- 1 file changed, 22 insertions(+), 56 deletions(-) (limited to 'template') diff --git a/template/en/default/reports/report.html.tmpl b/template/en/default/reports/report.html.tmpl index 76049d04e..8219ebd89 100644 --- a/template/en/default/reports/report.html.tmpl +++ b/template/en/default/reports/report.html.tmpl @@ -21,8 +21,8 @@ # cumulate: boolean. For bar/line charts, whether to cumulate data sets. #%] -[% DEFAULT width = 600 - height = 350 +[% DEFAULT width = 1024 + height = 600 %] [% IF min_width AND width < min_width %] @@ -55,14 +55,8 @@ [% time = time FILTER time('%Y-%m-%d %H:%M:%S') FILTER html %] [% PROCESS global/header.html.tmpl - style = " - .t1 { background-color: #ffffff } /* white */ - .t2 { background-color: #dfefff } /* light blue */ - .t3 { background-color: #dddddd } /* grey */ - .t4 { background-color: #c3d3ed } /* darker blue */ - .ttotal, .ttotal td { background-color: #cfffdf } /* light green */ - " header_addl_info = time + style_urls = ['skins/standard/reports.css'] yui = ['datatable'] %] @@ -98,57 +92,29 @@ [% END %] [% END %] [% END %] - [% END %]width=[% width %]&height=[% height %] + [% END %]width=[% width %]&height=[% height %] [% END %] - - Graphical report results + + Graphical report results [% END %]
[% END %] - - - - - [% IF format != "table" %] - - - [% sizeurl = BLOCK %]report.cgi? - [% switchbase %]&action=wrap&format= - [% format FILTER html %][% END %] - - [% END %] - -
- [% formats = [ { name => "pie", description => "Pie" }, - { name => "bar", description => "Bar" }, - { name => "line", description => "Line" }, - { name => "table", description => "Table" } ] %] - - [% formaturl = "report.cgi?$switchbase&width=$width" _ - "&height=$height&action=wrap" %] - [% FOREACH other_format = formats %] - [% NEXT IF other_format.name == "pie" AND row_field AND col_field %] - [% UNLESS other_format.name == format %] - - [% END %] - [% other_format.description FILTER html %] - [% "" UNLESS other_format.name == format %] | - [% END %] - CSV - -        - - Taller
- Thinner * - Fatter    
- Shorter
-
+ [% formats = [ { name => "pie", description => "Pie" }, + { name => "bar", description => "Bar" }, + { name => "line", description => "Line" }, + { name => "table", description => "Table" } ] %] + + [% formaturl = "report.cgi?$switchbase&width=$width&height=$height&action=wrap" %] + [% FOREACH other_format = formats %] + [% NEXT IF other_format.name == "pie" AND row_field AND col_field %] + [% UNLESS other_format.name == format %] + + [% END %] + [% other_format.description FILTER html %] + [% "" UNLESS other_format.name == format %] | + [% END %] + CSV @@ -161,7 +127,7 @@ Edit this report [% END %] - +
 | [% IF saved_report_id %]