From c19995a905335b5243299006223a50ad0617c097 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 28 Apr 2015 13:12:16 +0800 Subject: Bug 1153102: add hooks for bug bounty display and form --- .../hook/bug_modal/attachments-actions.html.tmpl | 13 ------------- .../hook/bug_modal/attachments-row.html.tmpl | 1 - .../hook/bug_modal/edit-top_actions.html.tmpl | 22 ++++++++++++++++++++++ 3 files changed, 22 insertions(+), 14 deletions(-) delete mode 100644 extensions/BMO/template/en/default/hook/bug_modal/attachments-actions.html.tmpl create mode 100644 extensions/BMO/template/en/default/hook/bug_modal/edit-top_actions.html.tmpl (limited to 'extensions/BMO/template/en/default') diff --git a/extensions/BMO/template/en/default/hook/bug_modal/attachments-actions.html.tmpl b/extensions/BMO/template/en/default/hook/bug_modal/attachments-actions.html.tmpl deleted file mode 100644 index 97d0ed739..000000000 --- a/extensions/BMO/template/en/default/hook/bug_modal/attachments-actions.html.tmpl +++ /dev/null @@ -1,13 +0,0 @@ -[%# 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. - #%] - -[% RETURN IF !user.in_group("bounty-team") || has_bounty_attachment %] - diff --git a/extensions/BMO/template/en/default/hook/bug_modal/attachments-row.html.tmpl b/extensions/BMO/template/en/default/hook/bug_modal/attachments-row.html.tmpl index 67ab62f5a..97d255b0b 100644 --- a/extensions/BMO/template/en/default/hook/bug_modal/attachments-row.html.tmpl +++ b/extensions/BMO/template/en/default/hook/bug_modal/attachments-row.html.tmpl @@ -8,7 +8,6 @@ [% RETURN UNLESS attachment.is_bounty_attachment; - has_bounty_attachment = 1; attachment_rendered = 1; bounty = attachment.bounty_details; %] diff --git a/extensions/BMO/template/en/default/hook/bug_modal/edit-top_actions.html.tmpl b/extensions/BMO/template/en/default/hook/bug_modal/edit-top_actions.html.tmpl new file mode 100644 index 000000000..03c7d2e49 --- /dev/null +++ b/extensions/BMO/template/en/default/hook/bug_modal/edit-top_actions.html.tmpl @@ -0,0 +1,22 @@ +[%# 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. + #%] + +[% + RETURN IF !user.in_group("bounty-team"); + has_bounty_attachment = 0; + FOREACH attachment IN bug.attachments; + IF attachment.is_bounty_attachment; + has_bounty_attachment = 1; + LAST; + END; + END; +%] + -- cgit v1.2.3-24-g4f1b