summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-02 07:55:02 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-02 07:55:02 +0000
commitb69b2520b10860f2d7762b2e8dd7830312db7cfd (patch)
tree092d32272af2c6168eeb5cf1334fbed964e8b0c6
parentd7eceafb27225dee1b62181c21ae7cc240d984bf (diff)
parent788a3f9b94f5500bbbe3f3c4955c6c41196a736e (diff)
downloadgitlab-ce-b69b2520b10860f2d7762b2e8dd7830312db7cfd.tar.gz
Merge branch 'add_last_push_widget' into 'master'
Add last push widget to starred projects dashboard This adds the last push widget to the starred projects dashboard. If a user set the starred projects dashboard as their preferred dashboard they would not see last push widget. The look is seamless between starred and 'your projects' dashboards. ### Screenshot: ![Screen_Shot_2015-10-01_at_3.15.52_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/2f5dcf49c3d0186bdd05bb6788b143f1/Screen_Shot_2015-10-01_at_3.15.52_PM.png) See merge request !1304
-rw-r--r--app/controllers/dashboard/projects_controller.rb1
-rw-r--r--app/views/dashboard/projects/starred.html.haml3
2 files changed, 4 insertions, 0 deletions
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