[%# 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 #%] [%# 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 field.visibility_field.defined %] [% IF !bug.${field.visibility_field.name} .contains(field.visibility_value.name) %] [% SET hidden = 1 %] [% END %] [% END %] [% IF NOT no_tds %] [% IF editable %] ' IF editable %] [% END %] [% IF NOT no_tds %] [% 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 bug.${field.name} %] [% bug.${field.name} FILTER bug_link(bug.${field.name}) 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 %] [% CASE constants.FIELD_TYPE_BUG_URLS %] [% '
    ' IF value.size %] [% FOREACH url = value %]
  • [% url FILTER html %] [% IF editable %] [% END %]
  • [% END %] [% '
' IF value.size %] [% IF editable && Param('use_see_also') %]
[% END %] [% END %] [% ELSIF field.type == constants.FIELD_TYPE_TEXTAREA %]
[% value FILTER wrap_comment(60) FILTER html %]
[% ELSIF field.type == constants.FIELD_TYPE_BUG_ID %] [% IF bug.${field.name} %] [% bug.${field.name} FILTER bug_link(bug.${field.name}) FILTER none %] [% END %] [% ELSE %] [% value.join(', ') FILTER html %] [% END %] [% Hook.process('end_field_column') %] [% '' IF NOT no_tds %]