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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
39df53ff
Commit
39df53ff
authored
Sep 13, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the default sort set by the `Sortable` concern
parent
4c8942f9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
app/controllers/dashboard/groups_controller.rb
app/controllers/dashboard/groups_controller.rb
+1
-3
No files found.
app/controllers/dashboard/groups_controller.rb
View file @
39df53ff
class
Dashboard::GroupsController
<
Dashboard
::
ApplicationController
class
Dashboard::GroupsController
<
Dashboard
::
ApplicationController
def
index
def
index
@sort
=
params
[
:sort
]
||
'id_desc'
@groups
=
GroupsFinder
.
new
(
current_user
,
all_available:
false
).
execute
@groups
=
GroupsFinder
.
new
(
current_user
,
all_available:
false
).
execute
# Only show root groups if no parent-id is given
# Only show root groups if no parent-id is given
@groups
=
@groups
.
where
(
parent_id:
params
[
:parent_id
])
@groups
=
@groups
.
where
(
parent_id:
params
[
:parent_id
])
@groups
=
@groups
.
search
(
params
[
:filter
])
if
params
[
:filter
].
present?
@groups
=
@groups
.
search
(
params
[
:filter
])
if
params
[
:filter
].
present?
@groups
=
@groups
.
includes
(
:route
)
@groups
=
@groups
.
includes
(
:route
)
@groups
=
@groups
.
sort
(
@sort
)
@groups
=
@groups
.
sort
(
@sort
=
params
[
:sort
]
)
@groups
=
@groups
.
page
(
params
[
:page
])
@groups
=
@groups
.
page
(
params
[
:page
])
respond_to
do
|
format
|
respond_to
do
|
format
|
...
...
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