summaryrefslogtreecommitdiffstats
path: root/extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl')
-rw-r--r--extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl253
1 files changed, 79 insertions, 174 deletions
diff --git a/extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl b/extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl
index a7398c823..e454ee8e8 100644
--- a/extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl
+++ b/extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl
@@ -6,34 +6,79 @@
# defined by the Mozilla Public License, v. 2.0.
#%]
-<script type="text/javascript">
-<!--
-PD.column_defs = [
- { key:"name", label:"Name", sortable:true },
- { key:"count", label:"Count", sortable:true },
- { key:"percentage", label:"Percentage", sortable:false }
-];
-PD.fields = [
- { key:"name" },
- { key:"count", parser:"number" },
- { key:"percentage" }
-];
-PD.addStatListener("bug_counts", "bug_counts_table",
- PD.column_defs, PD.fields,
- { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25, alwaysVisible: false }) });
-PD.addStatListener("status_counts", "status_counts_table",
- PD.column_defs, PD.fields,
- { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25, alwaysVisible: false }) });
-PD.addStatListener("priority_counts", "priority_counts_table",
- PD.column_defs, PD.fields,
- { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25, alwaysVisible: false }) });
-PD.addStatListener("severity_counts", "severity_counts_table",
- PD.column_defs, PD.fields,
- { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25, alwaysVisible: false }) });
-PD.addStatListener("assignee_counts", "assignee_counts_table",
- PD.column_defs, PD.fields,
- { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25, alwaysVisible: false }) });
--->
+<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>
@@ -50,168 +95,28 @@ PD.addStatListener("assignee_counts", "assignee_counts_table",
<a href="#assignee">Assignee</a>
</p>
-<div class="yui-skin-sam">
+<div class="yui3-skin-sam">
<a name="counts"></a>
<b>[% terms.Bug %] Counts</b>
- <div id="bug_counts">
- <table id="bug_counts_table" border="0" cellspacing="3" cellpadding="0">
- <thead>
- <tr>
- <th>Name</th>
- <th>Count</th>
- <th>Percentage</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a href="[% bug_link_all FILTER html %]">Total [% terms.Bugs %]</a></td>
- <td>[% total_bugs FILTER html %]</td>
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td><a href="[% bug_link_open FILTER html %]">Open [% terms.Bugs %]</a></td>
- <td>[% total_open_bugs FILTER html %]</td>
- <td width="70%">
- [% INCLUDE bar_graph count = total_open_bugs full_bug_count = total_bugs %]
- </td>
- </tr>
- <tr>
- <td><a href="[% bug_link_closed FILTER html %]">Closed [% terms.Bugs %]</a></td>
- <td>[% total_closed_bugs FILTER html %]</td>
- <td width="70%">
- [% INCLUDE bar_graph count = total_closed_bugs full_bug_count = total_bugs %]
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ <div id="bug_counts"></div>
<br>
<a name="status"></a>
<b>Status</b>
(<a href="#top">back to top</a>)
- <div id="status_counts">
- <table id="status_counts_table" border="0" cellspacing="3" cellpadding="0">
- <thead>
- <tr>
- <th>Name</th>
- <th>Count</th>
- <th>Percentage</th>
- </tr>
- </thead>
- <tbody>
- [% FOREACH col = by_status %]
- [% NEXT IF col.0 == 'CLOSED' %]
- <tr>
- <td>
- <a href="[% bug_link_all FILTER html %]&amp;bug_status=[% col.0 FILTER uri %]">
- [% col.0 FILTER html %]</a>
- </td>
- <td>
- [% col.1 FILTER html %]
- </td>
- <td width="70%">
- [% INCLUDE bar_graph count = col.1 %]
- </td>
- </tr>
- [% END %]
- </tbody>
- </table>
- </div>
+ <div id="status_counts"></div>
<br>
<a name="priority"></a>
<b>Priority</b>
(<a href="#top">back to top</a>)
- <div id="priority_counts">
- <table id="priority_counts_table" border="0" cellspacing="3" cellpadding="0">
- <thead>
- <tr>
- <th>Name</th>
- <th>Count</th>
- <th>Percentage</th>
- </tr>
- </thead>
- </tbody>
- [% FOREACH col = by_priority %]
- <tr>
- <td>
- <a href="[% bug_link FILTER html %]&amp;priority=[% col.0 FILTER uri %]">
- [% col.0 FILTER html %]</a>
- </td>
- <td>
- [% col.1 FILTER html %]
- </td>
- <td width="70%">
- [% INCLUDE bar_graph count = col.1 %]
- </td>
- </tr>
- [% END %]
- </tbody>
- </table>
- </div>
+ <div id="priority_counts"></div>
<br>
<a name="severity"></a>
<b>Severity</b>
(<a href="#top">back to top</a>)
- <div id="severity_counts">
- <table id="severity_counts_table" border="0" cellspacing="3" cellpadding="0">
- <thead>
- <tr>
- <th>Name</th>
- <th>Count</th>
- <th>Percentage</th>
- </tr>
- </thead>
- <tbody>
- [% FOREACH col = by_severity %]
- <tr>
- <td>
- <a href="[% bug_link FILTER html %]&amp;bug_severity=[% col.0 FILTER uri %]">
- [% col.0 FILTER html %]</a>
- </td>
- <td align="right">
- [% col.1 FILTER html %]
- </td>
- <td width="70%">
- [% INCLUDE bar_graph count = col.1 %]
- </td>
- </tr>
- [% END %]
- </tbody>
- </table>
- </div>
+ <div id="severity_counts"></div>
<br>
<a name="assignee"></a>
<b>Assignee</b>
(<a href="#top">back to top</a>)
- <div id="assignee_counts">
- <table id="assignee_counts_table" border="0" cellspacing="3" cellpadding="0">
- <thead>
- <tr>
- <th>Name</th>
- <th>Count</th>
- <th>Percentage</th>
- </tr>
- </thead>
- <tbody>
- [% FOREACH col = by_assignee %]
- <tr>
- <td>
- [% IF user.id %]
- <a href="[% bug_link FILTER html %]&amp;emailassigned_to1=1&amp;emailtype1=exact&amp;email1=[% col.0.email FILTER uri %]">
- [% col.0.email FILTER html %]</a>
- [% ELSE %]
- [% col.0.realname || "No Name" FILTER html %]
- [% END %]
- </td>
- <td>
- [% col.1 FILTER html %]
- </td>
- <td width="70%">
- [% INCLUDE bar_graph count = col.1 %]
- </td>
- </tr>
- [% END %]
- </tbody>
- </table>
- </div>
+ <div id="assignee_counts"></div>
</div>