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
iv
gitlab-ce
Commits
f7ae1bce
Commit
f7ae1bce
authored
Feb 19, 2013
by
Dmitry Moskalchuk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Syntax fix of sorting groups/users
parent
a9c1b85e
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 @
f7ae1bce
...
@@ -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
.
human_name
}
@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 @
f7ae1bce
...
@@ -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
.
sort_by
{
|
g
|
g
.
human_name
}
.
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
.
sort_by
{
|
u
|
u
.
human_name
}
.
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