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:
authorCamil Staps <info@camilstaps.nl>2019-01-25 23:53:00 +0300
committerCamil Staps <info@camilstaps.nl>2019-08-07 21:49:13 +0300
commit59976090b52d401dc4d23b726b2168186524f269 (patch)
tree503fb6f0563c866ea1776be3f5ad6bf88672ae92 /app/controllers/projects/starrers_controller.rb
parent5b20df0a9276bc1250dc8b307adb161b24d9c255 (diff)
Add /starrers view for projects
Diffstat (limited to 'app/controllers/projects/starrers_controller.rb')
-rw-r--r--app/controllers/projects/starrers_controller.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/projects/starrers_controller.rb b/app/controllers/projects/starrers_controller.rb
new file mode 100644
index 00000000000..8d5ddd51e4c
--- /dev/null
+++ b/app/controllers/projects/starrers_controller.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class Projects::StarrersController < Projects::ApplicationController
+ include SortingHelper
+ #
+ # Authorize
+ before_action :require_non_empty_project
+
+ def index
+ @sort = params[:sort].presence || sort_value_name
+
+ params[:has_starred] = @project
+
+ @starrers = UsersFinder.new(current_user, params).execute
+ @starrers = @starrers.sort_by_attribute(@sort)
+ end
+end