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
Jérome Perrin
gitlab-ce
Commits
c9d40927
Commit
c9d40927
authored
Sep 19, 2017
by
Mark Fletcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Employ ForkProjectsFinder in ForksController
parent
63e0a423
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
app/controllers/projects/forks_controller.rb
app/controllers/projects/forks_controller.rb
+3
-5
No files found.
app/controllers/projects/forks_controller.rb
View file @
c9d40927
...
...
@@ -9,14 +9,12 @@ class Projects::ForksController < Projects::ApplicationController
def
index
base_query
=
project
.
forks
.
includes
(
:creator
)
@forks
=
base_query
.
merge
(
ProjectsFinder
.
new
(
current_user:
current_user
).
execute
)
forks
=
ForkProjectsFinder
.
new
(
project
,
params:
params
.
merge
(
search:
params
[
:filter_projects
]),
current_user:
current_user
).
execute
@total_forks_count
=
base_query
.
size
@private_forks_count
=
@total_forks_count
-
@
forks
.
size
@private_forks_count
=
@total_forks_count
-
forks
.
size
@public_forks_count
=
@total_forks_count
-
@private_forks_count
@sort
=
params
[
:sort
]
||
'id_desc'
@forks
=
@forks
.
search
(
params
[
:filter_projects
])
if
params
[
:filter_projects
].
present?
@forks
=
@forks
.
order_by
(
@sort
).
page
(
params
[
:page
])
@forks
=
forks
.
page
(
params
[
:page
])
respond_to
do
|
format
|
format
.
html
...
...
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