Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-03-02 15:15:45 +0300
committerRémy Coutable <remy@rymai.me>2016-03-02 16:06:00 +0300
commite75989db43d3b0bf6ba19e21626f4bae8d9e37bb (patch)
treebcc7793fe467a2e122a3e035b68961c463ad848a
parent5d534a1d4b58ef70ef6d87c09b6f37806d61d75a (diff)
Merge branch 'fix/13785-dashboard-projects-display-welcome-after-search' into 'master'
Don't show "Welcome to GitLab" when the search didn't return any projects Fixes #13785. /cc @pixdrift ### Before ![Screen_Shot_2016-03-02_at_10.55.02](/uploads/b6b6ead2143d01e374ad296e72182d79/Screen_Shot_2016-03-02_at_10.55.02.png) ### After ![Screen_Shot_2016-03-02_at_12.12.33](/uploads/6e16c44e69039c534ea0fc3373c6060b/Screen_Shot_2016-03-02_at_12.12.33.png) See merge request !3059
-rw-r--r--CHANGELOG1
-rw-r--r--app/controllers/dashboard/projects_controller.rb4
-rw-r--r--app/views/dashboard/projects/index.html.haml2
-rw-r--r--app/views/shared/projects/_list.html.haml2
4 files changed, 5 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 4038049c9e3..3d38a352f6a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,6 +14,7 @@ v 8.5.2
- Fix help keyboard shortcut on relative URL setups (Artem Sidorenko)
- Update Rails to 4.2.5.2
- Fix permissions for deprecated CI build status badge
+ - Don't show "Welcome to GitLab" when the search didn't return any projects
v 8.5.1
- Fix group projects styles
diff --git a/app/controllers/dashboard/projects_controller.rb b/app/controllers/dashboard/projects_controller.rb
index 2df6924b13d..aeafbd30143 100644
--- a/app/controllers/dashboard/projects_controller.rb
+++ b/app/controllers/dashboard/projects_controller.rb
@@ -6,7 +6,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
@projects = @projects.sort(@sort = params[:sort])
@projects = @projects.includes(:namespace)
- terms = params['filter_projects']
+ terms = params[:filter_projects]
if terms.present?
@projects = @projects.search(terms)
@@ -35,7 +35,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
@projects = @projects.includes(:namespace, :forked_from_project, :tags)
@projects = @projects.sort(@sort = params[:sort])
- terms = params['filter_projects']
+ terms = params[:filter_projects]
if terms.present?
@projects = @projects.search(terms)
diff --git a/app/views/dashboard/projects/index.html.haml b/app/views/dashboard/projects/index.html.haml
index 53abf274bdb..4565e752c1f 100644
--- a/app/views/dashboard/projects/index.html.haml
+++ b/app/views/dashboard/projects/index.html.haml
@@ -10,7 +10,7 @@
- if @last_push
= render "events/event_last_push", event: @last_push
-- if @projects.any?
+- if @projects.any? || params[:filter_projects]
= render 'projects'
- else
= render "zero_authorized_projects"
diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml
index 75684b972f1..1d88bddcf4c 100644
--- a/app/views/shared/projects/_list.html.haml
+++ b/app/views/shared/projects/_list.html.haml
@@ -23,7 +23,7 @@
Show all
= paginate projects, theme: "gitlab" if projects.respond_to? :total_pages
- else
- %h3 No projects found
+ .nothing-here-block No projects found
:javascript
new ProjectsList();