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
Jérome Perrin
gitlab-ce
Commits
2c8000e3
Commit
2c8000e3
authored
8 years ago
by
Alfredo Sumaran
Committed by
Jacob Schatz
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move conditional to a method
parent
7586807f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app/helpers/todos_helper.rb
app/helpers/todos_helper.rb
+4
-0
app/views/dashboard/todos/_todo.html.haml
app/views/dashboard/todos/_todo.html.haml
+1
-1
No files found.
app/helpers/todos_helper.rb
View file @
2c8000e3
...
...
@@ -46,6 +46,10 @@ module TodosHelper
end
end
def
show_todo_state?
(
todo
)
(
todo
.
target
.
is_a?
(
MergeRequest
)
||
todo
.
target
.
is_a?
(
Issue
))
&&
[
'closed'
,
'merged'
].
include?
(
todo
.
target
.
state
)
end
def
todos_filter_params
{
state:
params
[
:state
],
...
...
This diff is collapsed.
Click to expand it.
app/views/dashboard/todos/_todo.html.haml
View file @
2c8000e3
...
...
@@ -3,7 +3,7 @@
=
image_tag
avatar_icon
(
todo
.
author_email
,
40
),
class:
'avatar s40'
,
alt
:''
.todo-title.title
-
unless
todo
.
build_failed?
-
if
(
todo
.
target
.
is_a?
(
MergeRequest
)
||
todo
.
target
.
is_a?
(
Issue
))
&&
[
'closed'
,
'merged'
].
include?
(
todo
.
target
.
state
)
-
if
show_todo_state?
(
todo
)
%span
.target-status
=
todo_target_state_pill
(
todo
)
...
...
This diff is collapsed.
Click to expand it.
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