From bbd091bd25c907f6f18fed0b8ccc351429261956 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 6 Oct 2015 00:29:02 +0800 Subject: Bug 1164063 - show a warning near the attachments table for sec-high/sec-crit bugs without sec-approval? on patches --- .../hook/attachment/list-warnings.html.tmpl | 30 ++++++++++++++++------ .../hook/bug_modal/attachments-warnings.html.tmpl | 24 ++++++++++++----- 2 files changed, 40 insertions(+), 14 deletions(-) (limited to 'extensions/BMO/template') diff --git a/extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl b/extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl index bc4480084..693051996 100644 --- a/extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl +++ b/extensions/BMO/template/en/default/hook/attachment/list-warnings.html.tmpl @@ -7,12 +7,26 @@ #%] [% - RETURN UNLESS user.in_group('editbugs'); - RETURN UNLESS bug.attachments.size && bug.is_unassigned && bug.has_current_patch; + RETURN UNLESS user.in_group('editbugs') || bug.assigned_to.id == user.id; + RETURN UNLESS bug.attachments.size && bug.has_current_patch; %] - - - - Unassigned [% terms.bug %] with patches attached - - + +[% IF bug.is_unassigned %] + + + + Unassigned [% terms.bug %] with patches attached + + +[% END %] + +[% IF bug.missing_sec_approval %] + + + + + sec-approval required on patches before landing + + + +[% END %] diff --git a/extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl b/extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl index b00eabc1f..5242f47b4 100644 --- a/extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl +++ b/extensions/BMO/template/en/default/hook/bug_modal/attachments-warnings.html.tmpl @@ -7,10 +7,22 @@ #%] [% - RETURN UNLESS user.in_group('editbugs'); - RETURN UNLESS bug.attachments.size && bug.is_unassigned && bug.has_current_patch; + RETURN UNLESS user.in_group('editbugs') || bug.assigned_to.id == user.id; + RETURN UNLESS bug.attachments.size && bug.has_current_patch; %] -
- - Unassigned [% terms.bug %] with patches attached -
+ +[% IF bug.is_unassigned %] +
+ + Unassigned [% terms.bug %] with patches attached +
+[% END %] + +[% IF bug.missing_sec_approval %] +
+ + + sec-approval required on patches before landing + +
+[% END %] -- cgit v1.2.3-24-g4f1b