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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
dbd6f8f6
Commit
dbd6f8f6
authored
Jul 02, 2014
by
Simon Green
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1020821 - Product drop down orders classifications alphabetically
r=gkl, a=glob
parent
a9081c21
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
Template.pm
Bugzilla/Template.pm
+6
-0
product-select.html.tmpl
template/en/default/global/product-select.html.tmpl
+4
-2
No files found.
Bugzilla/Template.pm
View file @
dbd6f8f6
...
...
@@ -17,6 +17,7 @@ use Bugzilla::Hook;
use
Bugzilla::Install::
Requirements
;
use
Bugzilla::Install::
Util
qw(install_string template_include_path
include_languages)
;
use
Bugzilla::
Classification
;
use
Bugzilla::
Keyword
;
use
Bugzilla::
Util
;
use
Bugzilla::
Error
;
...
...
@@ -1018,6 +1019,11 @@ sub create {
'css_files'
=>
\&
css_files
,
yui_resolve_deps
=>
\&
yui_resolve_deps
,
# All classifications (sorted by sortkey, name)
'all_classifications'
=>
sub
{
return
[
map
{
$_
->
name
}
Bugzilla::
Classification
->
get_all
()];
},
# Whether or not keywords are enabled, in this Bugzilla.
'use_keywords'
=>
sub
{
return
Bugzilla::
Keyword
->
any_exist
;
},
...
...
template/en/default/global/product-select.html.tmpl
View file @
dbd6f8f6
...
...
@@ -63,8 +63,10 @@
[% END %]
[% END %]
[% END %]
[% FOREACH c = classifications.keys.sort %]
<optgroup label="[% c FILTER html %]">
[% FOREACH c = all_classifications %]
[% NEXT UNLESS classifications.${c}.size %]
<optgroup label="[% c FILTER html %]">
[% FOREACH p = classifications.$c %]
<option value="[% p.$valueattribute FILTER html %]"
[% " selected" IF (cgi.param(name) == p.name) || (value.contains(p.name)) %]>
...
...
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