updated.html.tmpl 5.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
[%# 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): Gavin Shelley <bugzilla@chimpychompy.org>
19
  #                 Frédéric Buclin <LpSolit@gmail.com>
20 21 22
  #%]

[%# INTERFACE:
23 24
  # product : Bugzilla::Product Object; new product.
  # classification: Bugzilla::Classification Object; The product classification (may be empty or missing)
25 26
  # changes: hashref with all changes made to the product. Each key is an edited field,
  #          and its value is an arrayref of the form [old values, new values].
27 28 29
  #%]

[% IF classification %]
30
  [% classification_text = BLOCK %]
31
    of classification '[% classification.name FILTER html %]'
32 33 34
  [% END %]
[% END %]

35
[% title = BLOCK %]Updating Product '[% product.name FILTER html %]' 
36 37 38 39 40 41
                   [% classification_text FILTER none %][% END %]
[% PROCESS global/header.html.tmpl
  title = title
  style_urls = ['skins/standard/admin.css']
%]

42
[% IF changes.name.defined %]
43
  <p>
44 45 46
  Updated product name from '[% changes.name.0 FILTER html %]' to
  '<a href="editproducts.cgi?action=edit&amp;product=
  [%- product.name FILTER url_quote %]">[% product.name FILTER html %]</a>'.
47
  </p>
48 49 50
[% END %]


51
[% IF changes.description.defined %]
52
  <p>
53
    Updated description to:
54
  </p>
55
  <p style="margin: 1em 3em 1em 3em">[% product.description FILTER html_light %]</p>
56 57
[% END %]

58
[% IF changes.disallownew.defined %]
59 60
  <p>
  Product is now
61
  [% IF product.disallow_new %]
62 63 64 65 66
    closed to
  [% ELSE %]
    open for 
  [% END %]
  new [% terms.bugs %].
67
  </p>
68 69
[% END %]

70
[% IF changes.milestoneurl.defined %]
71 72
  <p>
  Updated milestone URL 
73 74 75
  [% IF changes.milestoneurl.0 != '' %]
    from<br> <a href="[%- changes.milestoneurl.0 FILTER html %]">
    [%- changes.milestoneurl.0 FILTER html %]</a>
76 77
  [% END %]
  to
78
  [% IF product.milestone_url != '' %]
79 80
     <br><a href="[%- product.milestone_url FILTER html %]">
     [%- product.milestone_url FILTER html %]</a>.
81 82 83 84 85 86
  [% ELSE %]
    be empty.
  [% END %]
  </p>
[% END %]

87
[% IF changes.defaultmilestone.defined %]
88
  <p>
89
  Updated default milestone from '[% changes.defaultmilestone.0 FILTER html %]' to
90
  '[% product.default_milestone FILTER html %]'.
91 92 93
  </p>
[% END %]
  
94
[% IF changes.votesperuser.defined %]
95 96
  <p>
  Updated votes per user from
97
  [%+ changes.votesperuser.0 FILTER html %] to
98
  [%+ product.votes_per_user FILTER html %].
99
  </p>
100
  [% checkvotes = 1 %]
101 102
[% END %]

103
[% IF changes.maxvotesperbug.defined %]
104 105
  <p>
  Updated maximum votes per [% terms.bug %] from 
106
  [%+ changes.maxvotesperbug.0 FILTER html %] to
107
  [%+ product.max_votes_per_bug FILTER html %].
108
  </p>
109
  [% checkvotes = 1 %]
110 111
[% END %]

112
[% IF changes.votestoconfirm.defined %]
113 114
  <p>
  Updated number of votes needed to confirm a [% terms.bug %] from
115
  [%+ changes.votestoconfirm.0 FILTER html %] to
116
  [%+ product.votes_to_confirm FILTER html %].
117
  </p>
118
  [% checkvotes = 1 %]
119 120
[% END %]

121
[% IF !changes.keys.size %]
122
  <p>Nothing changed for product '[% product.name FILTER html %]'.</p>
123 124 125 126 127 128 129 130 131 132 133 134
[% END %]

[%# Note that this display of changed votes and/or confirmed bugs is
    not very scalable. We could have a _lot_, and we just list them all.
    One day we should limit this perhaps, or have a more scalable display %]


[% IF checkvotes %]
  <hr>

  <p>Checking existing votes in this product for anybody who now
  has too many votes for [% terms.abug %]...<br>
135 136
  [% IF changes.too_many_votes.size %]
    [% FOREACH detail = changes.too_many_votes %]
137 138 139 140 141 142 143
      &rarr;removed votes for [% terms.bug %] <a href="show_bug.cgi?id=
     [%- detail.id FILTER url_quote %]">
     [%- detail.id FILTER html %]</a> from [% detail.name FILTER html %]<br>
    [% END %]
  [% ELSE %]
    &rarr;there were none.
  [% END %]
144
  </p>
145 146 147

  <p>Checking existing votes in this product for anybody
  who now has too many total votes...<br>
148 149
  [% IF changes.too_many_total_votes.size %]
    [% FOREACH detail = changes.too_many_total_votes %]
150 151 152 153 154 155 156
      &rarr;removed votes for [% terms.bug %] <a href="show_bug.cgi?id=
     [%- detail.id FILTER url_quote %]">
     [%- detail.id FILTER html %]</a> from [% detail.name FILTER html %]<br>
    [% END %]
  [% ELSE %]
    &rarr;there were none.
  [% END %]
157
  </p>
158 159 160

  <p>Checking unconfirmed [% terms.bugs %] in this product for any which now have
  sufficient votes...<br>
161 162
  [% IF changes.confirmed_bugs.size %]
    [% FOREACH id = changes.confirmed_bugs %]
163 164 165 166 167

      [%# This is INCLUDED instead of PROCESSED to avoid variables getting
          overwritten, which happens otherwise %]
      [% INCLUDE bug/process/results.html.tmpl
        type = 'votes'
168
        mailrecipients = { 'changer' => user.login }
169 170 171 172 173 174 175
        header_done = 1
        id = id
      %]
    [% END %]
  [% ELSE %]
    &rarr;there were none.
  [% END %]
176
  </p>
177 178 179 180 181 182

[% END %]

[% PROCESS admin/products/footer.html.tmpl %]

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