summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-12 16:45:44 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-20 12:10:26 -0200
commit7cafa2ce923df9c034ba0b64907b4b6eb6b3c1e2 (patch)
treee5c69ddd538f291e6271c4d25db6dde02c75cf0c /app/controllers/dashboard
parent41d8f5649e3c8a1e37be4608fd03153005c3fa58 (diff)
downloadgitlab-ce-7cafa2ce923df9c034ba0b64907b4b6eb6b3c1e2.tar.gz
Add tasks queue list page
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r--app/controllers/dashboard/tasks_controller.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/controllers/dashboard/tasks_controller.rb b/app/controllers/dashboard/tasks_controller.rb
new file mode 100644
index 00000000000..66d891e3dfa
--- /dev/null
+++ b/app/controllers/dashboard/tasks_controller.rb
@@ -0,0 +1,15 @@
+class Dashboard::TasksController < Dashboard::ApplicationController
+ def index
+ @tasks = case params[:state]
+ when 'done'
+ current_user.tasks.done
+ else
+ current_user.tasks.pending
+ end
+
+ @tasks = @tasks.page(params[:page]).per(PER_PAGE)
+
+ @pending_count = current_user.tasks.pending.count
+ @done_count = current_user.tasks.done.count
+ end
+end