diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-02-12 16:45:44 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-02-20 12:10:26 -0200 |
commit | 7cafa2ce923df9c034ba0b64907b4b6eb6b3c1e2 (patch) | |
tree | e5c69ddd538f291e6271c4d25db6dde02c75cf0c /app/controllers/dashboard | |
parent | 41d8f5649e3c8a1e37be4608fd03153005c3fa58 (diff) | |
download | gitlab-ce-7cafa2ce923df9c034ba0b64907b4b6eb6b3c1e2.tar.gz |
Add tasks queue list page
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r-- | app/controllers/dashboard/tasks_controller.rb | 15 |
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 |