[%# 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 # Max Kanat-Alexander # Elliotte Martin # Guy Pyrzak # Reed Loden #%] [%# INTERFACE: # field: a Bugzilla::Field object # value: The value of the field for this bug. # override_legal_values (optional): The list of legal values, for select fields. # editable: Whether the field should be displayed as an editable # or as just the plain text of its value. # allow_dont_change: display the --do_not_change-- option for select fields. # value_span: A colspan for the table cell containing # the field value. # no_tds: boolean; if true, don't display the label or the # wrapping for the field. # desc_url: string; Normally the label of a non-custom field links to # fields.html. If you want it to link elsewhere, specify the # relative URL you want to link to, here. Remember to call # url_quote on any query string arguments. # bug (optional): The current Bugzilla::Bug being displayed, or a hash # with default field values being displayed on a page. #%] [% SET hidden = 0 %] [% IF bug AND !field.is_visible_on_bug(bug) %] [% SET hidden = 1 %] [% END %] [% IF NOT no_tds %] [% PROCESS "bug/field-label.html.tmpl" %] [% END %] [% Hook.process('start_field_column') %] [% IF editable %] [% SWITCH field.type %] [% CASE constants.FIELD_TYPE_FREETEXT %] [% CASE constants.FIELD_TYPE_DATETIME %]
[% CASE constants.FIELD_TYPE_BUG_ID %] [% IF value %] [% value FILTER bug_link(value, use_alias => 1) FILTER none %] [% END %] (edit) [% CASE [ constants.FIELD_TYPE_SINGLE_SELECT constants.FIELD_TYPE_MULTI_SELECT ] %] [%# When you pass an empty multi-select in the web interface, # it doesn't appear at all in the CGI object. Instead of # forcing all users of process_bug to always specify every # multi-select, we have this field defined if the multi-select # field is defined, and then if this is passed but the multi-select # isn't, we know that the multi-select was emptied. %] [% IF field.type == constants.FIELD_TYPE_MULTI_SELECT %] [% END %] [% CASE constants.FIELD_TYPE_TEXTAREA %] [% INCLUDE global/textarea.html.tmpl id = field.name name = field.name minrows = 4 maxrows = 8 cols = 60 defaultcontent = value mandatory = field.is_mandatory %] [% CASE constants.FIELD_TYPE_BUG_URLS %] [% '
    ' IF value.size %] [% FOREACH bug_url = value %]
  • [% PROCESS bug_url_link bug_url = bug_url %]
  • [% END %] [% '
' IF value.size %] [% IF Param('use_see_also') %] (add)

[% END %] [% CASE constants.FIELD_TYPE_KEYWORDS %]
[% END %] [% ELSIF field.type == constants.FIELD_TYPE_TEXTAREA %]
[% value FILTER html %]
[% ELSIF field.type == constants.FIELD_TYPE_BUG_ID %] [% IF value %] [% value FILTER bug_link(value, use_alias => 1) FILTER none %] [% END %] [% ELSIF field.type == constants.FIELD_TYPE_BUG_URLS %] [% '
    ' IF value.size %] [% FOREACH bug_url = value %]
  • [% PROCESS bug_url_link bug_url = bug_url %]
  • [% END %] [% '
' IF value.size %] [% ELSE %] [% value.join(', ') FILTER html %] [% END %] [% Hook.process('end_field_column') %] [% '' IF NOT no_tds %] [%# for reverse relationships, we show this pseudo-field after the main field %] [% IF bug.id && field.is_relationship %] [% extra_field_item = {} %] [% extra_field_item.header = field.reverse_desc _ ":" FILTER html %] [% extra_field_item.data = BLOCK %] [% FOREACH depbug = bug.related_bugs(field) %] [% depbug.id FILTER bug_link(depbug, use_alias => 1) FILTER none %][% " " %] [% END %] [% END %] [% ELSE %] [% extra_field_item = '' %] [% END %] [% BLOCK bug_url_link %] [% IF bug_url.isa('Bugzilla::BugUrl::Bugzilla::Local') %] [% bug_url.target_bug_id FILTER bug_link(bug_url.target_bug_id, use_alias => 1) FILTER none %] [% ELSE %] [% bug_url.name FILTER html %] [% END %] [% END %]