summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-02 02:34:26 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-02 02:34:26 +0100
commitb0642d67ae6a9a7e7bbb8b8dc7a832c26bb211af (patch)
treec08cb54facdfa7f21833b6519fd0f468f5022e29 /template/en/default/admin
parent52ca02ea108a6c1d4c1ec735d3907782c2000586 (diff)
downloadbugzilla-b0642d67ae6a9a7e7bbb8b8dc7a832c26bb211af.tar.gz
bugzilla-b0642d67ae6a9a7e7bbb8b8dc7a832c26bb211af.tar.xz
Bug 487508: Allow restricting the visibility of custom fields and values by component
r=dkl, a=mkanat
Diffstat (limited to 'template/en/default/admin')
-rw-r--r--template/en/default/admin/custom_fields/cf-js.js.tmpl9
-rw-r--r--template/en/default/admin/custom_fields/edit.html.tmpl5
-rw-r--r--template/en/default/admin/fieldvalues/create.html.tmpl3
-rw-r--r--template/en/default/admin/fieldvalues/edit.html.tmpl5
4 files changed, 19 insertions, 3 deletions
diff --git a/template/en/default/admin/custom_fields/cf-js.js.tmpl b/template/en/default/admin/custom_fields/cf-js.js.tmpl
index 331d809f6..778dd3373 100644
--- a/template/en/default/admin/custom_fields/cf-js.js.tmpl
+++ b/template/en/default/admin/custom_fields/cf-js.js.tmpl
@@ -28,7 +28,14 @@ var select_values = new Array();
[% FOREACH sel_field = Bugzilla.get_fields({ is_select => 1 }) %]
select_values[[% sel_field.id FILTER js %]] = [
[% FOREACH legal_value = sel_field.legal_values %]
- [[% legal_value.id FILTER js %], '[% legal_value.name FILTER js %]'][% ',' UNLESS loop.last %]
+ [%# Prefix components with the name of their product so that admins
+ know which component we're talking about. #%]
+ [% IF sel_field.name == 'component' %]
+ [% SET value_name = legal_value.product.name _ ': ' _ legal_value.name %]
+ [% ELSE %]
+ [% SET value_name = legal_value.name %]
+ [% END %]
+ [[% legal_value.id FILTER js %], '[% value_name FILTER js %]'][% ',' UNLESS loop.last %]
[% END %]
];
[% END %]
diff --git a/template/en/default/admin/custom_fields/edit.html.tmpl b/template/en/default/admin/custom_fields/edit.html.tmpl
index b6a8ae9bd..981668260 100644
--- a/template/en/default/admin/custom_fields/edit.html.tmpl
+++ b/template/en/default/admin/custom_fields/edit.html.tmpl
@@ -100,7 +100,10 @@
<option value="[% value.id FILTER html %]"
[% ' selected="selected"'
IF field.visibility_value.id == value.id %]>
- [% value.name FILTER html %]
+ [% IF field.visibility_field.name == 'component' %]
+ [% value.product.name FILTER html %]:
+ [% END %]
+ [%+ value.name FILTER html %]
</option>
[% END %]
</select>
diff --git a/template/en/default/admin/fieldvalues/create.html.tmpl b/template/en/default/admin/fieldvalues/create.html.tmpl
index f1eec1a5a..019831489 100644
--- a/template/en/default/admin/fieldvalues/create.html.tmpl
+++ b/template/en/default/admin/fieldvalues/create.html.tmpl
@@ -75,6 +75,9 @@
[% FOREACH field_value = field.value_field.legal_values %]
[% NEXT IF field_value.name == '' %]
<option value="[% field_value.id FILTER none %]">
+ [% IF field.value_field.name == 'component' %]
+ [% field_value.product.name FILTER html %]:
+ [% END %]
[%- field_value.name FILTER html -%]
</option>
[% END %]
diff --git a/template/en/default/admin/fieldvalues/edit.html.tmpl b/template/en/default/admin/fieldvalues/edit.html.tmpl
index 5650ee87b..fb58e5784 100644
--- a/template/en/default/admin/fieldvalues/edit.html.tmpl
+++ b/template/en/default/admin/fieldvalues/edit.html.tmpl
@@ -73,7 +73,10 @@
<option value="[% field_value.id FILTER none %]"
[% ' selected="selected"'
IF field_value.id == value.visibility_value.id %]>
- [%- field_value.name FILTER html -%]
+ [% IF field.value_field.name == 'component' %]
+ [% field_value.product.name FILTER html %]:
+ [% END %]
+ [% field_value.name FILTER html -%]
</option>
[% END %]
</select>