summaryrefslogtreecommitdiffstats
path: root/extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl
blob: e454ee8e863c1965dbad64ba5ea986237a4abb3a (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
[%# 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.
  #%]

<script>
  PD.summary = {};

  // Bug counts
  PD.summary.bug_counts = [
    { 
      name: "Total [% terms.Bugs %]",
      count: [% total_bugs || 0 FILTER js %],
      percentage: 100, 
      link: '<a href="[% bug_link_all FILTER js %]">Link</a>', 
    }, 
    {
      name: "Open [% terms.Bugs %]",
      count: [% total_open_bugs || 0 FILTER js %],
      percentage: [% open_bugs_percentage FILTER js %],
      link: '<a href="[% bug_link_open FILTER js %]">Link</a>', 
    },
    {
      name: "Closed [% terms.Bugs %]", 
      count: [% total_closed_bugs || 0 FILTER js %],
      percentage: [% closed_bugs_percentage FILTER js %],
      link: '<a href="[% bug_link_closed FILTER js %]">Link</a>',
    }
  ];
  
  // Status counts
  PD.summary.status_counts = [
    [% FOREACH col = by_status %]
      [% NEXT IF col.0 == 'CLOSED' %]
      {
        name: "[% col.0 FILTER js %]",    
        count: [% col.1 || 0 FILTER js %],
        percentage: [% col.2 || 0 FILTER js %], 
        link: '<a href="[% bug_link_all FILTER js %]&amp;bug_status=[% col.0 FILTER uri FILTER js %]">Link</a>'
      }, 
    [% END %]
  ];

  // Priority counts
  PD.summary.priority_counts = [
    [% FOREACH col = by_priority %]
      {
        name: "[% col.0 FILTER js %]",    
        count: [% col.1 || 0 FILTER js %],
        percentage: [% col.2 || 0 FILTER js %], 
        link: '<a href="[% bug_link_all FILTER js %]&amp;priority=[% col.0 FILTER uri FILTER js %]">Link</a>'
      }, 
    [% END %]
  ];

  // Severity counts
  PD.summary.severity_counts = [
    [% FOREACH col = by_severity %]
      {
        name: "[% col.0 FILTER js %]",    
        count: [% col.1 || 0 FILTER js %],
        percentage: [% col.2 || 0 FILTER js %], 
        link: '<a href="[% bug_link_all FILTER js %]&amp;bug_severity=[% col.0 FILTER uri FILTER js %]">Link</a>'
      }, 
    [% END %]
  ];

  // Assignee counts
  PD.summary.assignee_counts = [
    [% FOREACH col = by_assignee %]
      {
        name: "[% IF user.id %][% col.0.email FILTER js %][% ELSE %][% col.0.realname || 'No Name' FILTER js %][% END %]",
        count: [% col.1 || 0 FILTER js %],
        percentage: [% col.2 || 0 FILTER js %],
        link: '[% IF user.id %]<a href="[% bug_link FILTER js %]&amp;emailassigned_to1=1&amp;emailtype1=exact&amp;email1=[% col.0.email FILTER uri FILTER js %]">Link</a>[% END %]'
      },
    [% END %]
  ];
</script>

<h3>Summary of [% terms.bug %] counts</h3>

<p>
  <a href="#counts">Counts</a>
  <span class="separator"> | </span>
  <a href="#status">Status</a>
  <span class="separator"> | </span>
  <a href="#priority">Priority</a>
  <span class="separator"> | </span>
  <a href="#severity">Severity</a>
  <span class="separator"> | </span>
  <a href="#assignee">Assignee</a>
</p>

<div class="yui3-skin-sam">
  <a name="counts"></a>
  <b>[% terms.Bug %] Counts</b>
  <div id="bug_counts"></div>
  <br>
  <a name="status"></a>
  <b>Status</b>
  (<a href="#top">back to top</a>)
  <div id="status_counts"></div>
  <br>
  <a name="priority"></a>
  <b>Priority</b>
  (<a href="#top">back to top</a>)
  <div id="priority_counts"></div>
  <br>
  <a name="severity"></a>
  <b>Severity</b>
  (<a href="#top">back to top</a>)
  <div id="severity_counts"></div>
  <br>
  <a name="assignee"></a>
  <b>Assignee</b>
  (<a href="#top">back to top</a>)
  <div id="assignee_counts"></div>
</div>