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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
33be8181
Commit
33be8181
authored
Apr 28, 2016
by
Alfredo Sumaran
Committed by
Jacob Schatz
May 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add target status
parent
5fb1de34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
app/assets/stylesheets/pages/todos.scss
app/assets/stylesheets/pages/todos.scss
+8
-0
app/helpers/todos_helper.rb
app/helpers/todos_helper.rb
+9
-0
app/views/dashboard/todos/_todo.html.haml
app/views/dashboard/todos/_todo.html.haml
+4
-0
No files found.
app/assets/stylesheets/pages/todos.scss
View file @
33be8181
...
@@ -29,6 +29,14 @@
...
@@ -29,6 +29,14 @@
.todo-item
{
.todo-item
{
.todo-title
{
.todo-title
{
@include
str-truncated
(
calc
(
100%
-
174px
));
@include
str-truncated
(
calc
(
100%
-
174px
));
overflow
:
visible
;
}
.status-box
{
margin
:
0
;
float
:
none
;
display
:
inline-block
;
font-weight
:
normal
;
}
}
.todo-body
{
.todo-body
{
...
...
app/helpers/todos_helper.rb
View file @
33be8181
...
@@ -37,6 +37,15 @@ module TodosHelper
...
@@ -37,6 +37,15 @@ module TodosHelper
end
end
end
end
def
todo_target_state_pill
(
todo
)
klass
=
'status-box '
klass
<<
"status-box-
#{
todo
.
target
.
state
.
dasherize
}
"
content_tag
(
:span
,
nil
,
class:
klass
)
{
todo
.
target
.
state
.
capitalize
}
end
def
todos_filter_params
def
todos_filter_params
{
{
state:
params
[
:state
],
state:
params
[
:state
],
...
...
app/views/dashboard/todos/_todo.html.haml
View file @
33be8181
...
@@ -17,6 +17,10 @@
...
@@ -17,6 +17,10 @@
·
#{
time_ago_with_tooltip
(
todo
.
created_at
)
}
·
#{
time_ago_with_tooltip
(
todo
.
created_at
)
}
-
if
(
todo
.
target
.
is_a?
(
MergeRequest
)
||
todo
.
target
.
is_a?
(
Issue
))
&&
[
'closed'
,
'merged'
].
include?
(
todo
.
target
.
state
)
%span
.target-status
=
todo_target_state_pill
(
todo
)
-
if
todo
.
pending?
-
if
todo
.
pending?
.todo-actions.pull-right
.todo-actions.pull-right
=
link_to
[
:dashboard
,
todo
],
method: :delete
,
class:
'btn btn-loading done-todo'
do
=
link_to
[
:dashboard
,
todo
],
method: :delete
,
class:
'btn btn-loading done-todo'
do
...
...
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