summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/pages/triage_owners.html.tmpl
blob: 3663c292549b23ed09e6af411d242229292f53af (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
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the BMO Extension
  #
  # The Initial Developer of the Original Code is the Mozilla Foundation
  # Portions created by the Initial Developers are Copyright (C) 2011 the
  # Initial Developer. All Rights Reserved.
  #
  # Contributor(s):
  #   Byron Jones <bjones@mozilla.com>
  #%]

[% PROCESS global/variables.none.tmpl %]

[% INCLUDE global/header.html.tmpl
  title = "Triage Owners"
  javascript_urls = [ "js/util.js", "js/field.js", "js/productform.js",
                      "extensions/BMO/web/js/triage_owners.js" ]
  style_urls = [ "skins/standard/buglist.css",
                 "extensions/BMO/web/styles/triage_reports.css" ]
  generate_api_token = 1
%]

<noscript>
<h2>Javascript is required to use this report.</h2>
</noscript>

[% PROCESS "global/field-descs.none.tmpl" %]

<form id="triageOwners" name="triageOwners" action="page.cgi" method="GET">
  <input type="hidden" name="id" value="triage_owners.html">
  <input type="hidden" name="json_data" id="json_data" data-json_data="[% json_data FILTER html %]">

  <h3>Show Triage Owners</h3>

  <table id="triage_owners_form">
  <tr>
    <th>Product:</th>
    <td>
      <select name="product" id="product">
        <option value="">__Any__</option>
        [% FOREACH p = user.get_selectable_products %]
          <option value="[% p.name FILTER html %]"
            [% " selected" IF product == p.name %]>
            [% p.name FILTER html %]
          </option>
        [% END %]
      </select>
    </td>
  </tr>
  <tr>
    <th>Component:</th>
    <td>
      <select name="component" id="component" multiple size="5"></select>
    </td>
  </tr>
  <tr>
    <th>Owner:</th>
    <td>
      [% INCLUDE global/userselect.html.tmpl
         id       = "owner"
         name     = "owner"
         value    = owner
         size     = 40
         classes  = ["bz_userfield"]
         multiple = 5
      %]
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
      <input type="submit" value="Generate Report">
    </td>
  </tr>
  </table>
</form>

[% IF NOT product %]
  <p>Displaying components from default product list.</p>
[% END %]

[% IF results.size > 0 %]
  <p>
    <small>Each triage owner links to a buglist of all open [% terms.bugs %], since 2016-06-01, without a pending needinfo, where the priority is '--'.</small>
  </p>
  [% current_product = "" %]
  <table border="0" cellspacing="0" id="report" width="100%">
    </tr>
    [% FOREACH r = results %]
      [% count = loop.count() %]
      [% IF current_product != r.product %]
        [% current_product = r.product %]
        <tr class="product_header">
          <th colspan="3">[% r.product FILTER html %]</th>
        </tr>
      [% END %]
      <tr class="bz_bugitem [% count % 2 == 1 ? "bz_row_odd" : "bz_row_even" %]">
        <td>
          [% r.component FILTER html %]
        </td>
        <td>
          [% IF r.owner.id %]
            [% INCLUDE global/user.html.tmpl who = r.owner %]
          [% ELSE %]
            <em>None</em>
          [% END %]
        </td>
        <td>
          [% IF r.buglist_url %]
            <a href="[% urlbase FILTER none %]buglist.cgi?product=[% r.product FILTER uri %]&component=[% r.component FILTER uri %]&[% r.buglist_url FILTER none %]">
              [% r.bug_count FILTER html +%] [%+ terms.bugs %] found.
            </a>
          [% ELSE %]
            None
          [% END %]
        </td>
      </tr>
    [% END %]
  </table>
  <p>
    Found [% results.size %] component[% 's' IF results.size != 1 %]:
  </p>
[% ELSE %]
  <p>No components found.</p>
[% END %]

[% INCLUDE global/footer.html.tmpl %]