summaryrefslogtreecommitdiffstats
path: root/extensions/ProductDashboard/template/en/default/pages/productdashboard/components.html.tmpl
blob: 8f3703770ac41c7617585fed1817284efa8a9834 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[% IF summary.keys %]

<h3>Summary for [% summary.type FILTER html %]: [% summary.value FILTER html %]</h3>

<script>
<!--
  // Past due bugs
  [% IF user.is_timetracker %]
    PD.past_due = [
    [% FOREACH bug = summary.past_due %]
      { 
        id: '[% bug.id FILTER js %]',
        bug_status: '[% bug.status FILTER js %]', 
        version: '[% bug.version FILTER js %]',
        component: '[% bug.component FILTER js %]', 
        severity: '[% bug.severity FILTER js %]',
        summary: '[% bug.summary FILTER js %]'
      }, 
    [% END %] 
    ];
  [% END %]

  // Bugs updated recently
  PD.updated_recently = [
  [% FOREACH bug = summary.updated_recently %]
    { 
      id: '[% bug.id FILTER js %]',
      bug_status: '[% bug.status FILTER js %]', 
      version: '[% bug.version FILTER js %]',
      component: '[% bug.component FILTER js %]', 
      severity: '[% bug.severity FILTER js %]',
      summary: '[% bug.summary FILTER js %]'
    }, 
  [% END %]
  ];
-->
</script>

[% IF user.is_timetracker %]
  <p>
    <a href="#past_due">Past Due</a> |
    <a href="#updated_recently">Updated Recently</a> 
  </p>
[% END %]

<div class="yui3-skin-sam">

  [% IF user.is_timetracker %]
    <a name="past_due"></a>
    <b>[% summary.past_due.size FILTER html %] Past Due [% terms.Bugs %]</b> (deadline is before today's date)
    (<a href="[% bug_link FILTER html %]&amp;[% summary.type FILTER uri %]=[% summary.value FILTER uri %]&field0-0-0=deadline&type0-0-0=lessthan&value0-0-0=[% summary.timestamp FILTER uri %]&order=deadline">full list</a>)
    <div id="past_due"></div>
    <br>
  [% END %]

  <a name="updated_recently"></a>
  <b>[% summary.updated_recently.size FILTER html %] Most Recently Updated [% terms.Bugs %]</b>
  [% IF user.is_timetracker %](<a href="#top">back to top</a>)[% END %]
  (<a href="[% bug_link FILTER html %]&amp;[% summary.type FILTER uri %]=[% summary.value FILTER uri %]&order=changeddate DESC">full list</a>)
  <div id="updated_recently"></div>
</div>

[% ELSE %]

<script type="text/javascript">
<!--
  PD.product_name = '[% product.name FILTER js %]';
  PD.bug_status = '[% bug_status FILTER js %]';

  // Component counts 
  PD.component_counts = [
    [% FOREACH col = by_component %]
      {
        name: "[% col.0 FILTER js %]",    
        count: [% col.1 || 0 FILTER js %],
        percentage: [% col.2 || 0 FILTER js %], 
        link: '<a href="[% bug_link FILTER html %]&amp;component=[% col.0 FILTER uri %]">Link</a>'
      }, 
    [% END %]
  ];

  // Version counts
  PD.version_counts = [
    [% FOREACH col = by_version %]
      {
        name: "[% col.0 FILTER js %]",    
        count: [% col.1 || 0 FILTER js %],
        percentage: [% col.2 || 0 FILTER js %], 
        link: '<a href="[% bug_link FILTER html %]&amp;version=[% col.0 FILTER uri %]">Link</a>'
      }, 
    [% END %]
  ];

  [% IF Param('usetargetmilestone') %]
    // Milestone counts
    PD.milestone_counts = [
      [% FOREACH col = by_milestone %]
        {
          name: "[% col.0 FILTER js %]",
          count: [% col.1 || 0 FILTER js %],
          percentage: [% col.2 || 0 FILTER js %],
          link: '<a href="[% bug_link FILTER html %]&amp;target_milestone=[% col.0 FILTER uri %]">Link</a>'
        },
      [% END %]
    ];
  [% END %]
-->
</script>

<h3>[% terms.Bug %] counts per component, version and milestone.</h3>

<p>
  <a href="#component">Component</a> |
  <a href="#version">Version</a> |
  <a href="#milestone">Milestone</a>
</p>

<p>Click on a value to show a list of most recently updated [% terms.bugs %].</p>

<div class="yui3-skin-sam"> 
  <a name="component"></a>
  <b>Component</b>
  <div id="component_counts"></div>
  <br>
  <a name="version"></a>
  <b>Version</b>
  (<a href="#top">back to top</a>)
  <div id="version_counts"></div>
  [% IF Param('usetargetmilestone') %]
    <br>
    <a name="milestone"></a>
    <b>Milestone</b>
    (<a href="#top">back to top</a>)
    <div id="milestone_counts"></div>
  [% END %]
</div>

[% END %]