[%# 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. #%] [%# # field: (field object) bug_fields.$field_name object # field_type: (const) constants.FIELD_TYPE_* # no_label: (boolean) don't output label # label: (string) field label text (default: field_descs.${$field.name} # view_only: (boolean) don't allow editing (default: determined from bug.check_can_change_field) # edit_only: (boolean) always render the edit ui # container: (boolean) output just a label and the content (eg. for multiple fields next to one label) # value: (string) visible value (default: bug.$name) # values: (array of string) list of value objects (FIELD_TYPE_SINGLE_SELECT and _BUG_URLS only) (default: lazy-load on edit) # inline: (boolean) output field as a table-cell instead of as a stand-alone div (default: false) # no_indent: (boolean) don't indent the field (left-padding) (default: false) # full_width: (boolean) the field takes up the complete page width (default: false) # short_width: (boolean) the field shouldn't take up much space at all (default: false) # hide_on_view: (boolean) hide field from read-only view (default: false) # hide_on_edit: (boolean) hide content when in edit mode (default: false) #%] [% IF field_type.defined && !field; RETURN; END; IF !name.defined; name = field.name; END; IF !value.defined; value = bug.$name; END; IF hide_on_edit; view_only = 1; END; IF view_only || container; editable = 0; END; IF !editable.defined; editable = bug.check_can_change_field(name, 0, 1); END; IF inline && !label.defined; no_label = 1; END; IF !no_label && !label.defined; label = field_descs.${field.name}; END; IF field_type == ""; field_type = -1; END; IF field_type == constants.FIELD_TYPE_DATE || field_type == constants.FIELD_TYPE_DATETIME; short_width = 1; END; %] [%# bug-urls, currently just see-also %] [% BLOCK bug_urls %] [% FOREACH url IN values %]
[% IF url.isa('Bugzilla::BugUrl::Bugzilla::Local') %] [% url.target_bug_id FILTER bug_link(url.target_bug_id, use_alias => 1) FILTER none %] [% ELSE %] [% url.name FILTER html %] [% END %] [% IF edit %] [% END %]
[% END %] [% IF edit %] [% END %] [% END %] [%# bug lists, depencancies, blockers %] [% BLOCK bug_list %] [% IF NOT edit %] [% FOREACH b IN values %] [% INCLUDE bug/link.html.tmpl bug=b link_text=b.id use_alias=1 %] [% ", " UNLESS loop.last %] [% END %] [% ELSE %] [% END %] [% END %]