diff options
author | Byron Jones <glob@mozilla.com> | 2015-03-10 06:07:56 +0100 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-03-10 06:07:56 +0100 |
commit | ef96ae157223b3309f7703798b32b0b386b2edff (patch) | |
tree | cd0f3c6f234d40998fa6e85ad32c3cac025b610a /extensions/Review/template | |
parent | 9250c96075fda4a6a11b0f09e42423c650debcec (diff) | |
download | bugzilla-ef96ae157223b3309f7703798b32b0b386b2edff.tar.gz bugzilla-ef96ae157223b3309f7703798b32b0b386b2edff.tar.xz |
Bug 1003701: add the ability for users to prevent review/feedback/needinfo requests
Diffstat (limited to 'extensions/Review/template')
4 files changed, 44 insertions, 2 deletions
diff --git a/extensions/Review/template/en/default/hook/account/prefs/account-field.html.tmpl b/extensions/Review/template/en/default/hook/account/prefs/account-field.html.tmpl new file mode 100644 index 000000000..baf3a6b94 --- /dev/null +++ b/extensions/Review/template/en/default/hook/account/prefs/account-field.html.tmpl @@ -0,0 +1,26 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +<tr> + [%# this section is shared by both the needinfo and review extensions %] + [%# only show the label once %] + [% IF request_blocked_header %] + <td></td> + [% ELSE %] + [% request_blocked_header = 1 %] + <th align="right" valign="top">Request blocking:</th> + [% END %] + <td> + <input type="checkbox" id="block_reviews" name="block_reviews" value="1" + [% " checked" IF user.settings.block_reviews.value == "on" %] + > + <label for="block_reviews"> + Block review and feedback requests + </label> + </td> +</tr> diff --git a/extensions/Review/template/en/default/hook/global/header-start.html.tmpl b/extensions/Review/template/en/default/hook/global/header-start.html.tmpl index ff166ac4c..a1ced8108 100644 --- a/extensions/Review/template/en/default/hook/global/header-start.html.tmpl +++ b/extensions/Review/template/en/default/hook/global/header-start.html.tmpl @@ -24,12 +24,12 @@ [% IF bug %] [%# create attachment %] - [% mentors = bug.mentors %] + [% mentors = bug.mentors( exclude_review_blocked => 1 ) %] [% product_obj = bug.product_obj %] [% component_obj = bug.component_obj %] [% ELSIF attachment.bug %] [%# edit attachment %] - [% mentors = attachment.bug.mentors %] + [% mentors = attachment.bug.mentors( exclude_review_blocked => 1 ) %] [% product_obj = attachment.bug.product_obj %] [% component_obj = attachment.bug.component_obj %] [% ELSE %] diff --git a/extensions/Review/template/en/default/hook/global/setting-descs-settings.none.tmpl b/extensions/Review/template/en/default/hook/global/setting-descs-settings.none.tmpl new file mode 100644 index 000000000..f265aed10 --- /dev/null +++ b/extensions/Review/template/en/default/hook/global/setting-descs-settings.none.tmpl @@ -0,0 +1,11 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% + setting_descs.block_reviews = "Block review and feedback requests" +%] diff --git a/extensions/Review/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/Review/template/en/default/hook/global/user-error-errors.html.tmpl index ca143cca3..4fcd47a68 100644 --- a/extensions/Review/template/en/default/hook/global/user-error-errors.html.tmpl +++ b/extensions/Review/template/en/default/hook/global/user-error-errors.html.tmpl @@ -23,4 +23,9 @@ [% title = "Parameters Required" %] You may not search flag state activity without any search terms. +[% ELSIF error == "reviews_blocked" %] + [% title = "Request Blocked" %] + [% user.identity FILTER html %] is not currently accepting + '[% flagtype FILTER html %]' requests. + [% END %] |