You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
541 B
11 lines
541 B
%li[task]{ class: (task.completed_at.nil? ? "" : "completed") }
|
|
= task.name
|
|
%form.update(action="/task/#{task.id}" method="POST")
|
|
%input{ type: 'hidden', name: '_method', value: 'PUT' }
|
|
-if task.completed_at.nil?
|
|
%input{type: 'submit', value: '−', title: 'Complete Task'}
|
|
-else
|
|
%input{type: 'submit', value: '✓', title: 'Uncomplete Task'}
|
|
%form.delete(action="/task/#{task.id}" method="POST")
|
|
%input(type="hidden" name="_method" value="DELETE")
|
|
%input(type="submit" value="✗" title="Delete Task")
|