Commit e4189ee6 authored by Josep Llaneras's avatar Josep Llaneras

Remove author

parent 0803a350
...@@ -4,10 +4,6 @@ class Dashboard::TodosController < Dashboard::ApplicationController ...@@ -4,10 +4,6 @@ class Dashboard::TodosController < Dashboard::ApplicationController
def index def index
@sort = params[:sort] @sort = params[:sort]
@todos = @todos.page(params[:page]) @todos = @todos.page(params[:page])
if @todos.empty? && current_user.todos.any?
@no_todos_message = Gitlab.config.gitlab.no_todos_messages.sample
end
end end
def destroy def destroy
......
...@@ -138,20 +138,9 @@ module TodosHelper ...@@ -138,20 +138,9 @@ module TodosHelper
end end
end end
def no_todos_message
message, author = @no_todos_message.values_at('message', 'author')
if author
message += " -- " + author
end
message
end
private private
def show_todo_state?(todo) def show_todo_state?(todo)
(todo.target.is_a?(MergeRequest) || todo.target.is_a?(Issue)) && ['closed', 'merged'].include?(todo.target.state) (todo.target.is_a?(MergeRequest) || todo.target.is_a?(Issue)) && ['closed', 'merged'].include?(todo.target.state)
end end
end end
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
= render "shared/empty_states/todos_all_done.svg" = render "shared/empty_states/todos_all_done.svg"
- if todos_filter_empty? - if todos_filter_empty?
%h4.text-center %h4.text-center
= no_todos_message = Gitlab.config.gitlab.no_todos_messages.sample
%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
......
# When the Todos list on the user's dashboard is empty, one of the messages below shows up randomly. # When the Todos list on the user's dashboard becomes empty, one of the messages below shows up randomly.
# #
# If you come up with a fun one, please feel free to contribute it to GitLab! # If you come up with a fun one, please feel free to contribute it to GitLab!
# https://about.gitlab.com/contributing/ # https://about.gitlab.com/contributing/
--- ---
- - Good job! Looks like you don't have any todos left.
message: "Good job! Looks like you don't have any todos left." - Coffee really tastes better without any todos left.
- - Isn't an empty To Do list beautiful?
message: "You're all done!" \ No newline at end of file
-
message: "Coffee really tastes better without any todos left."
author: "Josep Llaneras"
-
message: "Isn't an empty To Do list beautiful?"
author: "Josep Llaneras"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment