From 120b63d507a3316666b25494bc890a024948aef8 Mon Sep 17 00:00:00 2001
From: Max Kanat-Alexander
Date: Mon, 15 Feb 2010 15:22:55 -0800
Subject: Bug 372979: Make voting into an extension r=mkanat, a=mkanat,
a=LpSolit
---
.../en/default/admin/params/bugfields.html.tmpl | 5 --
.../en/default/admin/products/create.html.tmpl | 3 -
.../default/admin/products/edit-common.html.tmpl | 33 +--------
template/en/default/admin/products/list.html.tmpl | 17 +----
.../en/default/admin/products/updated.html.tmpl | 84 +---------------------
.../default/admin/sanitycheck/messages.html.tmpl | 25 -------
.../default/admin/users/confirm-delete.html.tmpl | 23 +-----
7 files changed, 8 insertions(+), 182 deletions(-)
(limited to 'template/en/default/admin')
diff --git a/template/en/default/admin/params/bugfields.html.tmpl b/template/en/default/admin/params/bugfields.html.tmpl
index 794f925b7..58b08f615 100644
--- a/template/en/default/admin/params/bugfields.html.tmpl
+++ b/template/en/default/admin/params/bugfields.html.tmpl
@@ -34,11 +34,6 @@
usestatuswhiteboard => "Do you wish to use the Status Whiteboard field?",
- usevotes => "Do you wish to allow users to vote for ${terms.bugs}? Note that in order " _
- "for this to be effective, you will have to change the maximum " _
- "votes allowed in a product to be non-zero in " _
- "the product edit page.",
-
usebugaliases => "Do you wish to use $terms.bug aliases, which allow you to assign " _
"$terms.bugs an easy-to-remember name by which you can refer to them?",
diff --git a/template/en/default/admin/products/create.html.tmpl b/template/en/default/admin/products/create.html.tmpl
index f4a2161aa..045d3a34d 100644
--- a/template/en/default/admin/products/create.html.tmpl
+++ b/template/en/default/admin/products/create.html.tmpl
@@ -29,9 +29,6 @@
%]
[% DEFAULT
- product.votesperuser = "0",
- product.maxvotesperbug = "10000",
- product.votes_to_confirm = "0",
product.is_active = 1,
version = "unspecified",
product.defaultmilestone = constants.DEFAULT_MILESTONE
diff --git a/template/en/default/admin/products/edit-common.html.tmpl b/template/en/default/admin/products/edit-common.html.tmpl
index 2c94402d6..4812707cd 100644
--- a/template/en/default/admin/products/edit-common.html.tmpl
+++ b/template/en/default/admin/products/edit-common.html.tmpl
@@ -76,37 +76,8 @@
in this product:
- [% IF Param('usevotes') %]
-
- ...and automatically confirm [% terms.bugs %] if they get
-
- votes. (Setting this to 0 disables auto-confirming [% terms.bugs %]
- by vote.)
-
- [% END %]
+ [% ' checked="checked"' IF product.allows_unconfirmed %]>
-[% IF Param('usevotes') %]
-
-
Maximum votes per person:
-
-
-
-
-
- Maximum votes a person can put on a single [% terms.bug %]:
-
-
-
-
-[% END %]
+[% Hook.process('rows') %]
diff --git a/template/en/default/admin/products/list.html.tmpl b/template/en/default/admin/products/list.html.tmpl
index 6fd5240af..fb026aaa4 100644
--- a/template/en/default/admin/products/list.html.tmpl
+++ b/template/en/default/admin/products/list.html.tmpl
@@ -64,22 +64,7 @@
heading => "Open For New $terms.Bugs"
yesno_field => 1
},
- {
- name => "votesperuser"
- heading => "Votes Per User"
- align => 'right'
- },
- {
- name => "maxvotesperbug"
- heading => "Maximum Votes Per $terms.Bug"
- align => 'right'
- },
- {
- name => "votestoconfirm"
- heading => "Votes To Confirm"
- align => 'right'
- } ]
-%]
+] %]
[% IF showbugcounts %]
diff --git a/template/en/default/admin/products/updated.html.tmpl b/template/en/default/admin/products/updated.html.tmpl
index 6e484ff34..4140bab62 100644
--- a/template/en/default/admin/products/updated.html.tmpl
+++ b/template/en/default/admin/products/updated.html.tmpl
@@ -75,33 +75,6 @@
'[% product.default_milestone FILTER html %]'.
[% END %]
-
-[% IF changes.votesperuser.defined %]
-
- Updated votes per user from
- [%+ changes.votesperuser.0 FILTER html %] to
- [%+ product.votes_per_user FILTER html %].
-
- [% checkvotes = 1 %]
-[% END %]
-
-[% IF changes.maxvotesperbug.defined %]
-
- Updated maximum votes per [% terms.bug %] from
- [%+ changes.maxvotesperbug.0 FILTER html %] to
- [%+ product.max_votes_per_bug FILTER html %].
-
- [% checkvotes = 1 %]
-[% END %]
-
-[% IF changes.votestoconfirm.defined %]
-
- Updated number of votes needed to confirm a [% terms.bug %] from
- [%+ changes.votestoconfirm.0 FILTER html %] to
- [%+ product.votes_to_confirm FILTER html %].
-
- [% checkvotes = 1 %]
-[% END %]
[% IF changes.allows_unconfirmed.defined %]
@@ -121,65 +94,12 @@
[% END %]
+[% Hook.process('changes') %]
+
[% IF !changes.keys.size %]
Nothing changed for product '[% product.name FILTER html %]'.
[% 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 %]
-
-
-
Checking existing votes in this product for anybody who now
- has too many votes for [% terms.abug %]...
- [% IF changes.too_many_votes.size %]
- [% FOREACH detail = changes.too_many_votes %]
- →removed votes for [% terms.bug %]
- [%- detail.id FILTER html %] from [% detail.name FILTER html %]
- [% END %]
- [% ELSE %]
- →there were none.
- [% END %]
-
-
-
Checking existing votes in this product for anybody
- who now has too many total votes...
- [% IF changes.too_many_total_votes.size %]
- [% FOREACH detail = changes.too_many_total_votes %]
- →removed votes for [% terms.bug %]
- [%- detail.id FILTER html %] from [% detail.name FILTER html %]
- [% END %]
- [% ELSE %]
- →there were none.
- [% END %]
-
-
-
Checking unconfirmed [% terms.bugs %] in this product for any which now have
- sufficient votes...
- [% IF changes.confirmed_bugs.size %]
- [% FOREACH id = changes.confirmed_bugs %]
-
- [%# This is INCLUDED instead of PROCESSED to avoid variables getting
- overwritten, which happens otherwise %]
- [% INCLUDE bug/process/results.html.tmpl
- type = 'votes'
- mailrecipients = { 'changer' => user.login }
- header_done = 1
- id = id
- %]
- [% END %]
- [% ELSE %]
- →there were none.
- [% END %]
-
-
-[% END %]
-
[% PROCESS admin/products/footer.html.tmpl %]
[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/admin/sanitycheck/messages.html.tmpl b/template/en/default/admin/sanitycheck/messages.html.tmpl
index c3d5daacd..39e2258d0 100644
--- a/template/en/default/admin/sanitycheck/messages.html.tmpl
+++ b/template/en/default/admin/sanitycheck/messages.html.tmpl
@@ -81,12 +81,6 @@
[% ELSIF san_tag == "bug_check_status_everconfirmed_error_text2" %]
[% terms.Bugs %] with confirmed status but don't have everconfirmed set
- [% ELSIF san_tag == "bug_check_votes_everconfirmed" %]
- Checking votes/everconfirmed
-
- [% ELSIF san_tag == "bug_check_votes_everconfirmed_error_text" %]
- [% terms.Bugs %] that have enough votes to be confirmed but haven't been
-
[% ELSIF san_tag == "bug_check_control_values" %]
Checking for bad values in group_control_map
@@ -275,25 +269,6 @@
[% ELSIF san_tag == "unsent_bugmail_fix" %]
Send these mails.
- [% ELSIF san_tag == "vote_cache_rebuild_start" %]
- OK, now rebuilding vote cache.
-
- [% ELSIF san_tag == "vote_cache_rebuild_end" %]
- Vote cache has been rebuilt.
-
- [% ELSIF san_tag == "vote_cache_rebuild_fix" %]
- Click here to
- rebuild the vote cache
-
- [% ELSIF san_tag == "vote_cache_alert" %]
- Bad vote cache for [% PROCESS bug_link bug_id = id %]
-
- [% ELSIF san_tag == "vote_count_start" %]
- Checking cached vote counts.
-
- [% ELSIF san_tag == "vote_count_alert" %]
- Bad vote sum for [% terms.bug %] [%+ id FILTER html %].
-
[% ELSIF san_tag == "whines_obsolete_target_deletion_start" %]
OK, now removing non-existent users/groups from whines.
diff --git a/template/en/default/admin/users/confirm-delete.html.tmpl b/template/en/default/admin/users/confirm-delete.html.tmpl
index b61a99541..4711376b0 100644
--- a/template/en/default/admin/users/confirm-delete.html.tmpl
+++ b/template/en/default/admin/users/confirm-delete.html.tmpl
@@ -33,7 +33,6 @@
# namedquery_group_map: number of named queries the user has shared
# profiles_activity: number of changes made to other users' profiles
# series: number of series the viewed user has created
- # votes: number of bugs the viewed user has voted on
# watch.watched: number of users the viewed user is being watched
# by
# watch.watcher: number of users the viewed user is watching
@@ -226,8 +225,8 @@
[% END %]
[% IF assignee_or_qa || cc || component_cc || email_setting || flags.requestee ||
- namedqueries || profile_setting || quips || series || votes || watch.watched ||
- watch.watcher || whine_events || whine_schedules %]
+ namedqueries || profile_setting || quips || series || watch.watched ||
+ watch.watcher || whine_events || whine_schedules || other_safe %]
The following deletions are safe and will not generate
referential integrity inconsistencies.
@@ -372,23 +371,6 @@
will have no author anymore, but will remain available.
[% END %]
- [% IF votes %]
-
- [% otheruser.login FILTER html %] has voted on
- [% IF votes == 1 %]
- [%+ terms.abug %]
- [% ELSE %]
- [%+ votes %] [%+ terms.bugs %]
- [% END %].
- If you delete the user account,
- [% IF votes == 1 %]
- this vote
- [% ELSE %]
- these votes
- [% END %]
- will be deleted along with the user account.
-
- [% END %]
[% IF watch.watched || watch.watcher %]
[% otheruser.login FILTER html %]
@@ -445,6 +427,7 @@
but the whines themselves will be left unaltered.