Skip to content
Snippets Groups Projects
Commit 33be8181 authored by Alfredo Sumaran's avatar Alfredo Sumaran Committed by Jacob Schatz
Browse files

Add target status

parent 5fb1de34
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -29,6 +29,14 @@
.todo-item {
.todo-title {
@include str-truncated(calc(100% - 174px));
overflow: visible;
}
.status-box {
margin: 0;
float: none;
display: inline-block;
font-weight: normal;
}
 
.todo-body {
Loading
Loading
Loading
Loading
@@ -37,6 +37,15 @@ module TodosHelper
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
{
state: params[:state],
Loading
Loading
Loading
Loading
@@ -17,6 +17,10 @@
 
&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?
.todo-actions.pull-right
= link_to [:dashboard, todo], method: :delete, class: 'btn btn-loading done-todo' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment