summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosep Llaneras <pepmanuel@gmail.com>2016-10-28 22:50:54 +0200
committerJosep Llaneras <pepmanuel@gmail.com>2016-11-11 20:59:54 +0100
commite4189ee690de9e45e15712e699c574a7e9dc1a8a (patch)
tree1378119378253acaa30047bceeb072be707b55ca
parent0803a350b09d2c80a7ff1c2d1e17712989b7a0c2 (diff)
downloadgitlab-ce-e4189ee690de9e45e15712e699c574a7e9dc1a8a.tar.gz
Remove author
-rw-r--r--app/controllers/dashboard/todos_controller.rb4
-rw-r--r--app/helpers/todos_helper.rb11
-rw-r--r--app/views/dashboard/todos/index.html.haml4
-rw-r--r--config/no_todos_messages.yml15
4 files changed, 6 insertions, 28 deletions
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb
index ca65f75daac..d425d0f9014 100644
--- a/app/controllers/dashboard/todos_controller.rb
+++ b/app/controllers/dashboard/todos_controller.rb
@@ -4,10 +4,6 @@ class Dashboard::TodosController < Dashboard::ApplicationController
def index
@sort = params[:sort]
@todos = @todos.page(params[:page])
-
- if @todos.empty? && current_user.todos.any?
- @no_todos_message = Gitlab.config.gitlab.no_todos_messages.sample
- end
end
def destroy
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb
index b7ca48ffa08..09c69786791 100644
--- a/app/helpers/todos_helper.rb
+++ b/app/helpers/todos_helper.rb
@@ -138,20 +138,9 @@ module TodosHelper
end
end
- def no_todos_message
- message, author = @no_todos_message.values_at('message', 'author')
-
- if author
- message += " -- " + author
- end
-
- message
- end
-
private
def show_todo_state?(todo)
(todo.target.is_a?(MergeRequest) || todo.target.is_a?(Issue)) && ['closed', 'merged'].include?(todo.target.state)
end
-
end
diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml
index 773645707d3..24811fc7a51 100644
--- a/app/views/dashboard/todos/index.html.haml
+++ b/app/views/dashboard/todos/index.html.haml
@@ -84,7 +84,7 @@
= render "shared/empty_states/todos_all_done.svg"
- if todos_filter_empty?
%h4.text-center
- = no_todos_message
+ = Gitlab.config.gitlab.no_todos_messages.sample
%p.text-center
Are you looking for things to do? Take a look at
= succeed "," do
@@ -108,4 +108,4 @@
@mention
in a comment, this will trigger a new item in your todo list, automatically.
%p
- You will always know what to work on next.
+ You will always know what to work on next. \ No newline at end of file
diff --git a/config/no_todos_messages.yml b/config/no_todos_messages.yml
index 92182d100e8..5aea70e4386 100644
--- a/config/no_todos_messages.yml
+++ b/config/no_todos_messages.yml
@@ -1,16 +1,9 @@
-# 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!
# https://about.gitlab.com/contributing/
---
--
- message: "Good job! Looks like you don't have any todos left."
--
- message: "You're all done!"
--
- message: "Coffee really tastes better without any todos left."
- author: "Josep Llaneras"
--
- message: "Isn't an empty To Do list beautiful?"
- author: "Josep Llaneras"
+- 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? \ No newline at end of file