diff options
author | Artem Sidorenko <artem.sidorenko@telekom.de> | 2015-08-10 19:42:09 +0200 |
---|---|---|
committer | Artem Sidorenko <artem.sidorenko@telekom.de> | 2015-08-19 13:46:59 +0200 |
commit | 3ebbed25f0538f170fdf64a3ca34bc1d34b4836b (patch) | |
tree | f4657154a288b6fb81570ca7a4d98351df7a43dd /app/controllers/explore | |
parent | 3659d3b5c6eb645756b3df79a22471f8695f133b (diff) | |
download | gitlab-ce-3ebbed25f0538f170fdf64a3ca34bc1d34b4836b.tar.gz |
Allow listing of archived projects
Resolves #9285
Diffstat (limited to 'app/controllers/explore')
-rw-r--r-- | app/controllers/explore/projects_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb index e9bcb44f6b3..6c733c1ae4d 100644 --- a/app/controllers/explore/projects_controller.rb +++ b/app/controllers/explore/projects_controller.rb @@ -7,6 +7,7 @@ class Explore::ProjectsController < Explore::ApplicationController @tags = @projects.tags_on(:tags) @projects = @projects.tagged_with(params[:tag]) if params[:tag].present? @projects = @projects.where(visibility_level: params[:visibility_level]) if params[:visibility_level].present? + @projects = @projects.non_archived @projects = @projects.search(params[:search]) if params[:search].present? @projects = @projects.sort(@sort = params[:sort]) @projects = @projects.includes(:namespace).page(params[:page]).per(PER_PAGE) @@ -14,6 +15,7 @@ class Explore::ProjectsController < Explore::ApplicationController def trending @trending_projects = TrendingProjectsFinder.new.execute(current_user) + @trending_projects = @trending_projects.non_archived @trending_projects = @trending_projects.page(params[:page]).per(PER_PAGE) end |