summaryrefslogtreecommitdiffstats
path: root/template/en/default/reports
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-08-12 12:11:10 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-08-12 12:11:10 +0200
commit8a17e45f7e56967069dc33440f90ffc4ab9a5131 (patch)
tree465a76f23e274ba317243dec4e7330d24e2d0e59 /template/en/default/reports
parenta05220de2e69d4b6ef212d1f3556fa848b6e1508 (diff)
downloadbugzilla-8a17e45f7e56967069dc33440f90ffc4ab9a5131.tar.gz
bugzilla-8a17e45f7e56967069dc33440f90ffc4ab9a5131.tar.xz
Bug 746947: Determine the size of the images dynamically for graphical reports
r=dkl a=LpSolit
Diffstat (limited to 'template/en/default/reports')
-rw-r--r--template/en/default/reports/report.html.tmpl78
1 files changed, 22 insertions, 56 deletions
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 %]&amp;height=[% height %]
+ [% END %]width=[% width %]&amp;height=[% height %]
[% END %]
-
- <img alt="Graphical report results" src="[% imageurl %]"
- width="[% width %]" height="[% height %]">
+
+ <img id="graphical_report" alt="Graphical report results" src="[% imageurl %]">
[% END %]
<br>
[% END %]
- <table>
- <tr>
- <td>
- [% formats = [ { name => "pie", description => "Pie" },
- { name => "bar", description => "Bar" },
- { name => "line", description => "Line" },
- { name => "table", description => "Table" } ] %]
-
- [% formaturl = "report.cgi?$switchbase&amp;width=$width" _
- "&amp;height=$height&amp;action=wrap" %]
- [% FOREACH other_format = formats %]
- [% NEXT IF other_format.name == "pie" AND row_field AND col_field %]
- [% UNLESS other_format.name == format %]
- <a href="[% formaturl %]&amp;format=[% other_format.name %]">
- [% END %]
- [% other_format.description FILTER html %]
- [% "</a>" UNLESS other_format.name == format %] |
- [% END %]
- <a href="[% formaturl %]&amp;ctype=csv&amp;format=table">CSV</a>
- </td>
-
- [% IF format != "table" %]
- <td>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- </td>
-
- [% sizeurl = BLOCK %]report.cgi?
- [% switchbase %]&amp;action=wrap&amp;format=
- [% format FILTER html %][% END %]
- <td align="center">
- <a href="[% sizeurl %]&amp;width=[% width %]&amp;height=
- [% height + 100 %]">Taller</a><br>
- <a href="[% sizeurl %]&amp;width=[% width - 100 %]&amp;height=
- [% height %]">Thinner</a> *
- <a href="[% sizeurl %]&amp;width=[% width + 100 %]&amp;height=
- [% height %]">Fatter</a>&nbsp;&nbsp;&nbsp;&nbsp;<br>
- <a href="[% sizeurl %]&amp;width=[% width %]&amp;height=
- [% height - 100 %]">Shorter</a><br>
- </td>
- [% END %]
- </tr>
- </table>
+ [% formats = [ { name => "pie", description => "Pie" },
+ { name => "bar", description => "Bar" },
+ { name => "line", description => "Line" },
+ { name => "table", description => "Table" } ] %]
+
+ [% formaturl = "report.cgi?$switchbase&amp;width=$width&amp;height=$height&amp;action=wrap" %]
+ [% FOREACH other_format = formats %]
+ [% NEXT IF other_format.name == "pie" AND row_field AND col_field %]
+ [% UNLESS other_format.name == format %]
+ <a href="[% formaturl %]&amp;format=[% other_format.name %]">
+ [% END %]
+ [% other_format.description FILTER html %]
+ [% "</a>" UNLESS other_format.name == format %] |
+ [% END %]
+ <a href="[% formaturl %]&amp;ctype=csv&amp;format=table">CSV</a>
<table>
<tr>
@@ -161,7 +127,7 @@
Edit this report</a>
[% END %]
</td>
- <td>&nbsp;</td>
+ <td>|</td>
<td>
[% IF saved_report_id %]
<a href="report.cgi?action=del&amp;saved_report_id=[% saved_report_id FILTER uri %]&amp;token=