[%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Myk Melez #%] [%# We list flags by looping twice over the flag types relevant for the bug. # In the first loop, we display existing flags and then, for active types, # we display UI for adding new flags. In the second loop, we display UI # for adding additional new flags for those types for which a flag already # exists but which are multiplicable (can have multiple flags of the type # on a single bug/attachment). #%] [% DEFAULT flag_table_id = "flags" %] [% UNLESS flag_no_header %] [% IF any_flags_requesteeble %] [% END %] [% END %] [%# Step 1: Display every flag type (except inactive types with no flags). %] [% FOREACH type = flag_types %] [%# Step 1a: Display existing flag(s). %] [% FOREACH flag = type.flags %] [% IF any_flags_requesteeble %] [% END %] [% END %] [%# Step 1b: Display UI for setting flag. %] [% IF (!type.flags || type.flags.size == 0) && type.is_active %] [% IF any_flags_requesteeble %] [% END %] [% END %] [% END %] [%# Step 2: Display flag type again (if type is multiplicable). %] [% FOREACH type = flag_types %] [% NEXT UNLESS type.flags && type.flags.size > 0 && type.is_multiplicable && type.is_active %] [% IF !separator_displayed %] [% separator_displayed = 1 %] [% END %] [% IF any_flags_requesteeble %] [% END %] [% END %]
Flags: Requestee:
[% flag.setter.nick FILTER html %]: [% IF type.is_active && type.is_requesteeble %] [% IF Param('usemenuforusers') %] [% INCLUDE global/userselect.html.tmpl name => "requestee-$flag.id" id => "requestee-$flag.id" value => flag.requestee.login multiple => 0 emptyok => 1 custom_userlist => flag.type.grant_list %] [% ELSE %] () [% END %] [% END %]
  [% IF type.is_requesteeble %] [% IF Param('usemenuforusers') %] [% INCLUDE global/userselect.html.tmpl name => "requestee_type-$type.id" id => "requestee_type-$type.id" multiple => type.is_multiplicable * 3 emptyok => !type.is_multiplicable custom_userlist => type.grant_list %] [% ELSE %] () [% END %] [% END %]

addl. [% IF type.is_requesteeble %] [% IF Param('usemenuforusers') %] [% INCLUDE global/userselect.html.tmpl name => "requestee_type-$type.id" id => "requestee_type-$type.id" multiple => type.is_multiplicable * 3 emptyok => !type.is_multiplicable custom_userlist => type.grant_list %] [% ELSE %] () [% END %] [% END %]