From c233b6940ff5dcfde22d3857ae6c334ff0904d83 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Thu, 15 Nov 2012 14:04:42 +0800 Subject: Bug 809198: Enable multiple needinfo flags on a single bug --- .../template/en/default/bug/needinfo.html.tmpl | 61 +++++++++++----------- 1 file changed, 30 insertions(+), 31 deletions(-) (limited to 'extensions/Needinfo/template/en/default/bug') diff --git a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl index d55f28157..db02df79b 100644 --- a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl +++ b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl @@ -6,29 +6,23 @@ # defined by the Mozilla Public License, v. 2.0. #%] -[% show_needinfo = 0 %] -[% needinfo_requested = 0 %] -[% needinfo_from = "" %] -[% needinfo_from_any = 0 %] -[% can_create_needinfo = 0 %] +[% needinfo_flagtype = "" %] +[% needinfo_flags = [] %] +[% can_create_needinfo = 0 %] [% FOREACH type = bug.flag_types %] [% IF type.name == 'needinfo' %] - [% show_needinfo = 1 %] + [% needinfo_flagtype = type %] [% FOREACH flag = type.flags %] [% IF flag.status == '?' %] - [% needinfo_requested = 1 %] - [% IF flag.requestee.login %] - [% needinfo_from = flag.requestee.login %] - [% ELSE %] - [% needinfo_from_any = 1 %] - [% END %] + [% needinfo_flags.push(flag) %] [% END %] [% END %] + [% LAST IF needinfo_flagtype %] [% END %] [% END %] -[% IF user.in_group('canconfirm') && !needinfo_requested %] +[% IF user.in_group('canconfirm') %] [% IF bug.status.is_open %] [% can_create_needinfo = 1 %] [% ELSE %] @@ -41,28 +35,32 @@ [% END %] [% END %] -[% IF show_needinfo %] - [%# Displays NEEDINFO tag in bug header %] - [% IF needinfo_requested %] - - [% END %] - +[% IF needinfo_flagtype %]
- [% IF needinfo_requested %] - [% IF needinfo_from == user.login || needinfo_from_any %] - Adding comment will automatically clear needinfo request. - [% ELSE %] - - + [% IF needinfo_flags.size > 0 %] + [%# Displays NEEDINFO tag in bug header %] + + + [% FOREACH flag = needinfo_flags %] + [% IF !flag.requestee || flag.requestee.id == user.id %] + Adding a comment will automatically clear needinfo the request for + [% IF !flag.requestee %]anyone[% ELSE %][% flag.requestee.login FILTER html %][% END %]. + [% ELSE %] + + + [% END %] +
[% END %] [% END %] - [% IF can_create_needinfo %] + [% IF can_create_needinfo && (needinfo_flags.size == 0 || needinfo_flagtype.is_multiplicable) %]