2009-01-06 11:49:19 +01:00
|
|
|
%h1
|
2009-02-06 20:51:14 +01:00
|
|
|
Aufgaben verwalten für
|
2009-01-06 11:49:19 +01:00
|
|
|
= @group.name
|
|
|
|
= render :partial => "nav"
|
|
|
|
|
|
|
|
.left_column{:style => "width:45em"}
|
|
|
|
.box_title
|
|
|
|
%h2
|
2009-02-06 20:51:14 +01:00
|
|
|
Wöchentliche Aufgaben
|
2009-01-06 11:49:19 +01:00
|
|
|
= @group.task_name
|
|
|
|
.column_content
|
|
|
|
- if @group.weekly_task
|
|
|
|
%table.list
|
|
|
|
%tr
|
2009-03-23 11:08:56 +01:00
|
|
|
%th Datum
|
|
|
|
%th Wer machts?
|
|
|
|
%th Aufgabe übernehmen
|
2009-01-06 11:49:19 +01:00
|
|
|
- i = 0
|
2009-03-23 11:08:56 +01:00
|
|
|
- for next_task in @group.next_weekly_tasks
|
2009-01-06 11:49:19 +01:00
|
|
|
%tr{:class => cycle("even","odd")}
|
2009-03-23 11:08:56 +01:00
|
|
|
%td= I18n.l next_task, :format => "%a, %d.%m.%Y"
|
|
|
|
- if task = @group.tasks.find(:first, :conditions => ["due_date = ? AND name = ?",next_task.strftime("%Y-%m-%d"),@group.task_name])
|
2009-01-06 11:49:19 +01:00
|
|
|
- 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
|
|
|
|
%td
|
|
|
|
= owner.join(", ")
|
2009-03-23 11:08:56 +01:00
|
|
|
%small= link_to "mehr", :action => "edit", :id => task
|
2009-01-06 11:49:19 +01:00
|
|
|
- else
|
|
|
|
%td
|
2009-03-23 11:08:56 +01:00
|
|
|
= link_to "Verantwortliche zuweisen", :action => "edit", :id => task
|
2009-01-06 11:49:19 +01:00
|
|
|
%td
|
|
|
|
- unless task.is_accepted?(@current_user)
|
2009-03-23 11:08:56 +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
|
2009-03-23 11:08:56 +01:00
|
|
|
%td= link_to "Verantwortliche zuweisen", :action => "new", :id => @group, :task_from_now => i
|
2009-01-06 11:49:19 +01:00
|
|
|
%td
|
|
|
|
- i += 1
|
|
|
|
%br/
|
|
|
|
- else
|
2009-03-23 11:08:56 +01:00
|
|
|
Noch keine Wochenaufgaben angelegt.
|
2009-02-06 20:51:14 +01:00
|
|
|
- if @current_user.member_of?(@group) or @current_user.role_admin?
|
2009-08-04 12:57:19 +02:00
|
|
|
= link_to "Wochenaufgaben bearbeiten", edit_foodcoop_workgroup_path(@group)
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
|
|
.left_column{:style => "width:75%"}
|
|
|
|
.box_title
|
2009-03-23 11:08:56 +01:00
|
|
|
%h2 Alle Aufgaben der Gruppe
|
2009-01-06 11:49:19 +01:00
|
|
|
.column_content
|
|
|
|
- @tasks = @group.open_tasks
|
|
|
|
= render :partial => "list"
|
|
|
|
%br/
|
|
|
|
= link_to_top
|
|
|
|
|
|
|
|
|