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 --- template/en/default/account/prefs/email.html.tmpl | 55 +++--- .../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 +-- template/en/default/bug/edit.html.tmpl | 19 +-- template/en/default/bug/format_comment.txt.tmpl | 4 +- template/en/default/bug/process/header.html.tmpl | 4 +- template/en/default/bug/process/results.html.tmpl | 3 +- template/en/default/bug/votes/delete-all.html.tmpl | 51 ------ .../en/default/bug/votes/list-for-bug.html.tmpl | 60 ------- .../en/default/bug/votes/list-for-user.html.tmpl | 185 --------------------- template/en/default/email/newchangedmail.txt.tmpl | 37 +---- template/en/default/email/votes-removed.txt.tmpl | 55 ------ template/en/default/filterexceptions.pl | 16 -- template/en/default/global/field-descs.none.tmpl | 1 - template/en/default/global/reason-descs.none.tmpl | 40 +++++ .../en/default/global/site-navigation.html.tmpl | 7 +- template/en/default/global/user-error.html.tmpl | 39 ----- template/en/default/list/list.rdf.tmpl | 2 +- template/en/default/pages/voting.html.tmpl | 69 -------- template/en/default/search/form.html.tmpl | 23 +-- template/en/default/search/search-help.html.tmpl | 3 - .../default/search/search-report-select.html.tmpl | 4 +- template/en/default/sidebar.xul.tmpl | 3 - 28 files changed, 95 insertions(+), 775 deletions(-) delete mode 100644 template/en/default/bug/votes/delete-all.html.tmpl delete mode 100644 template/en/default/bug/votes/list-for-bug.html.tmpl delete mode 100644 template/en/default/bug/votes/list-for-user.html.tmpl delete mode 100644 template/en/default/email/votes-removed.txt.tmpl create mode 100644 template/en/default/global/reason-descs.none.tmpl delete mode 100644 template/en/default/pages/voting.html.tmpl (limited to 'template') diff --git a/template/en/default/account/prefs/email.html.tmpl b/template/en/default/account/prefs/email.html.tmpl index a4d22db73..4b76f734d 100644 --- a/template/en/default/account/prefs/email.html.tmpl +++ b/template/en/default/account/prefs/email.html.tmpl @@ -35,9 +35,6 @@ [% PROCESS global/variables.none.tmpl %] -[% useqacontact = Param('useqacontact') %] -[% usevotes = Param('usevotes') %] -

If you don't like getting a notification for "trivial" changes to [% terms.bugs %], you can use the settings below to @@ -150,21 +147,28 @@ document.write(' - + When my relationship to this [% terms.bug %] is: @@ -174,8 +178,6 @@ document.write(' [% relationship.description FILTER html %] @@ -186,16 +188,14 @@ document.write(' [% FOREACH relationship = relationships %] - [% NEXT IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR - (relationship.id == constants.REL_VOTER AND NOT usevotes) %]   @@ -223,8 +222,6 @@ document.write(' [% FOREACH relationship = relationships %] - [% NEXT IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR - (relationship.id == constants.REL_VOTER AND NOT usevotes) %] - [% END %] + [% END %] [% END %] [% FOREACH event = neg_events %] [% FOREACH relationship = relationships %] - [% IF (relationship.id == constants.REL_QA AND NOT useqacontact) OR - (relationship.id == constants.REL_VOTER AND NOT usevotes) %] - - [% END %] + [% END %] [% END %] 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.
  • [% END %] + [% Hook.process('warn_safe') %]
    diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 95376bb7d..b84aa8238 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -398,7 +398,7 @@ [% BLOCK section_details2 %] [%###############################################################%] - [%# Importance (priority, severity and votes) #%] + [%# Importance (priority and severity) #%] [%###############################################################%] @@ -414,22 +414,7 @@ bug = bug, field = bug_fields.bug_severity, no_tds = 1, value = bug.bug_severity editable = bug.check_can_change_field('bug_severity', 0, 1) %] - [% IF bug.use_votes %] - - [% IF bug.votes %] - with - - [% bug.votes %] - [% IF bug.votes == 1 %] - vote - [% ELSE %] - votes - [% END %] - [% END %] - (vote) - - [% END %] + [% Hook.process('after_importance', 'bug/edit.html.tmpl') %] diff --git a/template/en/default/bug/format_comment.txt.tmpl b/template/en/default/bug/format_comment.txt.tmpl index 27b72a918..2d4a20303 100644 --- a/template/en/default/bug/format_comment.txt.tmpl +++ b/template/en/default/bug/format_comment.txt.tmpl @@ -39,8 +39,6 @@ X[% comment_body %] *** This [% terms.bug %] has been marked as a duplicate of [% terms.bug %] [%+ comment.extra_data %] *** [% ELSIF comment.type == constants.CMT_HAS_DUPE %] *** [% terms.Bug %] [%+ comment.extra_data %] has been marked as a duplicate of this [% terms.bug %]. *** -[% ELSIF comment.type == constants.CMT_POPULAR_VOTES %] -*** This [% terms.bug %] has been confirmed by popular vote. *** [% ELSIF comment.type == constants.CMT_MOVED_TO %] X[% comment_body %] @@ -65,6 +63,8 @@ Comment on attachment [% comment.extra_data %] [%+ comment.attachment.description %] [%+ comment.body %] +[% ELSIF comment.type %] + [% Hook.process('type') %] [% ELSE %] X[% comment_body %] [% END %] diff --git a/template/en/default/bug/process/header.html.tmpl b/template/en/default/bug/process/header.html.tmpl index 79f0126d4..6b608b9ed 100644 --- a/template/en/default/bug/process/header.html.tmpl +++ b/template/en/default/bug/process/header.html.tmpl @@ -39,8 +39,8 @@ [% END %] [% ELSIF title_tag == "mid_air" %] [% title = "Mid-air collision!" %] -[% ELSIF title_tag == "change_votes" %] - [% title = "Change Votes" %] [% END %] +[% Hook.process('title') %] + [% PROCESS global/header.html.tmpl %] diff --git a/template/en/default/bug/process/results.html.tmpl b/template/en/default/bug/process/results.html.tmpl index d2adca8b8..7c1af42af 100644 --- a/template/en/default/bug/process/results.html.tmpl +++ b/template/en/default/bug/process/results.html.tmpl @@ -44,12 +44,13 @@ 'bug' => "Changes submitted for $link" , 'dupe' => "Duplicate notation added to $link" , 'dep' => "Checking for dependency changes on $link" , - 'votes' => "$Link confirmed by number of votes" , 'created' => "$Link has been added to the database" , 'move' => "$Link has been moved to another database" , } %] +[% Hook.process('title') %] +
    [% title.$type %]
    diff --git a/template/en/default/bug/votes/delete-all.html.tmpl b/template/en/default/bug/votes/delete-all.html.tmpl deleted file mode 100644 index 41b75123d..000000000 --- a/template/en/default/bug/votes/delete-all.html.tmpl +++ /dev/null @@ -1,51 +0,0 @@ -[%# 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 - #%] - -[%# INTERFACE: - # This template has no interface. - #%] - -[% PROCESS global/variables.none.tmpl %] - -[% PROCESS global/header.html.tmpl - title = "Remove your votes?" - %] - -

    - You are about to remove all of your [% terms.bug %] votes. Are you sure you wish to - remove your vote from every [% terms.bug %] you've voted on? -

    - -
    - -

    - - Yes, delete all my votes -

    -

    - - No, go back and review my votes -

    -

    - -

    -
    - -[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/bug/votes/list-for-bug.html.tmpl b/template/en/default/bug/votes/list-for-bug.html.tmpl deleted file mode 100644 index a599dc0fb..000000000 --- a/template/en/default/bug/votes/list-for-bug.html.tmpl +++ /dev/null @@ -1,60 +0,0 @@ -[%# 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 - #%] - -[%# INTERFACE: - # bug_id: integer. ID of the bug we are listing the votes for. - # users: list of hashes. May be empty. Each hash has two members: - # login_name: string. The login name of the user whose vote is attached - # vote_count: integer. The number of times that user has votes for this bug. - #%] - -[% PROCESS global/variables.none.tmpl %] - -[% PROCESS global/header.html.tmpl - title = "Show Votes" - subheader = "$terms.Bug $bug_id" - %] - -[% total = 0 %] - - - - - - - [% FOREACH voter = users %] - [% total = total + voter.vote_count %] - - - - - [% END %] -
    WhoNumber of votes
    - - [% voter.login_name FILTER email FILTER html %] - - - [% voter.vote_count %] -
    - -

    Total votes: [% total %]

    - -[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/bug/votes/list-for-user.html.tmpl b/template/en/default/bug/votes/list-for-user.html.tmpl deleted file mode 100644 index 2f97616ed..000000000 --- a/template/en/default/bug/votes/list-for-user.html.tmpl +++ /dev/null @@ -1,185 +0,0 @@ -[%# 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 - #%] - -[%# INTERFACE: - # voting_user: hash containing a 'login' field - # - # products: list of hashes containing details of products relating to - # voting: - # name: name of product - # bugs: list of bugs the user has voted for - # bug_ids: list of bug ids the user has voted for - # onevoteonly: one or more votes allowed per bug? - # total: users current vote count for the product - # maxvotes: max votes allowed for a user in this product - # maxperbug: max votes per bug allowed for a user in this product - # - # bug_id: number; if the user is voting for a bug, this is the bug id - # - # canedit: boolean; Should the votes be presented in a form, or readonly? - # - # all_bug_ids: List of all bug ids the user has voted for, across all products - #%] - -[% PROCESS global/variables.none.tmpl %] - -[% IF !header_done %] - [% subheader = voting_user.login FILTER html %] - [% IF canedit %] - [% title = "Change Votes" %] - [% IF bug_id %] - [%# We .select and .focus the input so it works for textbox and - checkbox %] - [% onload = "document.forms['voting_form'].bug_" _ bug_id _ - ".select();document.forms['voting_form'].bug_" _ bug_id _ - ".focus()" %] - [% END %] - [% ELSE %] - [% title = "Show Votes" %] - [% END %] - [% PROCESS global/header.html.tmpl - style_urls = [ "skins/standard/voting.css" ] - %] -[% ELSE %] -
    -[% END %] - -[% IF votes_recorded %] -

    - - The changes to your votes have been saved. - -

    -[% ELSE %] -
    -[% END %] - -[% IF products.size %] -
    - - - - - - - - - - [% onevoteproduct = 0 %] - [% multivoteproduct = 0 %] - [% FOREACH product = products %] - [% IF product.onevoteonly %] - [% onevoteproduct = 1 %] - [% ELSE %] - [% multivoteproduct = 1 %] - [% END %] - - - - - - - [% FOREACH bug = product.bugs %] - - - - - - - [% END %] - - - - - - [% END %] -
    Votes[% terms.Bug %] #Summary
    [% product.name FILTER html %]([% terms.bug %] list) - - [% IF product.maxperbug < product.maxvotes AND - product.maxperbug > 1 %] - - (Note: only [% product.maxperbug %] vote - [% "s" IF product.maxperbug != 1 %] allowed per [% terms.bug %] in - this product.) - - [% END %] -
    [% IF bug.id == bug_id && canedit %]Enter New Vote here → - [%- END %] - [% IF canedit %] - [% IF product.onevoteonly %] - - [% ELSE %] - - [% END %] - [% ELSE %] - [% bug.count %] - [% END %] - - [% bug.id FILTER bug_link(bug) FILTER none %] - - [% bug.summary FILTER html %] - (Show Votes) -
    [% product.total %] vote - [% "s" IF product.total != 1 %] used out of [% product.maxvotes %] - allowed. -
    -
    -
    - - [% IF canedit %] - or - view all - as [% terms.bug %] list -
    -
    - To change your votes, - [% IF multivoteproduct %] - type in new numbers (using zero to mean no votes) - [% " or " IF onevoteproduct %] - [% END %] - [% IF onevoteproduct %] - change the checkbox - [% END %] - and then click Change My Votes. - [% ELSE %] - View all - as [% terms.bug %] list - [% END %] -
    -[% ELSE %] -

    - [% IF canedit %] - You are - [% ELSE %] - This user is - [% END %] - currently not voting on any [% terms.bugs %]. -

    -[% END %] - -

    - Help with voting. -

    - -[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/email/newchangedmail.txt.tmpl b/template/en/default/email/newchangedmail.txt.tmpl index 1bcc2e40d..7d30b890d 100644 --- a/template/en/default/email/newchangedmail.txt.tmpl +++ b/template/en/default/email/newchangedmail.txt.tmpl @@ -19,6 +19,8 @@ #%] [% PROCESS "global/variables.none.tmpl" %] +[% PROCESS "global/reason-descs.none.tmpl" %] + From: [% Param('mailfrom') %] To: [% to_user.email %] Subject: [[% terms.Bug %] [%+ bugid %]] [% 'New: ' IF isnew %][%+ summary %] @@ -56,33 +58,12 @@ X-Bugzilla-Changed-Fields: [% changedfields %] -- [%# Protect the trailing space of the signature marker %] Configure [% terms.bug %]mail: [% urlbase %]userprefs.cgi?tab=email ------- You are receiving this mail because: ------- -[% FOREACH relationship = reasons %] - [% SWITCH relationship %] - [% CASE constants.REL_ASSIGNEE %] -You are the assignee for the [% terms.bug %]. - [% CASE constants.REL_REPORTER %] -You reported the [% terms.bug %]. - [% CASE constants.REL_QA %] -You are the QA contact for the [% terms.bug %]. - [% CASE constants.REL_CC %] -You are on the CC list for the [% terms.bug %]. - [% CASE constants.REL_VOTER %] -You are a voter for the [% terms.bug %]. - [% CASE constants.REL_GLOBAL_WATCHER %] -You are watching all [% terms.bug %] changes. - [% END %] +[% SET reason_lines = [] %] +[% FOREACH reason = reasons %] + [% reason_lines.push(reason_descs.$reason) IF reason_descs.$reason %] [% END %] -[% FOREACH relationship = reasons_watch %] - [% SWITCH relationship %] - [% CASE constants.REL_ASSIGNEE %] -You are watching the assignee of the [% terms.bug %]. - [% CASE constants.REL_REPORTER %] -You are watching the reporter. - [% CASE constants.REL_QA %] -You are watching the QA contact of the [% terms.bug %]. - [% CASE constants.REL_CC %] -You are watching someone on the CC list of the [% terms.bug %]. - [% CASE constants.REL_VOTER %] -You are watching a voter for the [% terms.bug %]. - [% END %] +[% FOREACH reason = reasons_watch %] + [% reason_lines.push(watch_reason_descs.$reason) + IF watch_reason_descs.$reason %] [% END %] +[%+ reason_lines.join("\n") %] diff --git a/template/en/default/email/votes-removed.txt.tmpl b/template/en/default/email/votes-removed.txt.tmpl deleted file mode 100644 index bfb37c90d..000000000 --- a/template/en/default/email/votes-removed.txt.tmpl +++ /dev/null @@ -1,55 +0,0 @@ -[%# 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): Emmanuel Seyman - #%] - -[% PROCESS global/variables.none.tmpl %] - -From: [% Param('mailfrom') %] -To: [% to %] -Subject: [% terms.Bug %] [%+ bugid %] Some or all of your votes have been removed. -X-Bugzilla-Type: voteremoved - -Some or all of your votes have been removed from [% terms.bug %] [%+ bugid %]. - -You had [% votesold FILTER html %] [%+ IF votesold == 1 %]vote[% ELSE %]votes[% END -%] on this [% terms.bug %], but [% votesremoved FILTER html %] have been removed. - -[% IF votesnew %] -You still have [% votesnew FILTER html %] [%+ IF votesnew == 1 %]vote[% ELSE %]votes[% END %] on this [% terms.bug %]. -[% ELSE %] -You have no more votes remaining on this [% terms.bug %]. -[% END %] - -Reason: -[% IF reason == "votes_bug_moved" %] - This [% terms.bug %] has been moved to a different product. - -[% ELSIF reason == "votes_too_many_per_bug" %] - The rules for voting on this product has changed; - you had too many votes for a single [% terms.bug %]. - -[% ELSIF reason == "votes_too_many_per_user" %] - The rules for voting on this product has changed; you had - too many total votes, so all votes have been removed. -[% END %] - - - -[% urlbase %]show_bug.cgi?id=[% bugid %] - diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index a488f50ca..94604dc17 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -233,7 +233,6 @@ 'global/site-navigation.html.tmpl' => [ 'bug.bug_id', - 'bug.votes', ], 'bug/comments.html.tmpl' => [ @@ -264,7 +263,6 @@ 'bug.remaining_time', 'bug.delta_ts', 'bug.bug_id', - 'bug.votes', 'group.bit', 'dep.title', 'dep.fieldname', @@ -312,19 +310,6 @@ FILTER format("%d")', ], -'bug/votes/list-for-bug.html.tmpl' => [ - 'voter.vote_count', - 'total', -], - -'bug/votes/list-for-user.html.tmpl' => [ - 'product.maxperbug', - 'bug.id', - 'bug.count', - 'product.total', - 'product.maxvotes', -], - 'bug/process/results.html.tmpl' => [ 'title.$type', '"$terms.Bug $id" FILTER bug_link(id)', @@ -482,7 +467,6 @@ 'flags.setter', 'longdescs', 'quips', - 'votes', 'series', 'watch.watched', 'watch.watcher', diff --git a/template/en/default/global/field-descs.none.tmpl b/template/en/default/global/field-descs.none.tmpl index 5012769ca..2c93c3d8a 100644 --- a/template/en/default/global/field-descs.none.tmpl +++ b/template/en/default/global/field-descs.none.tmpl @@ -84,7 +84,6 @@ "status_whiteboard" => "Whiteboard", "target_milestone" => "Target Milestone", "version" => "Version", - "votes" => "Votes", "work_time" => "Hours Worked"} %] [%# Also include any custom fields or fields which don't have a diff --git a/template/en/default/global/reason-descs.none.tmpl b/template/en/default/global/reason-descs.none.tmpl new file mode 100644 index 000000000..4a39497b5 --- /dev/null +++ b/template/en/default/global/reason-descs.none.tmpl @@ -0,0 +1,40 @@ +[%# 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 Everything Solved, Inc. + # Portions created by the Initial Developer are Copyright (C) 2010 + # the Initial Developer. All Rights Reserved. + # + # Contributor(s): + # Max Kanat-Alexander + #%] + +[% SET reason_descs = { + ${constants.REL_ASSIGNEE} => "You are the assignee for the ${terms.bug}.", + ${constants.REL_REPORTER} => "You reported the ${terms.bug}.", + ${constants.REL_QA} => "You are the QA Contact for the ${terms.bug}.", + ${constants.REL_CC} => "You are on the CC list for the ${terms.bug}.", + ${constants.REL_GLOBAL_WATCHER} => "You are watching all $terms.bug changes.", +} %] + +[% SET watch_reason_descs => { + ${constants.REL_ASSIGNEE} => + "You are the watching assignee of the ${terms.bug}.", + ${constants.REL_REPORTER} => + "You watching the reporter of the ${terms.bug}.", + ${constants.REL_QA} => + "You are watching the QA Contact of the ${terms.bug}.", + ${constants.REL_CC} => + "You are watching someone on the CC list of the ${terms.bug}.", +} %] + +[% Hook.process('end') %] diff --git a/template/en/default/global/site-navigation.html.tmpl b/template/en/default/global/site-navigation.html.tmpl index bbf4f6862..60a8ddf96 100644 --- a/template/en/default/global/site-navigation.html.tmpl +++ b/template/en/default/global/site-navigation.html.tmpl @@ -37,7 +37,7 @@ [% END %] - [%# *** Dependencies, Votes, Activity, Print-version *** %] + [%# *** Dependencies, Activity, Print-version *** %] [% IF bug %] @@ -46,11 +46,6 @@ href="showdependencygraph.cgi?id=[% bug.bug_id %]"> [% END %] - [% IF bug.use_votes %] - - [% END %] - At least ___ votes field must be a simple number. - You entered [% value FILTER html %], which isn't. - [% ELSIF error == "illegal_attachment_edit" %] [% title = "Unauthorized Action" %] You are not authorized to edit attachment [% attach_id FILTER html %]. @@ -1318,20 +1313,6 @@ [% group.name FILTER html %] is not an active [% terms.bug %] group and so you cannot edit group controls for it. - [% ELSIF error == "product_illegal_votes" %] - [% title = "Votes Must Be Non-negative" %] - [% admindocslinks = {'voting.html' => 'Setting up the voting feature'} %] - '[% votes FILTER html %]' is an invalid value for the - - [% IF field == "votesperuser" %] - Votes Per User - [% ELSIF field == "maxvotesperbug" %] - Maximum Votes Per [% terms.Bug %] - [% ELSIF field == "votestoconfirm" %] - Votes To Confirm - [% END %] - field, which should contain a non-negative number. - [% ELSIF error == "product_name_already_in_use" %] [% title = "Product name already exists" %] [% admindocslinks = {'products.html' => 'Administering products'} %] @@ -1548,21 +1529,6 @@ [% title = "User Protected" %] The user [% login FILTER html %] may not be impersonated by sudoers. - [% ELSIF error == "too_many_votes_for_bug" %] - [% title = "Illegal Vote" %] - [% admindocslinks = {'voting.html' => 'Setting up the voting feature'} %] - You may only use at most [% max FILTER html %] votes for a single - [%+ terms.bug %] in the - [% product FILTER html %] product, but you are trying to - use [% votes FILTER html %]. - - [% ELSIF error == "too_many_votes_for_product" %] - [% title = "Illegal Vote" %] - [% admindocslinks = {'voting.html' => 'Setting up the voting feature'} %] - You tried to use [% votes FILTER html %] votes in the - [% product FILTER html %] product, which exceeds the maximum of - [%+ max FILTER html %] votes for this product. - [% ELSIF error == "token_does_not_exist" %] [% title = "Token Does Not Exist" %] The token you submitted does not exist, has expired, or has @@ -1650,11 +1616,6 @@ Sorry, but you are not allowed to (un)mark comments or attachments as private. - [% ELSIF error == "votes_must_be_nonnegative" %] - [% title = "Votes Must Be Non-negative" %] - [% admindocslinks = {'voting.html' => 'Setting up the voting feature'} %] - Only use non-negative numbers for your [% terms.bug %] votes. - [% ELSIF error == "wrong_token_for_cancelling_email_change" %] [% title = "Wrong Token" %] That token cannot be used to cancel an email address change. diff --git a/template/en/default/list/list.rdf.tmpl b/template/en/default/list/list.rdf.tmpl index 99c06c1ee..d7879a694 100644 --- a/template/en/default/list/list.rdf.tmpl +++ b/template/en/default/list/list.rdf.tmpl @@ -38,7 +38,7 @@ [% bug.bug_id %] [% FOREACH column = displaycolumns %] - [% bug.$column FILTER html %] + [% bug.$column FILTER html %] [% END %] diff --git a/template/en/default/pages/voting.html.tmpl b/template/en/default/pages/voting.html.tmpl deleted file mode 100644 index 4e6fb473d..000000000 --- a/template/en/default/pages/voting.html.tmpl +++ /dev/null @@ -1,69 +0,0 @@ -[%# 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): Terry Weissman - # Gervase Markham - #%] - -[% PROCESS global/variables.none.tmpl %] -[% INCLUDE global/header.html.tmpl title = "Voting" %] - -

    [% terms.Bugzilla %] has a "voting" feature. Each product allows users to -have a certain number of votes. (Some products may not allow any, which means -you can't vote on things in those products at all.) With your vote, you -indicate which [% terms.bugs %] you think are the most important and -would like to see fixed. Note that voting is nowhere near as effective -as providing a fix yourself.

    - -

    Depending on how the administrator has configured the relevant product, -you may be able to vote for the same [% terms.bug %] more than once. -Remember that you have a limited number of votes. When weighted voting -is allowed and a limited number of votes are available to you, you will -have to decide whether you want to distribute your votes among a large -number of [% terms.bugs %] indicating your minimal interest or focus on -a few [% terms.bugs %] indicating your strong support for them. -

    - -

    To look at votes:

    - -
      -
    • Go to the query page. Do a normal query, but enter 1 in the "At least - ___ votes" field. This will show you items that match your query that - have at least one vote.
    • -
    - -

    To vote for [% terms.abug %]:

    - -
      -
    • Bring up the [% terms.bug %] in question.
    • - -
    • Click on the "(vote)" link that appears on the right of the "Importance" - fields. (If no such link appears, then voting may not be allowed in - this [% terms.bug %]'s product.)
    • - -
    • Indicate how many votes you want to give this [% terms.bug %]. This page - also displays how many votes you've given to other [% terms.bugs %], so you - may rebalance your votes as necessary.
    • -
    - -

    You will automatically get email notifying you of any changes that occur -on [% terms.bugs %] you vote for.

    - -

    You may review your votes at any time by clicking on the "My Votes" link in the page footer.

    - -[% INCLUDE global/footer.html.tmpl %] diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index 2e2ae73d6..63ca03565 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -422,20 +422,14 @@ function doOnSelectProduct(selectmode) { -[%# *** Email Numbering Votes *** %] +[%# *** Email Numbering *** %] - [% IF Param('usevotes') %] - - - - - [% END %] + [% Hook.process('email_numbering_end') %]
    - - [% IF Param('usevotes') %] - Email Addresses, [% terms.Bug %] Numbers, and Votes - [% ELSE %] - Email Addresses and [% terms.Bug %] Numbers - [% END %] - + Email Addresses and [% terms.Bug %] Numbers @@ -550,18 +544,7 @@ function doOnSelectProduct(selectmode) {
    (comma-separated list)
    - : - - - votes -
    diff --git a/template/en/default/search/search-help.html.tmpl b/template/en/default/search/search-help.html.tmpl index 12e82ba5e..4dbf6652a 100644 --- a/template/en/default/search/search-help.html.tmpl +++ b/template/en/default/search/search-help.html.tmpl @@ -82,9 +82,6 @@ roles.
    Here, you can search on what people are in what role." }, { id => "bug_id", html => "You can limit your search to a specific set of $terms.bugs ." }, -{ id => "votes", - html => "Some $terms.bugs can be voted for, and you can limit your search to - $terms.bugs
    with more than a certain number of votes." }, { id => "chfield", html => "You can search for specific types of change - this field define
    which field you are interested in changes for." }, diff --git a/template/en/default/search/search-report-select.html.tmpl b/template/en/default/search/search-report-select.html.tmpl index de6478716..2ad779248 100644 --- a/template/en/default/search/search-report-select.html.tmpl +++ b/template/en/default/search/search-report-select.html.tmpl @@ -29,7 +29,8 @@ [% rep_fields = ["classification", "product", "component", "version", "rep_platform", "op_sys", "bug_status", "resolution", "bug_severity", "priority", "target_milestone", "assigned_to", - "reporter", "qa_contact", "votes" ] %] + "reporter", "qa_contact" ] %] + [% Hook.process('rep_fields', 'search/search-report-select.html.tmpl') %]