~ubuntu-branches/ubuntu/oneiric/bugzilla/oneiric

« back to all changes in this revision

Viewing changes to template/en/default/reports/report.html.tmpl

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Bossek
  • Date: 2008-06-27 22:34:34 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080627223434-0ib57vstn43bb4a3
Tags: 3.0.4.1-1
* Update of French, Russian and German translations. (closes: #488251)
* Added Bulgarian and Belarusian translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
[%# 1.0@bugzilla.org %]
2
 
[%# The contents of this file are subject to the Mozilla Public
3
 
  # License Version 1.1 (the "License"); you may not use this file
4
 
  # except in compliance with the License. You may obtain a copy of
5
 
  # the License at http://www.mozilla.org/MPL/
6
 
  #
7
 
  # Software distributed under the License is distributed on an "AS
8
 
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
 
  # implied. See the License for the specific language governing
10
 
  # rights and limitations under the License.
11
 
  #
12
 
  # The Original Code is the Bugzilla Bug Tracking System.
13
 
  #
14
 
  # The Initial Developer of the Original Code is Netscape Communications
15
 
  # Corporation. Portions created by Netscape are
16
 
  # Copyright (C) 1998 Netscape Communications Corporation. All
17
 
  # Rights Reserved.
18
 
  #
19
 
  # Contributor(s): Gervase Markham <gerv@gerv.net>
20
 
  #%]
21
 
  
22
 
[%# INTERFACE:
23
 
  # col_field: string. Name of the field being plotted as columns.
24
 
  # row_field: string. Name of the field being plotted as rows.
25
 
  # tbl_field: string. Name of the field being plotted as tables.
26
 
  # tbl_names: array. List of values for the field being plotted as tables.
27
 
  # time: integer. Seconds since the epoch.
28
 
  # data: <depends on format>. Data to plot. 
29
 
  # format: string. Format of the individual reports.
30
 
  # width: integer. For image charts, height of the image.
31
 
  # height: integer. For image charts, width of the image.
32
 
  # imagebase: string. Base URL for chart image.
33
 
  # switchbase: string. Base URL for format switching.
34
 
  # cumulate: boolean. For bar/line charts, whether to cumulate data sets.
35
 
  #%]
36
 
 
37
 
[% DEFAULT width = 600
38
 
           height = 350 
39
 
%]
40
 
 
41
 
[% IF min_width AND width < min_width %]
42
 
  [% width = min_width %]
43
 
[% END %]
44
 
 
45
 
[%# We ignore row_field for pie charts %]
46
 
[% IF format == "pie" %]
47
 
  [% row_field = "" %]
48
 
[% END %]
49
 
 
50
 
[% PROCESS "global/field-descs.none.tmpl" %]
51
 
 
52
 
[% tbl_field_disp = field_descs.$tbl_field || tbl_field %]
53
 
[% col_field_disp = field_descs.$col_field || col_field %]
54
 
[% row_field_disp = field_descs.$row_field || row_field %]
55
 
[% switchbase     = switchbase FILTER html %]
56
 
 
57
 
[% title = BLOCK %]
58
 
  Report: 
59
 
  [% IF tbl_field %]
60
 
    [% tbl_field_disp FILTER html %]
61
 
  [% END %]
62
 
  [% " / " IF tbl_field AND (col_field OR row_field) %]
63
 
  [% IF row_field %]
64
 
    [% row_field_disp FILTER html %]
65
 
  [% END %]
66
 
  [% " / " IF col_field AND row_field %]
67
 
  [% col_field_disp FILTER html %]
68
 
[% END %]
69
 
 
70
 
[% PROCESS global/header.html.tmpl 
71
 
  style = "
72
 
    .t1     { background-color: #ffffff } /* white       */
73
 
    .t2     { background-color: #dfefff } /* light blue  */
74
 
    .t3     { background-color: #dddddd } /* grey        */
75
 
    .t4     { background-color: #c3d3ed } /* darker blue */
76
 
    .ttotal { background-color: #cfffdf } /* light green */
77
 
  "
78
 
  header_addl_info = time2str("%Y-%m-%d %H:%M:%S", time)
79
 
%]
80
 
 
81
 
[% IF debug %]
82
 
  <p>[% query FILTER html %]</p>
83
 
[% END %]
84
 
 
85
 
<div align="center">
86
 
 
87
 
  [% FOREACH tbl = tbl_names %]    
88
 
    [% IF tbl == "-total-" %]
89
 
      [% tbl_disp = "Total" %]
90
 
    [% ELSE %]
91
 
      [% tbl_disp = tbl %]
92
 
    [% END %]
93
 
 
94
 
    [% IF format == "table" %]
95
 
      [% PROCESS "reports/report-table.html.tmpl" %]
96
 
    [% ELSE %]
97
 
      [% IF tbl %]
98
 
        <h2>[% tbl_disp FILTER html %]</h2>
99
 
      [% END %]
100
 
      
101
 
      [% imageurl = BLOCK %]report.cgi?[% imagebase FILTER html %]&amp;format=
102
 
        [% format FILTER url_quote %]&amp;ctype=png&amp;action=plot&amp;
103
 
        [% IF tbl_field %]
104
 
          [% IF tbl != "-total-" %]
105
 
            [% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %]&amp;
106
 
          [% ELSE %]
107
 
            [% FOREACH tblname = tbl_names %]
108
 
              [% IF tblname != "-total-" %]
109
 
                [% tbl_field FILTER url_quote %]=[% tblname FILTER url_quote %]&amp;
110
 
              [% END %]
111
 
            [% END %]
112
 
          [% END %]
113
 
        [% END %]width=[% width %]&amp;height=[% height %]      
114
 
      [% END %]
115
 
      
116
 
      <img alt="Graphical report results" src="[% imageurl %]"
117
 
        width="[% width %]" height="[% height %]">
118
 
    [% END %]
119
 
    <br>
120
 
  [% END %]  
121
 
 
122
 
  <table>
123
 
    <tr>
124
 
      <td>
125
 
        [% formats = [ { name => "pie",   description => "Pie" },
126
 
                       { name => "bar",   description => "Bar" },
127
 
                       { name => "line",  description => "Line" },
128
 
                       { name => "table", description => "Table" } ] %]
129
 
 
130
 
        [% formaturl = "report.cgi?$switchbase&amp;width=$width" _ 
131
 
                       "&amp;height=$height&amp;action=wrap" %]
132
 
        [% FOREACH other_format = formats %]
133
 
          [% NEXT IF other_format.name == "pie" AND row_field AND col_field %]
134
 
          [% UNLESS other_format.name == format %]
135
 
            <a href="[% formaturl %]&amp;format=[% other_format.name %]">
136
 
          [% END %]
137
 
          [% other_format.description FILTER html %]
138
 
          [% "</a>" UNLESS other_format.name == format %] | 
139
 
        [% END %]
140
 
        <a href="[% formaturl %]&amp;ctype=csv&amp;format=table">CSV</a> 
141
 
      </td>
142
 
      
143
 
      [% IF format != "table" %]
144
 
        <td>
145
 
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
146
 
        </td>
147
 
 
148
 
        [% sizeurl = BLOCK %]report.cgi?
149
 
          [% switchbase %]&amp;action=wrap&amp;format=
150
 
          [% format FILTER html %][% END %]
151
 
        <td align="center">
152
 
          <a href="[% sizeurl %]&amp;width=[% width %]&amp;height=
153
 
                   [% height + 100 %]">Taller</a><br>
154
 
          <a href="[% sizeurl %]&amp;width=[% width - 100 %]&amp;height=
155
 
                   [% height %]">Thinner</a> * 
156
 
          <a href="[% sizeurl %]&amp;width=[% width + 100 %]&amp;height=
157
 
                   [% height %]">Fatter</a>&nbsp;&nbsp;&nbsp;&nbsp;<br>
158
 
          <a href="[% sizeurl %]&amp;width=[% width %]&amp;height=
159
 
                   [% height - 100 %]">Shorter</a><br>
160
 
        </td>
161
 
      [% END %]
162
 
    </tr>
163
 
  </table>
164
 
 
165
 
  <p>
166
 
    [% IF format == "table" %]
167
 
      <a href="query.cgi?[% switchbase %]&amp;format=report-table">Edit 
168
 
      this report</a>
169
 
    [% ELSE %]
170
 
      <a href="query.cgi?[% switchbase %]&amp;chart_format=
171
 
        [% format %]&amp;format=report-graph&amp;cumulate=[% cumulate %]">
172
 
        Edit this report
173
 
      </a>
174
 
    [% END %]
175
 
  </p>
176
 
 
177
 
</div>
178
 
 
179
 
[% PROCESS global/footer.html.tmpl %]