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
52028dcd
Commit
52028dcd
authored
Feb 19, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3013 from crystax/master
Sort groups alphabetically on dashboard page
parents
bfc359ca
f7ae1bce
Changes
2
Hide 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 @
52028dcd
...
@@ -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
@groups
=
current_user
.
authorized_groups
.
sort_by
(
&
: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 @
52028dcd
...
@@ -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
(
&
: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
(
&
: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