[%# 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. #%] [% PROCESS global/variables.none.tmpl %] [% javascript_urls = [ "js/yui3/yui/yui-min.js", "js/util.js", "js/field.js" ] %] [% IF current_tab_name == 'summary' %] [% javascript_urls.push("extensions/ProductDashboard/web/js/summary.js") %] [% ELSIF current_tab_name == 'recents' %] [% yui = [ "calendar" ] %] [% javascript_urls.push("js/field.js") %] [% javascript_urls.push("js/util.js") %] [% javascript_urls.push("extensions/ProductDashboard/web/js/recents.js") %] [% ELSIF current_tab_name == 'components' %] [% javascript_urls.push("extensions/ProductDashboard/web/js/components.js") %] [% ELSIF current_tab_name == 'duplicates' %] [% javascript_urls.push("extensions/ProductDashboard/web/js/duplicates.js") %] [% ELSIF current_tab_name == 'popularity' %] [% javascript_urls.push("extensions/ProductDashboard/web/js/popularity.js") %] [% ELSIF current_tab_name == 'roadmap' && Param('usetargetmilestone') %] [% javascript_urls.push("extensions/ProductDashboard/web/js/roadmap.js") %] [% END %] [% filtered_product = product.name FILTER html %] [% PROCESS global/header.html.tmpl title = "Product Dashboard: $filtered_product" style_urls = [ "skins/standard/buglist.css", "js/yui/assets/skins/sam/paginator.css", "extensions/ProductDashboard/web/styles/productdashboard.css" ] %] [% url_filtered_product = product.name FILTER uri %] [% url_filtered_status = bug_status FILTER uri %] [% tabs = [ { name => "summary", label => "Summary", link => "page.cgi?id=productdashboard.html&product=$url_filtered_product&bug_status=$url_filtered_status&tab=summary" }, { name => "recents", label => "Recents", link => "page.cgi?id=productdashboard.html&product=$url_filtered_product&bug_status=$url_filtered_status&tab=recents" }, { name => "components", label => "Components/Versions", link => "page.cgi?id=productdashboard.html&product=$url_filtered_product&bug_status=$url_filtered_status&tab=components" }, { name => "duplicates", label => "Duplicates", link => "page.cgi?id=productdashboard.html&product=$url_filtered_product&bug_status=$url_filtered_status&tab=duplicates" }, { name => "roadmap", label => "Road Map", link => "page.cgi?id=productdashboard.html&product=$url_filtered_product&bug_status=$url_filtered_status&tab=roadmap" }, ] %] [% IF product.votesperuser %] [% tabs.push({ name => "popularity", label => "Popularity", link => "page.cgi?id=productdashboard.html&product=$url_filtered_product&bug_status=$url_filtered_status&tab=popularity" }) %] [% END %] [% FOREACH tab IN tabs %] [% IF tab.name == current_tab_name %] [% current_tab = tab %] [% LAST %] [% END %] [% END %] [% full_bug_count = 0 %] [% IF bug_status == 'open' %] [% full_bug_count = total_open_bugs %] [% ELSIF bug_status == 'closed' %] [% full_bug_count = total_closed_bugs %] [% ELSE %] [% full_bug_count = total_bugs %] [% END %] [% bug_link = bug_link_all %] [% IF bug_status == 'open' %] [% bug_link = bug_link_open %] [% ELSIF bug_status == 'closed' %] [% bug_link = bug_link_closed %] [% END %]
[% IF summary.keys %] [% END %] [% IF product %] [% END %] Choose product: [% IF product %]
[% product.name FILTER html %]
[% product.description FILTER none %]
[% WRAPPER global/tabs.html.tmpl tabs = tabs current_tab = current_tab %] [% IF current_tab.name == 'summary' %] [% PROCESS pages/productdashboard/summary.html.tmpl %] [% END %] [% IF current_tab.name == 'recents' %] [% PROCESS pages/productdashboard/recents.html.tmpl %] [% END %] [% IF current_tab.name == 'components' %] [% PROCESS pages/productdashboard/components.html.tmpl %] [% END %] [% IF current_tab.name == 'duplicates' %] [% PROCESS pages/productdashboard/duplicates.html.tmpl %] [% END %] [% IF current_tab.name == 'popularity' %] [% PROCESS pages/productdashboard/popularity.html.tmpl %] [% END %] [% IF current_tab.name == 'roadmap' && Param('usetargetmilestone') %] [% PROCESS pages/productdashboard/roadmap.html.tmpl %] [% END %] [% END %][%# END WRAPPER %] [% END %]
[% PROCESS global/footer.html.tmpl %] [% BLOCK bar_graph %] [% IF full_bug_count > 0 %][%# No divide by zero %] [% percentage_bugs = (count / full_bug_count) * 100 FILTER format('%02.2f') %] [% ELSE %] [% percentage_bugs = 0 %] [% END %]
   [% percentage_bugs FILTER html %]%
[% END %]