BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
2c8000e3
Commit
2c8000e3
authored
May 03, 2016
by
Alfredo Sumaran
Committed by
Jacob Schatz
May 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move conditional to a method
parent
7586807f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
todos_helper.rb
app/helpers/todos_helper.rb
+4
-0
_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
],
...
...
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
)
...
...
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