summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-04-28 07:12:16 +0200
committerByron Jones <glob@mozilla.com>2015-04-28 07:12:36 +0200
commitc19995a905335b5243299006223a50ad0617c097 (patch)
tree3b87cd0dcd350f54fb1953762fcadb6e05460bc4 /extensions/BMO/template/en
parent92059de568ef17628928a6cf19d6fca3ee505f2b (diff)
downloadbugzilla-c19995a905335b5243299006223a50ad0617c097.tar.gz
bugzilla-c19995a905335b5243299006223a50ad0617c097.tar.xz
Bug 1153102: add hooks for bug bounty display and form
Diffstat (limited to 'extensions/BMO/template/en')
-rw-r--r--extensions/BMO/template/en/default/hook/bug_modal/attachments-row.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/hook/bug_modal/edit-top_actions.html.tmpl (renamed from extensions/BMO/template/en/default/hook/bug_modal/attachments-actions.html.tmpl)15
2 files changed, 12 insertions, 4 deletions
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/attachments-actions.html.tmpl b/extensions/BMO/template/en/default/hook/bug_modal/edit-top_actions.html.tmpl
index 97d0ed739..03c7d2e49 100644
--- a/extensions/BMO/template/en/default/hook/bug_modal/attachments-actions.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug_modal/edit-top_actions.html.tmpl
@@ -6,8 +6,17 @@
# defined by the Mozilla Public License, v. 2.0.
#%]
-[% RETURN IF !user.in_group("bounty-team") || has_bounty_attachment %]
+[%
+ 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;
+%]
<button type="button" class="minor"
- onclick="document.location='page.cgi?id=attachment_bounty_form.html&bug_id=[% bug.id FILTER none %]'">
- Add Bounty Tracking Attachment
+ onclick="document.location='page.cgi?id=attachment_bounty_form.html&amp;bug_id=[% bug.id FILTER none %]'">
+ [% has_bounty_attachment ? "Edit" : "Add" %] Bounty Tracking Attachment
</button>