From a806b298f5bfe5914f27a1419d27366fe59da449 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 9 Sep 2006 06:11:40 +0000 Subject: Bug 287326: Ability to add custom single-select fields to a bug - Patch by Frédéric Buclin and Max Kanat-Alexander r=mkanat a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/admin/custom_fields/create.html.tmpl | 7 ++++--- template/en/default/admin/custom_fields/edit.html.tmpl | 11 ++++++++++- template/en/default/admin/custom_fields/list.html.tmpl | 12 ++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) (limited to 'template/en/default/admin/custom_fields') diff --git a/template/en/default/admin/custom_fields/create.html.tmpl b/template/en/default/admin/custom_fields/create.html.tmpl index b366371bd..e8b66deca 100644 --- a/template/en/default/admin/custom_fields/create.html.tmpl +++ b/template/en/default/admin/custom_fields/create.html.tmpl @@ -79,10 +79,11 @@ - [%# Only one field type is valid right now. But let's prepare the UI - # for future new types. %] diff --git a/template/en/default/admin/custom_fields/edit.html.tmpl b/template/en/default/admin/custom_fields/edit.html.tmpl index def825e7c..6ffa3d89d 100644 --- a/template/en/default/admin/custom_fields/edit.html.tmpl +++ b/template/en/default/admin/custom_fields/edit.html.tmpl @@ -69,7 +69,7 @@ Type: - Free Text + [% field_types.${field.type} FILTER html %]     + [% IF field.type == constants.FIELD_TYPE_SINGLE_SELECT %] + +   + + Edit + legal values for this field. + + + [% END %]
diff --git a/template/en/default/admin/custom_fields/list.html.tmpl b/template/en/default/admin/custom_fields/list.html.tmpl index e02609dd3..2f64b0f06 100644 --- a/template/en/default/admin/custom_fields/list.html.tmpl +++ b/template/en/default/admin/custom_fields/list.html.tmpl @@ -36,6 +36,10 @@ name => "sortkey" heading => "Sortkey" }, + { + name => "type_name" + heading => "Type" + }, { name => "enter_bug" heading => "Editable on Bug Creation" @@ -51,6 +55,14 @@ ] %] +[% USE Bugzilla %] +[% custom_fields = Bugzilla.get_fields({ custom => 1 }) %] + +[%# We want to display the type name of fields, not their type ID. %] +[% FOREACH cf_field = custom_fields %] + [% cf_field.type_name = field_types.${cf_field.type} %] +[% END %] + [% PROCESS admin/table.html.tmpl columns = columns data = custom_fields -- cgit v1.2.3-24-g4f1b