[%# 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. #%] [%# # types: array of flag_type objects # no_label: if set to a true value, flag name and status will not be outputted (default: false) # view_only: if true, don't output edit ui (default: false) #%] [% IF view_only %]
[% FOREACH type IN types %] [% FOREACH flag IN type.flags %]
[% INCLUDE bug_modal/user.html.tmpl u=flag.requestee nick_only=1 %] [% activity_id = bug.find_activity_id_for_flag(flag) %] [% IF activity_id %] [% INCLUDE bug_modal/rel_time.html.tmpl ts=flag.creation_date %] [% activity_id ? "" : "" %]
[% END %] [% END %]
[% RETURN %] [% END %]
[% FOREACH type IN types; FOREACH flag IN type.flags; IF flag.requestee && flag.requestee.id == user.id; INCLUDE edit_flag t=type f=flag; ELSE; %] [% INCLUDE view_flag t=type f=flag %] [% INCLUDE edit_flag t=type f=flag %] [% END; END; END; %] [% FOREACH type IN types; NEXT IF !type.is_active || type.flags.size; INCLUDE edit_flag t=type; END; FOREACH type IN types; NEXT IF !type.is_active || !type.is_multiplicable; INCLUDE edit_flag t=type; END; %]
[% BLOCK view_flag %] [% INCLUDE bug_modal/user.html.tmpl u=f.setter nick_only=1 %] [% activity_id = bug.find_activity_id_for_flag(f) %] [% IF activity_id %] [% f.type.name FILTER html %] [% activity_id ? "" : "" %] [% f.status FILTER html %] [% IF f.requestee %] [% INCLUDE bug_modal/user.html.tmpl u=f.requestee nick_only=1 %] [% END %] [% END %] [% BLOCK edit_flag %] [% flag_id = f ? "flag-$f.id" : "flag_type-$t.id"; %] [% IF f %] [% INCLUDE bug_modal/user.html.tmpl u=f.setter nick_only=1 %] [% ELSIF t.flags.size %] addl. [% END %] [% IF (t.is_requestable && t.is_requesteeble) || (f && f.requestee) %] [% flag_name = f ? "requestee-$f.id" : "requestee_type-$t.id" %] [% END %] [% END %]