~ubuntu-branches/ubuntu/edgy/bugzilla/edgy

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Alexis Sukrieh
  • Date: 2005-10-03 16:51:01 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051003165101-38n0y5qofd68vole
Tags: 2.18.4-1
* New upstream minor release
  + Fixed a security issue: It was possible to bypass the "user
    visibility groups" restrictions if user-matching was turned on
    in "substring" mode.
  + Fixed a security issue: config.cgi exposed information to users who
    weren't logged in, even when "requirelogin" was turned on in Bugzilla.
  (closes: #331206)

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
  #                 <rdean@cambianetworks.com>
 
21
  #%]
 
22
 
 
23
[%# INTERFACE:
 
24
  # buglistbase: The base query for this table, in URL form
 
25
  # col_field: string. Name of the field being plotted as columns.
 
26
  # row_field: string. Name of the field being plotted as rows.
 
27
  # tbl_field: string. Name of the field being plotted as tables.
 
28
  # col_names: array. List of values for the field being plotted as columns.
 
29
  # row_names: array. List of values for the field being plotted as rows.
 
30
  # data: <depends on format>. Data to plot. Only data.$tbl is accessed. 
 
31
  # tbl: Name of a hash in data which is the table to be plotted.
 
32
  #%]
 
33
 
 
34
[% PROCESS "global/field-descs.none.tmpl" %]
 
35
 
 
36
[% col_field_disp = field_descs.$col_field || col_field %]
 
37
[% row_field_disp = field_descs.$row_field || row_field %]
 
38
  
 
39
[% IF tbl == "-total-" %]
 
40
  [% urlbase = BLOCK %]buglist.cgi?[% buglistbase %]
 
41
  [% "&amp;$tbl_vals" IF tbl_vals %][% END %]
 
42
[% ELSE %]
 
43
  [% urlbase = BLOCK %]buglist.cgi?[% buglistbase %]&amp;
 
44
  [% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %][% END %]
 
45
[% END %]
 
46
 
 
47
<table>
 
48
  [% IF tbl_field %]
 
49
    <tr>
 
50
      <td>
 
51
      </td>
 
52
      <td align="center">        
 
53
        <h2>[% tbl_disp FILTER html %]</h2>
 
54
      </td>
 
55
    </tr>
 
56
  [% END %]  
 
57
  <tr>
 
58
    <td>
 
59
    </td>
 
60
    <td align="center">
 
61
      <strong>[% col_field_disp FILTER html %]</strong>
 
62
    </td>
 
63
  </tr>
 
64
 
 
65
  <tr>
 
66
    <td valign="middle">
 
67
      <strong>[% row_field_disp FILTER html %]</strong>
 
68
    </td>
 
69
    <td>
 
70
 
 
71
 
 
72
[% classes = [ [ "t1", "t2" ] , [ "t3", "t4" ] ] %]
 
73
[% col_idx = 0 %]
 
74
[% row_idx = 0 %]
 
75
[% grand_total = 0 %]
 
76
 
 
77
<table border="1">
 
78
  [% IF col_field %]
 
79
    <tr>
 
80
      <td class="[% classes.$row_idx.$col_idx %]">
 
81
      </td>
 
82
      [% FOREACH col = col_names %]
 
83
        [% col_totals.$col = 0 %]
 
84
        [% NEXT IF col == "" %]
 
85
        
 
86
        [% col_idx = 1 - col_idx %]
 
87
        <td class="[% classes.$row_idx.$col_idx %]">
 
88
          [% col FILTER html FILTER replace('^ $','&nbsp;') %]
 
89
        </td>
 
90
      [% END %]
 
91
      <td class="ttotal">
 
92
        Total
 
93
      </td>
 
94
    </tr>
 
95
  [% END %]
 
96
  
 
97
  [% FOREACH row = row_names %]
 
98
    [% row_total = 0 %]
 
99
    
 
100
    [% row_idx = 1 - row_idx %]
 
101
    <tr>
 
102
      <td class="[% classes.$row_idx.$col_idx %]" align="right">
 
103
        [% row FILTER html FILTER replace('^ $','&nbsp;') %]
 
104
      </td>
 
105
      [% FOREACH col = col_names %]
 
106
        [% row_total = row_total + data.$tbl.$col.$row %]
 
107
        [% NEXT IF col == "" %]
 
108
        [% col_totals.$col = col_totals.$col + data.$tbl.$col.$row %]
 
109
        
 
110
        [% col_idx = 1 - col_idx %]
 
111
        <td class="[% classes.$row_idx.$col_idx %]" align="center">
 
112
          [% IF data.$tbl.$col.$row AND data.$tbl.$col.$row > 0 %]
 
113
            <a href="[% urlbase %]&amp;
 
114
              [% row_field FILTER url_quote %]=[% row FILTER url_quote %]&amp;
 
115
              [% col_field FILTER url_quote %]=[% col FILTER url_quote %]">
 
116
              [% data.$tbl.$col.$row %]</a>
 
117
          [% ELSE %]
 
118
            .
 
119
          [% END %]
 
120
        </td>
 
121
      [% END %] 
 
122
      <td class="ttotal" align="right">
 
123
        <a href="[% urlbase %]&amp;
 
124
          [% row_field FILTER url_quote %]=[% row FILTER url_quote %]
 
125
          [% "&amp;$col_vals" IF col_vals %]">
 
126
        [% row_total %]</a>
 
127
        [% grand_total = grand_total + row_total %]
 
128
      </td>
 
129
    </tr>
 
130
  [% END %]
 
131
  
 
132
  <tr>
 
133
    [% row_idx = 1 - row_idx %]
 
134
    <td class="ttotal">
 
135
      Total
 
136
    </td>
 
137
    [% FOREACH col = col_names %]
 
138
      [% NEXT IF col == "" %]
 
139
      
 
140
      <td class="ttotal" align="center">
 
141
        <a href="[% urlbase %]&amp;
 
142
          [% col_field FILTER url_quote %]=[% col FILTER url_quote %]
 
143
          [% "&amp;$row_vals" IF row_vals %]">
 
144
        [% col_totals.$col %]</a>
 
145
      <strong>
 
146
      </td> 
 
147
    [% END %]
 
148
    <td class="ttotal" align="right">
 
149
      <strong>
 
150
        <a href="[% urlbase %]
 
151
          [% "&amp;$row_vals" IF row_vals %]
 
152
          [% "&amp;$col_vals" IF col_vals %]">[% grand_total %]</a>
 
153
      </strong>
 
154
    </td>
 
155
  </tr>
 
156
</table>
 
157
 
 
158
      
 
159
    </td>
 
160
  </tr>
 
161
</table>