Commit 33be8181 authored by Alfredo Sumaran's avatar Alfredo Sumaran Committed by Jacob Schatz

Add target status

parent 5fb1de34
...@@ -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 {
......
...@@ -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],
......
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
&middot; #{time_ago_with_tooltip(todo.created_at)} &middot; #{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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment