foodsoft/app/views/tasks/_list.haml

29 lines
1.1 KiB
Plaintext
Raw Normal View History

2012-10-08 21:52:03 +02:00
%table.table.table-striped
%thead
%tr
%th Fälligkeit
%th Betreff
%th{:colspan => '2'}
Wer machts?
%small (Wie viele werden noch benötigt?)
%tbody
- tasks.each do |task|
- done = task.done ? " done" : ""
%tr{:class => done }
%td= format_date(task.due_date) unless task.due_date.nil?
%td= link_to "#{task.name} (#{task.duration}h)", task_path(task)
%td
= task_assignments task
= highlighted_required_users task
%td
- if !task.is_accepted?(current_user)
= link_to "Aufgabe übernehmen", accept_task_path(task), method: :post, class: 'btn btn-small'
= link_to "Aufgabe ablehnen", reject_task_path(task), method: :post, class: 'btn btn-small' if task.is_assigned?(current_user)
2012-10-08 21:52:03 +02:00
- elsif !task.done
= link_to set_done_task_path(task), method: :post, class: 'btn btn-small',
2012-10-08 21:52:03 +02:00
title: 'Aufgabe als erledigt markieren' do
%i.icon-ok
Erledigt?
- else
%i.icon-ok
Erledigt