diff options
author | Phil Hughes <me@iamphill.com> | 2016-11-08 09:31:08 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-11-08 09:31:08 +0000 |
commit | dd93079a05d49922fdbe4c221781f39ce69684e8 (patch) | |
tree | beea14829cd33a38cef218862e29f18c9853d43d | |
parent | 0bc9008ef62277094534711238894b4e43aca7b0 (diff) | |
download | gitlab-ce-dd93079a05d49922fdbe4c221781f39ce69684e8.tar.gz |
Changed helper method to check for none on params
Moved if statements around in view
-rw-r--r-- | app/helpers/todos_helper.rb | 2 | ||||
-rw-r--r-- | app/views/dashboard/todos/index.html.haml | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index a75a03b16d2..09c69786791 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -62,7 +62,7 @@ module TodosHelper end def todos_filter_empty? - todos_filter_params.all? {|key, value| value.nil?} + todos_filter_params.values.none? end def todos_filter_path(options = {}) diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index 16bdf284f83..5b2465e25ee 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -82,12 +82,9 @@ - elsif current_user.todos.any? .todos-all-done = render "shared/empty_states/todos_all_done.svg" - %h4.text-center - - if todos_filter_empty? - Good job! Looks like you don't have any todos left. - - else - There are no Todos to show. - if todos_filter_empty? + %h4.text-center + Good job! Looks like you don't have any todos left. %p.text-center Are you looking for things to do? Take a look at = succeed "," do @@ -95,6 +92,9 @@ contribute to = link_to "merge requests", merge_requests_dashboard_path or mention someone in a comment to assign a new todo automatically. + - else + %h4.text-center + There are no todos to show. - else .todos-empty .todos-empty-hero |