From 12b3b674e4dac42707c39ce2389907f2e4e6a74c Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 14 Jul 2006 01:00:40 +0000 Subject: Bug 94534: Customised resolutions - Patch by Frédéric Buclin r=mkanat a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../en/default/admin/fieldvalues/list.html.tmpl | 39 +++++++++++++++++----- 1 file changed, 30 insertions(+), 9 deletions(-) (limited to 'template/en/default/admin/fieldvalues/list.html.tmpl') diff --git a/template/en/default/admin/fieldvalues/list.html.tmpl b/template/en/default/admin/fieldvalues/list.html.tmpl index d25adf2b1..f446d0f96 100644 --- a/template/en/default/admin/fieldvalues/list.html.tmpl +++ b/template/en/default/admin/fieldvalues/list.html.tmpl @@ -21,6 +21,7 @@ # displayed to the user in a list. # # field: string; the name of the field we are editing values for. + # static: array; list of values which cannot be renamed nor deleted. #%] [% USE Bugzilla %] @@ -58,15 +59,35 @@ } ] %] -[% overrides.action = [ { - match_value => "$default" - match_field => 'name' - override_content => 1 - content => "(Default value)" - override_contentlink => 1 - contentlink => undef - } ] -%] +[% IF default.defined %] + [% overrides.action = [ { + match_value => "$default" + match_field => 'name' + override_content => 1 + content => "(Default value)" + override_contentlink => 1 + contentlink => undef + } ] + %] +[% END %] + +[% IF static.size %] + [% UNLESS overrides.action.size %] + [% overrides.action = [] %] + [% END %] + + [% FOREACH static_value = static %] + [% overrides.action.push({ + match_value => "$static_value" + match_field => 'name' + override_content => 1 + content => "(Non deletable value)" + override_contentlink => 1 + contentlink => undef + }) + %] + [% END %] +[% END %] [% PROCESS admin/table.html.tmpl columns = columns -- cgit v1.2.3-24-g4f1b