Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
a9c1b85e
Commit
a9c1b85e
authored
Feb 16, 2013
by
Dmitry Moskalchuk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sort groups/namespaces by human name
parent
2a4ef0fe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+1
-1
app/helpers/namespaces_helper.rb
app/helpers/namespaces_helper.rb
+2
-2
No files found.
app/controllers/dashboard_controller.rb
View file @
a9c1b85e
...
@@ -5,7 +5,7 @@ class DashboardController < ApplicationController
...
@@ -5,7 +5,7 @@ class DashboardController < ApplicationController
before_filter
:event_filter
,
only: :show
before_filter
:event_filter
,
only: :show
def
show
def
show
@groups
=
current_user
.
authorized_groups
.
sort_by
{
|
x
|
x
.
name
}
@groups
=
current_user
.
authorized_groups
.
sort_by
{
|
x
|
x
.
human_
name
}
@has_authorized_projects
=
@projects
.
count
>
0
@has_authorized_projects
=
@projects
.
count
>
0
@teams
=
current_user
.
authorized_teams
@teams
=
current_user
.
authorized_teams
@projects_count
=
@projects
.
count
@projects_count
=
@projects
.
count
...
...
app/helpers/namespaces_helper.rb
View file @
a9c1b85e
...
@@ -10,8 +10,8 @@ module NamespacesHelper
...
@@ -10,8 +10,8 @@ module NamespacesHelper
global_opts
=
[
"Global"
,
[[
'/'
,
Namespace
.
global_id
]]
]
global_opts
=
[
"Global"
,
[[
'/'
,
Namespace
.
global_id
]]
]
group_opts
=
[
"Groups"
,
groups
.
map
{
|
g
|
[
g
.
human_name
,
g
.
id
]}
]
group_opts
=
[
"Groups"
,
groups
.
sort_by
{
|
g
|
g
.
human_name
}.
map
{
|
g
|
[
g
.
human_name
,
g
.
id
]}
]
users_opts
=
[
"Users"
,
users
.
map
{
|
u
|
[
u
.
human_name
,
u
.
id
]}
]
users_opts
=
[
"Users"
,
users
.
sort_by
{
|
u
|
u
.
human_name
}.
map
{
|
u
|
[
u
.
human_name
,
u
.
id
]}
]
options
=
[]
options
=
[]
options
<<
global_opts
if
current_user
.
admin
options
<<
global_opts
if
current_user
.
admin
...
...
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