diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-12-08 22:17:53 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-12-08 22:17:53 +0200 |
commit | cd779e56e1ce799fc6ec25dc2fbc8a3e0f775ee8 (patch) | |
tree | b10daacc88ec915f7f61e43a2b38701c4722daa2 /app/controllers/dashboard_controller.rb | |
parent | 4107f2cc2e6d0b93208573f4873305ba0ef4c5de (diff) | |
download | gitlab-ce-cd779e56e1ce799fc6ec25dc2fbc8a3e0f775ee8.tar.gz |
dashboard v1
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r-- | app/controllers/dashboard_controller.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 1c50c66e5f6..7c5739936cd 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -1,6 +1,37 @@ class DashboardController < ApplicationController + respond_to :js, :html + def index @projects = current_user.projects.all @active_projects = @projects.select(&:last_activity_date).sort_by(&:last_activity_date).reverse + + respond_to do |format| + format.html + format.js { no_cache_headers } + end + end + + def merge_requests + @projects = current_user.projects.all + @merge_requests = current_user.assigned_merge_requests.order("created_at DESC").limit(40) + + respond_to do |format| + format.html + format.js { no_cache_headers } + end + end + + def issues + @projects = current_user.projects.all + @user = current_user + @issues = current_user.assigned_issues.opened.order("created_at DESC").limit(40) + + @issues = @issues.includes(:author, :project) + + respond_to do |format| + format.html + format.js { no_cache_headers } + format.atom { render :layout => false } + end end end |