Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
e4189ee6
Commit
e4189ee6
authored
Oct 28, 2016
by
Josep Llaneras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove author
parent
0803a350
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
28 deletions
+6
-28
app/controllers/dashboard/todos_controller.rb
app/controllers/dashboard/todos_controller.rb
+0
-4
app/helpers/todos_helper.rb
app/helpers/todos_helper.rb
+0
-11
app/views/dashboard/todos/index.html.haml
app/views/dashboard/todos/index.html.haml
+2
-2
config/no_todos_messages.yml
config/no_todos_messages.yml
+4
-11
No files found.
app/controllers/dashboard/todos_controller.rb
View file @
e4189ee6
...
@@ -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
...
...
app/helpers/todos_helper.rb
View file @
e4189ee6
...
@@ -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
app/views/dashboard/todos/index.html.haml
View file @
e4189ee6
...
@@ -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_messag
e
=
Gitlab
.
config
.
gitlab
.
no_todos_messages
.
sampl
e
%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
...
...
config/no_todos_messages.yml
View file @
e4189ee6
# When the Todos list on the user's dashboard
i
s empty, one of the messages below shows up randomly.
# When the Todos list on the user's dashboard
become
s 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"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment