From 788a3f9b94f5500bbbe3f3c4955c6c41196a736e Mon Sep 17 00:00:00 2001 From: Drew Blessing Date: Tue, 15 Sep 2015 15:33:44 -0500 Subject: [PATCH] Add last push widget to starred projects dashboard --- app/controllers/dashboard/projects_controller.rb | 1 + app/views/dashboard/projects/starred.html.haml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app/controllers/dashboard/projects_controller.rb b/app/controllers/dashboard/projects_controller.rb index 467d0f81aca..58e9049f158 100644 --- a/app/controllers/dashboard/projects_controller.rb +++ b/app/controllers/dashboard/projects_controller.rb @@ -20,6 +20,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController @projects = current_user.starred_projects @projects = @projects.includes(:namespace, :forked_from_project, :tags) @projects = @projects.sort(@sort = params[:sort]) + @last_push = current_user.recent_push @groups = [] respond_to do |format| diff --git a/app/views/dashboard/projects/starred.html.haml b/app/views/dashboard/projects/starred.html.haml index 339362701d4..f75f2e0a32a 100644 --- a/app/views/dashboard/projects/starred.html.haml +++ b/app/views/dashboard/projects/starred.html.haml @@ -3,6 +3,9 @@ = render 'dashboard/projects_head' +- if @last_push + = render "events/event_last_push", event: @last_push + - if @projects.any? = render 'projects' - else