59 lines
2.1 KiB
Text
59 lines
2.1 KiB
Text
|
%h1
|
||
|
= _('Arrange tasks for')
|
||
|
= @group.name
|
||
|
= render :partial => "nav"
|
||
|
|
||
|
.left_column{:style => "width:45em"}
|
||
|
.box_title
|
||
|
%h2
|
||
|
= _('Weekly tasks') + ':'
|
||
|
= @group.task_name
|
||
|
.column_content
|
||
|
- if @group.weekly_task
|
||
|
%table.list
|
||
|
%tr
|
||
|
%th= _('Date')
|
||
|
%th= _('Who will make it?')
|
||
|
%th= _('Accept task')
|
||
|
- i = 0
|
||
|
- for nextTask in @group.next_weekly_tasks
|
||
|
%tr{:class => cycle("even","odd")}
|
||
|
%td= nextTask.strftime("%a, %d.%m.%Y")
|
||
|
- if task = @group.tasks.find(:first, :conditions => ["due_date = ? AND name = ?",nextTask.strftime("%Y-%m-%d"),@group.task_name])
|
||
|
- 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 _('more'), :action => "edit", :id => task
|
||
|
- else
|
||
|
%td
|
||
|
= link_to _('Assign people'), :action => "edit", :id => task
|
||
|
%td
|
||
|
- unless task.is_accepted?(@current_user)
|
||
|
%span{:style => "float:left"}= button_to _('Accept task'), :controller => "tasks", :action => "accept", :id => task
|
||
|
= button_to _('Reject task'), :controller => "tasks", :action => "reject", :id => task if task.is_assigned?(@current_user)
|
||
|
- else
|
||
|
%td= link_to _('Assign people'), :action => "new", :id => @group, :task_from_now => i
|
||
|
%td
|
||
|
- i += 1
|
||
|
%br/
|
||
|
- else
|
||
|
= _('No weekly tasks defined yet')
|
||
|
= link_to _('Edit weekly tasks'), :controller => "index", :action => "editGroup", :id => @group
|
||
|
|
||
|
.left_column{:style => "width:75%"}
|
||
|
.box_title
|
||
|
%h2= _('all tasks')
|
||
|
.column_content
|
||
|
- @tasks = @group.open_tasks
|
||
|
= render :partial => "list"
|
||
|
%br/
|
||
|
= link_to_top
|
||
|
|
||
|
|