Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
5f77ed27
Commit
5f77ed27
authored
Mar 11, 2008
by
wurblzap%gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 421931 â Group control identifiers on product edit page should be localizable.
Patch by Marc Schumann <wurblzap@gmail.com>; r=LpSolit, a=LpSolit
parent
8395dfa9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
30 deletions
+10
-30
editproducts.cgi
editproducts.cgi
+0
-24
edit.html.tmpl
template/en/default/admin/products/edit.html.tmpl
+10
-6
No files found.
editproducts.cgi
View file @
5f77ed27
...
...
@@ -69,28 +69,6 @@ $user->in_group('editcomponents')
action
=>
"edit"
,
object
=>
"products"
});
sub
get_group_controls
{
my
$product
=
shift
;
my
$group_controls
=
$product
->
group_controls
;
# Convert Group Controls (membercontrol and othercontrol) from
# integer to string to display Membercontrol/Othercontrol names
# in the template.
my
$constants
=
{
(
CONTROLMAPNA
)
=>
'NA'
,
(
CONTROLMAPSHOWN
)
=>
'Shown'
,
(
CONTROLMAPDEFAULT
)
=>
'Default'
,
(
CONTROLMAPMANDATORY
)
=>
'Mandatory'
};
foreach
my
$group
(
keys
%
$group_controls
)
{
foreach
my
$control
(
'membercontrol'
,
'othercontrol'
)
{
$group_controls
->
{
$group
}
->
{
$control
}
=
$constants
->
{
$group_controls
->
{
$group
}
->
{
$control
}};
}
}
return
$group_controls
;
}
#
# often used variables
#
...
...
@@ -361,7 +339,6 @@ if ($action eq 'new') {
$vars
->
{
'product'
}
=
$product
;
$vars
->
{
'classification'
}
=
new
Bugzilla::
Classification
(
$product
->
classification_id
)
if
Bugzilla
->
params
->
{
'useclassification'
};
$vars
->
{
'group_controls'
}
=
get_group_controls
(
$product
);
$vars
->
{
'token'
}
=
issue_session_token
(
'edit_product'
);
$template
->
process
(
"admin/products/edit.html.tmpl"
,
$vars
)
...
...
@@ -521,7 +498,6 @@ if ($action eq 'edit' || (!$action && $product_name)) {
}
$vars
->
{
'classification'
}
=
$classification
;
}
$vars
->
{
'group_controls'
}
=
get_group_controls
(
$product
);
$vars
->
{
'product'
}
=
$product
;
$vars
->
{
'token'
}
=
issue_session_token
(
'edit_product'
);
...
...
template/en/default/admin/products/edit.html.tmpl
View file @
5f77ed27
...
...
@@ -22,8 +22,6 @@
#
# classification: Bugzilla::Classification object; The classification
# the product is in
#
# groups_controls: a hash of group controls related to the product.
#%]
[% title = BLOCK %]Edit Product '[% product.name FILTER html %]'[% END %]
...
...
@@ -33,6 +31,12 @@
style_urls = ['skins/standard/admin.css']
%]
[% group_control = {${constants.CONTROLMAPNA} => 'NA',
${constants.CONTROLMAPSHOWN} => 'Shown',
${constants.CONTROLMAPDEFAULT} => 'Default',
${constants.CONTROLMAPMANDATORY} => 'Mandatory'}
%]
<form method="post" action="editproducts.cgi">
<table border="0" cellpadding="4" cellspacing="0">
...
...
@@ -103,12 +107,12 @@ versions:</a>
</a>
</th>
<td>
[% IF group_controls.size %]
[% FOREACH g = group_controls.values %]
[% IF
product.
group_controls.size %]
[% FOREACH g =
product.
group_controls.values %]
<b>[% g.group.name FILTER html %]:</b>
[% IF g.group.isactive %]
[% g
.membercontrol
FILTER html %]/
[% g
.othercontrol
FILTER html %]
[% g
roup_control.${g.membercontrol}
FILTER html %]/
[% g
roup_control.${g.othercontrol}
FILTER html %]
[% IF g.entry %], ENTRY[% END %]
[% IF g.canedit %], CANEDIT[% END %]
[% IF g.editcomponents %], editcomponents[% END %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment