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:
Diffstat (limited to 'app/controllers/ci/admin/projects_controller.rb')
-rw-r--r--app/controllers/ci/admin/projects_controller.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/controllers/ci/admin/projects_controller.rb b/app/controllers/ci/admin/projects_controller.rb
new file mode 100644
index 00000000000..5bbd0ce7396
--- /dev/null
+++ b/app/controllers/ci/admin/projects_controller.rb
@@ -0,0 +1,19 @@
+module Ci
+ class Admin::ProjectsController < Ci::Admin::ApplicationController
+ def index
+ @projects = Ci::Project.ordered_by_last_commit_date.page(params[:page]).per(30)
+ end
+
+ def destroy
+ project.destroy
+
+ redirect_to ci_projects_url
+ end
+
+ protected
+
+ def project
+ @project ||= Ci::Project.find(params[:id])
+ end
+ end
+end