Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo <beschi.jacopo@gmail.com>2017-03-03 13:35:04 +0300
committerJacopo <beschi.jacopo@gmail.com>2017-04-06 08:11:37 +0300
commitb996a82ff44e3bcad5e5fb70cabbfa808d06cf62 (patch)
treed5a39a4a0e1b8d26eb9d6c47d817b2a0ff6ba6ce /app/controllers/admin/projects_controller.rb
parent280531a762e4922761b79403934c549203e5b45f (diff)
ProjectsFinder should handle more options
Extended ProjectFinder in order to handle the following options: - current_user - which user use - project_ids_relation: int[] - project ids to use - params: - trending: boolean - non_public: boolean - starred: boolean - sort: string - visibility_level: int - tags: string[] - personal: boolean - search: string - non_archived: boolean GroupProjectsFinder now inherits from ProjectsFinder. Changed the code in order to use the new available options.
Diffstat (limited to 'app/controllers/admin/projects_controller.rb')
-rw-r--r--app/controllers/admin/projects_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb
index daecfc832bf..a1975c0e341 100644
--- a/app/controllers/admin/projects_controller.rb
+++ b/app/controllers/admin/projects_controller.rb
@@ -3,6 +3,7 @@ class Admin::ProjectsController < Admin::ApplicationController
before_action :group, only: [:show, :transfer]
def index
+ params[:sort] ||= 'latest_activity_desc'
@projects = Project.with_statistics
@projects = @projects.in_namespace(params[:namespace_id]) if params[:namespace_id].present?
@projects = @projects.where(visibility_level: params[:visibility_level]) if params[:visibility_level].present?