2009-01-06 11:49:19 +01:00
|
|
|
%table
|
|
|
|
%tr
|
2009-02-06 20:51:14 +01:00
|
|
|
%th Fälligkeit
|
|
|
|
%th Betreff
|
2009-01-06 11:49:19 +01:00
|
|
|
%th{:colspan => '2'}
|
2009-02-06 20:51:14 +01:00
|
|
|
Wer machts?
|
|
|
|
%small (Wie viele werden noch benötigt?)
|
2009-01-06 11:49:19 +01:00
|
|
|
- for task in @tasks
|
2009-02-06 20:51:14 +01:00
|
|
|
- done = task.done ? " done" : ""
|
|
|
|
%tr{:class => cycle('even','odd', :name => "tasks") + done }
|
2009-01-06 11:49:19 +01:00
|
|
|
%td= format_date(task.due_date) unless task.due_date.nil?
|
2010-06-10 23:25:13 +02:00
|
|
|
%td= link_to task.name, task_path(task)
|
2009-01-06 11:49:19 +01:00
|
|
|
%td
|
|
|
|
- unless task.users.empty?
|
|
|
|
- owner = Array.new
|
|
|
|
- task.assignments.each do |ass|
|
|
|
|
- if ass.accepted?
|
|
|
|
- nick = "<span class='accepted'>#{ass.user.nick.to_s}</span>"
|
|
|
|
- else
|
|
|
|
- nick = "<span class='unaccepted'>#{ass.user.nick.to_s} ?</span>"
|
|
|
|
- owner << nick
|
|
|
|
= owner.join(", ")
|
|
|
|
= highlighted_required_users task
|
|
|
|
%td
|
|
|
|
- unless task.is_accepted?(@current_user)
|
2009-02-06 20:51:14 +01:00
|
|
|
%span{:style => "float:left"}= button_to "Aufgabe übernehmen", :controller => "tasks", :action => "accept", :id => task
|
|
|
|
= button_to "Aufgabe ablehnen", :controller => "tasks", :action => "reject", :id => task if task.is_assigned?(@current_user)
|
2009-01-06 11:49:19 +01:00
|
|
|
- else
|
|
|
|
- form_for :task, :url => {:action => "update_status", :id => task} do |f|
|
2009-02-06 20:51:14 +01:00
|
|
|
Erledigt?
|
|
|
|
= f.check_box :done, {:onchange => "submit()", :title => "Die Aufgabe wandert in das Archiv"}
|
|
|
|
= "Erledigt" if task.done
|
2009-01-06 11:49:19 +01:00
|
|
|
- reset_cycle("tasks")
|