60 lines
No EOL
2.2 KiB
Text
60 lines
No EOL
2.2 KiB
Text
%h1
|
|
Aufgaben verwalten für
|
|
= @group.name
|
|
= render :partial => "nav"
|
|
|
|
.left_column{:style => "width:45em"}
|
|
.box_title
|
|
%h2
|
|
Wöchentliche Aufgaben
|
|
= @group.task_name
|
|
.column_content
|
|
- if @group.weekly_task
|
|
%table.list
|
|
%tr
|
|
%th Datum
|
|
%th Wer machts?
|
|
%th Aufgabe übernehmen
|
|
- i = 0
|
|
- for next_date in @group.next_weekly_tasks
|
|
%tr{:class => cycle("even","odd")}
|
|
%td= I18n.l next_date, :format => "%a, %d.%m.%Y"
|
|
- if task = @group.tasks.find(:first, :conditions => {:due_date => next_date, :weekly => true})
|
|
- 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(", ")
|
|
%small= link_to "mehr", :action => "edit", :id => task
|
|
- else
|
|
%td
|
|
= link_to "Verantwortliche zuweisen", :action => "edit", :id => task
|
|
%td
|
|
- unless task.is_accepted?(@current_user)
|
|
%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)
|
|
- else
|
|
%td= link_to "Verantwortliche zuweisen", :action => "new", :id => @group, :task_from_now => i
|
|
%td
|
|
- i += 1
|
|
%br/
|
|
- else
|
|
Noch keine Wochenaufgaben angelegt.
|
|
- if @current_user.member_of?(@group) or @current_user.role_admin?
|
|
= link_to "Wochenaufgaben bearbeiten", edit_foodcoop_workgroup_path(@group)
|
|
|
|
.left_column{:style => "width:75%"}
|
|
.box_title
|
|
%h2 Alle Aufgaben der Gruppe
|
|
.column_content
|
|
- @tasks = @group.open_tasks
|
|
= render :partial => "list"
|
|
%br/
|
|
= link_to_top
|
|
|
|
|