knob.html.tmpl 7.25 KB
Newer Older
1
[%# 1.0@bugzilla.org %]
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
[%# 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 Bugzilla Bug Tracking System.
  #
  # The Initial Developer of the Original Code is Netscape Communications
  # Corporation. Portions created by Netscape are
  # Copyright (C) 1998 Netscape Communications Corporation. All
  # Rights Reserved.
  #
  # Contributor(s): Gervase Markham <gerv@gerv.net>
  #                 Vaskin Kissoyan <vkissoyan@yahoo.com>
  #%]

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

[%# *** Knob *** %]

27 28 29
<br>
<div id="knob">
  <div id="knob-options">
30 31

  [% knum = 1 %]
32
  [% initial_action_shown = 0 %]
33

34
  [% IF bug.isunconfirmed && bug.user.canconfirm %]
35
    [% PROCESS initial_action %]
36 37
    <input type="radio" id="knob-confirm" name="knob" value="confirm">
    <label for="knob-confirm">
38
      Confirm [% terms.bug %] (change status to <b>[% status_descs.NEW FILTER html %]</b>)
39
    </label>
40 41 42 43
    <br>
    [% knum = knum + 1 %]
  [% END %]

44 45
  [% IF bug.isopened && bug.bug_status != "ASSIGNED" && bug.user.canedit
        && (!bug.isunconfirmed || bug.user.canconfirm) %]
46
    [% PROCESS initial_action %]
47 48 49
    <input type="radio" id="knob-accept" name="knob" value="accept">
    <label for="knob-accept">
      Accept [% terms.bug %] (
50
      [% IF bug.isunconfirmed %]confirm [% terms.bug %], and [% END %]change
51
      status to <b>[% status_descs.ASSIGNED FILTER html %]</b>)
52 53 54 55
    </label>
    <br>
    [% knum = knum + 1 %]
  [% END %]
56

57 58
  [% IF bug.user.canedit || bug.user.isreporter %]
    [% IF bug.isopened %]
59
      [% IF bug.resolution %]
60
        [% PROCESS initial_action %]
61 62 63
        <input type="radio" id="knob-clear" name="knob" value="clearresolution">
        <label for="knob-clear">
          Clear the resolution (remove the current resolution of
64
          <b>[% status_descs.${bug.resolution} FILTER html %]</b>)
65 66
        </label>
        <br>
67 68 69
        [% knum = knum + 1 %]
      [% END %]

70
      [% PROCESS initial_action %]
71 72 73 74
      <input type="radio" id="knob-resolve" name="knob" value="resolve">
      <label for="knob-resolve">
        Resolve [% terms.bug %], changing 
        <a href="page.cgi?id=fields.html#resolution">resolution</a> to
75
      </label>  
76 77 78
      [% PROCESS select_resolution %]

      [% PROCESS duplicate %]
79

80 81 82 83 84
      [% IF bug.user.canedit %]
        <input type="radio" id="knob-reassign" name="knob" value="reassign">
        <label for="knob-reassign">
          <a href="page.cgi?id=fields.html#assigned_to">Reassign</a> 
          [% terms.bug %] to
85
        </label>
86 87
        [% safe_assigned_to = FILTER js; bug.assigned_to.login; END %]
        [% INCLUDE global/userselect.html.tmpl
88
             id => "assigned_to"
89 90 91 92 93 94 95
             name => "assigned_to"
             value => bug.assigned_to.login
             size => 32
             onchange => "if ((this.value != '$safe_assigned_to') && (this.value != '')) {
                               document.changeform.knob[$knum].checked=true;
                          }"
        %]
96
        <br>
97 98 99
        [% IF bug.isunconfirmed && bug.user.canconfirm %]
          &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="andconfirm" name="andconfirm">
          <label for="andconfirm">
100
            and confirm [% terms.bug %] (change status to <b>[% status_descs.NEW FILTER html %]</b>)
101 102 103 104
          </label>
          <br>
        [% END %]
        [% knum = knum + 1 %]
105

106 107
        <input type="radio" id="knob-reassign-cmp" name="knob" value="reassignbycomponent">
        <label for="knob-reassign-cmp">
108
          Reassign [% terms.bug %] to default assignee
109 110
          [% " and QA contact" IF Param('useqacontact') %],
          and add Default CC, of selected component
111 112
        </label>
        <br>
113 114 115
        [% IF bug.isunconfirmed && bug.user.canconfirm %]
          &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="compconfirm" name="compconfirm">
          <label for="compconfirm">
116
            and confirm [% terms.bug %] (change status to <b>[% status_descs.NEW FILTER html %]</b>)
117 118 119 120
          </label>
          <br>
        [% END %]
        [% knum = knum + 1 %]
121
      [% END %]
122 123 124
    [% ELSE %]
      [% IF bug.resolution != "MOVED" ||
           (bug.resolution == "MOVED" && bug.user.canmove) %]
125
        [% PROCESS initial_action %]
126 127 128 129 130 131 132 133
        <input type="radio" id="knob-change-resolution" name="knob" value="change_resolution">
        <label for="knob-change-resolution">
          Change <a href="page.cgi?id=fields.html#resolution">resolution</a> to
        </label>
        [% PROCESS select_resolution %]

        [% PROCESS duplicate %]

134 135 136 137
        <input type="radio" id="knob-reopen" name="knob" value="reopen">
        <label for="knob-reopen">
          Reopen [% terms.bug %]
        </label>
138 139 140 141
        <br>
        [% knum = knum + 1 %]
      [% END %]
      [% IF bug.bug_status == "RESOLVED" %]
142
        [% PROCESS initial_action %]
143 144
        <input type="radio" id="knob-verify" name="knob" value="verify">
        <label for="knob-verify">
145
          Mark [% terms.bug %] as <b>[% status_descs.VERIFIED FILTER html %]</b>
146 147
        </label>
        <br>
148 149 150
        [% knum = knum + 1 %]
      [% END %]
      [% IF bug.bug_status != "CLOSED" %]
151
        [% PROCESS initial_action %]
152 153
        <input type="radio" id="knob-close" name="knob" value="close">
        <label for="knob-close">
154
          Mark [% terms.bug %] as <b>[% status_descs.CLOSED FILTER html %]</b>
155 156
        </label>
        <br>
157 158 159 160
        [% knum = knum + 1 %]
      [% END %]
    [% END %]
  [% END %]
161
  </div>
162

163
  <div id="knob-buttons">
164
  <input type="submit" value="Commit" id="commit">
165 166
    [% IF bug.user.canmove %]
      &nbsp; <font size="+1"><b> | </b></font> &nbsp;
167
      <input type="submit" name="action" id="action"
168 169
             value="[% Param("move-button-text") %]">
    [% END %]
170 171
  </div>
</div>
172

173 174
[%# Common actions %]

175 176 177 178 179 180 181 182 183 184 185 186 187
[% BLOCK initial_action %]
  [%# Only show 'Leave as' action in combination with another knob %]
  [% IF !initial_action_shown %]
    <input type="radio" id="knob-leave" name="knob" value="none" checked="checked">
    <label for="knob-leave">
      Leave as <b>[% status_descs.${bug.bug_status} FILTER html %]&nbsp;
                  [% get_resolution(bug.resolution) FILTER html %]</b>
    </label>
    <br>
    [% initial_action_shown = 1 %]
  [% END %]
[% END %]

188 189 190 191
[% BLOCK select_resolution %]
  <select name="resolution"
          onchange="document.changeform.knob[[% knum %]].checked=true">
    [% FOREACH r = bug.choices.resolution %]
192
      <option value="[% r FILTER html %]">[% get_resolution(r) FILTER html %]</option>
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
    [% END %]
  </select>
  <br>
  [% knum = knum + 1 %]
[% END %]

[% BLOCK duplicate %]
  <input type="radio" id="knob-duplicate" name="knob" value="duplicate">
  <label for="knob-duplicate">
    Mark the [% terms.bug %] as duplicate of [% terms.bug %] #
  </label>
  <input name="dup_id" size="6"
         onchange="if (this.value != '') {document.changeform.knob[[% knum %]].checked=true}">
  <br>
  [% knum = knum + 1 %]
[% END %]