summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-09-21 11:03:14 +0100
committerPhil Hughes <me@iamphill.com>2017-09-22 12:12:16 +0100
commiteab0ca8a0b2950dbbcf6662c34b2fc8313ba9bde (patch)
treead17deea946d5c9ee58459be5252d7c2ceef613f /app
parent9f3227645442017e3518e2b0ba3e9270ebabfa06 (diff)
downloadgitlab-ce-eab0ca8a0b2950dbbcf6662c34b2fc8313ba9bde.tar.gz
Fixes dashboard/projects empty state showing when viewing personal projects
This was caused by the `@projects` value being empty when the current user does not have any personal projects.
Diffstat (limited to 'app')
-rw-r--r--app/helpers/projects_helper.rb4
-rw-r--r--app/views/dashboard/projects/index.html.haml2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index ddeff490d3a..21fb17e06d6 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -239,8 +239,8 @@ module ProjectsHelper
end
end
- def has_projects_or_name?(projects, params)
- !!(params[:name] || any_projects?(projects))
+ def show_projects?(projects, params)
+ !!(params[:personal] || params[:name] || any_projects?(projects))
end
private
diff --git a/app/views/dashboard/projects/index.html.haml b/app/views/dashboard/projects/index.html.haml
index 985871a888c..57a4da353fe 100644
--- a/app/views/dashboard/projects/index.html.haml
+++ b/app/views/dashboard/projects/index.html.haml
@@ -10,7 +10,7 @@
= render "projects/last_push"
%div{ class: container_class }
- - if has_projects_or_name?(@projects, params)
+ - if show_projects?(@projects, params)
= render 'dashboard/projects_head'
= render 'nav'
= render 'projects'