Skip to content
Snippets Groups Projects
Commit dd93079a authored by Phil Hughes's avatar Phil Hughes
Browse files

Changed helper method to check for none on params

Moved if statements around in view
parent 0bc9008e
No related branches found
No related tags found
1 merge request!7334Fixed todos empty state when filtering
Pipeline #
Loading
@@ -62,7 +62,7 @@ module TodosHelper
Loading
@@ -62,7 +62,7 @@ module TodosHelper
end end
   
def todos_filter_empty? def todos_filter_empty?
todos_filter_params.all? {|key, value| value.nil?} todos_filter_params.values.none?
end end
   
def todos_filter_path(options = {}) def todos_filter_path(options = {})
Loading
Loading
Loading
@@ -82,12 +82,9 @@
Loading
@@ -82,12 +82,9 @@
- elsif current_user.todos.any? - elsif current_user.todos.any?
.todos-all-done .todos-all-done
= render "shared/empty_states/todos_all_done.svg" = render "shared/empty_states/todos_all_done.svg"
%h4.text-center
- if todos_filter_empty? - if todos_filter_empty?
%h4.text-center
Good job! Looks like you don't have any todos left. Good job! Looks like you don't have any todos left.
- else
There are no Todos to show.
- if todos_filter_empty?
%p.text-center %p.text-center
Are you looking for things to do? Take a look at Are you looking for things to do? Take a look at
= succeed "," do = succeed "," do
Loading
@@ -95,6 +92,9 @@
Loading
@@ -95,6 +92,9 @@
contribute to contribute to
= link_to "merge requests", merge_requests_dashboard_path = link_to "merge requests", merge_requests_dashboard_path
or mention someone in a comment to assign a new todo automatically. or mention someone in a comment to assign a new todo automatically.
- else
%h4.text-center
There are no todos to show.
- else - else
.todos-empty .todos-empty
.todos-empty-hero .todos-empty-hero
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment