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
Boxiang Sun
gitlab-ce
Commits
449954ec
Commit
449954ec
authored
Mar 09, 2016
by
Josh Frye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow filtered dashboard/explore results to be paged. Fixes #14104
parent
60d0a20b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
CHANGELOG
CHANGELOG
+1
-0
app/controllers/dashboard/projects_controller.rb
app/controllers/dashboard/projects_controller.rb
+2
-2
app/controllers/explore/projects_controller.rb
app/controllers/explore/projects_controller.rb
+3
-3
No files found.
CHANGELOG
View file @
449954ec
...
@@ -24,6 +24,7 @@ v 8.6.0 (unreleased)
...
@@ -24,6 +24,7 @@ v 8.6.0 (unreleased)
- Show labels in dashboard and group milestone views
- Show labels in dashboard and group milestone views
- Add main language of a project in the list of projects (Tiago Botelho)
- Add main language of a project in the list of projects (Tiago Botelho)
- Add ability to show archived projects on dashboard, explore and group pages
- Add ability to show archived projects on dashboard, explore and group pages
- Fix pagination for filtered dashboard and explore pages
v 8.5.5
v 8.5.5
- Ensure removing a project removes associated Todo entries.
- Ensure removing a project removes associated Todo entries.
...
...
app/controllers/dashboard/projects_controller.rb
View file @
449954ec
...
@@ -8,7 +8,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
...
@@ -8,7 +8,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
@projects
=
filter_projects
(
@projects
)
@projects
=
filter_projects
(
@projects
)
@projects
=
@projects
.
includes
(
:namespace
)
@projects
=
@projects
.
includes
(
:namespace
)
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
params
[
:filter_projects
].
blank?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
@last_push
=
current_user
.
recent_push
@last_push
=
current_user
.
recent_push
...
@@ -32,7 +32,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
...
@@ -32,7 +32,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
@projects
=
filter_projects
(
@projects
)
@projects
=
filter_projects
(
@projects
)
@projects
=
@projects
.
includes
(
:namespace
,
:forked_from_project
,
:tags
)
@projects
=
@projects
.
includes
(
:namespace
,
:forked_from_project
,
:tags
)
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
params
[
:filter_projects
].
blank?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
@last_push
=
current_user
.
recent_push
@last_push
=
current_user
.
recent_push
@groups
=
[]
@groups
=
[]
...
...
app/controllers/explore/projects_controller.rb
View file @
449954ec
...
@@ -8,7 +8,7 @@ class Explore::ProjectsController < Explore::ApplicationController
...
@@ -8,7 +8,7 @@ class Explore::ProjectsController < Explore::ApplicationController
@projects
=
@projects
.
where
(
visibility_level:
params
[
:visibility_level
])
if
params
[
:visibility_level
].
present?
@projects
=
@projects
.
where
(
visibility_level:
params
[
:visibility_level
])
if
params
[
:visibility_level
].
present?
@projects
=
filter_projects
(
@projects
)
@projects
=
filter_projects
(
@projects
)
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
includes
(
:namespace
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
params
[
:filter_projects
].
blank?
@projects
=
@projects
.
includes
(
:namespace
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
...
@@ -23,7 +23,7 @@ class Explore::ProjectsController < Explore::ApplicationController
...
@@ -23,7 +23,7 @@ class Explore::ProjectsController < Explore::ApplicationController
def
trending
def
trending
@projects
=
TrendingProjectsFinder
.
new
.
execute
(
current_user
)
@projects
=
TrendingProjectsFinder
.
new
.
execute
(
current_user
)
@projects
=
filter_projects
(
@projects
)
@projects
=
filter_projects
(
@projects
)
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
params
[
:filter_projects
].
blank?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
...
@@ -39,7 +39,7 @@ class Explore::ProjectsController < Explore::ApplicationController
...
@@ -39,7 +39,7 @@ class Explore::ProjectsController < Explore::ApplicationController
@projects
=
ProjectsFinder
.
new
.
execute
(
current_user
)
@projects
=
ProjectsFinder
.
new
.
execute
(
current_user
)
@projects
=
filter_projects
(
@projects
)
@projects
=
filter_projects
(
@projects
)
@projects
=
@projects
.
reorder
(
'star_count DESC'
)
@projects
=
@projects
.
reorder
(
'star_count DESC'
)
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
params
[
:filter_projects
].
blank?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
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