2012-10-08 21:52:03 +02:00
|
|
|
%table.table.table-striped
|
|
|
|
%thead
|
|
|
|
%tr
|
2013-12-10 17:58:32 +01:00
|
|
|
%th= heading_helper Task, :due_date
|
2013-06-27 10:22:22 +02:00
|
|
|
%th
|
2013-12-10 17:58:32 +01:00
|
|
|
%th= heading_helper Task, :name
|
2012-10-08 21:52:03 +02:00
|
|
|
%th{:colspan => '2'}
|
2013-04-12 00:00:02 +02:00
|
|
|
= t '.who'
|
|
|
|
%small= t '.who_hint'
|
2012-10-08 21:52:03 +02:00
|
|
|
%tbody
|
|
|
|
- tasks.each do |task|
|
|
|
|
- done = task.done ? " done" : ""
|
|
|
|
%tr{:class => done }
|
|
|
|
%td= format_date(task.due_date) unless task.due_date.nil?
|
2013-06-27 10:22:22 +02:00
|
|
|
%td
|
|
|
|
- if task.periodic?
|
|
|
|
%i.icon-repeat{title: t('tasks.repeated')}
|
2013-12-10 17:58:32 +01:00
|
|
|
%td= link_to task_title(task), task_path(task)
|
2012-10-08 21:52:03 +02:00
|
|
|
%td
|
|
|
|
= task_assignments task
|
|
|
|
= highlighted_required_users task
|
|
|
|
%td
|
|
|
|
- if !task.is_accepted?(current_user)
|
2013-04-12 00:00:02 +02:00
|
|
|
= link_to t('.accept_task'), accept_task_path(task), method: :post, class: 'btn btn-small'
|
|
|
|
= link_to t('.reject_task'), 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
|
2012-10-15 21:19:17 +02:00
|
|
|
= link_to set_done_task_path(task), method: :post, class: 'btn btn-small',
|
2013-04-12 00:00:02 +02:00
|
|
|
title: t('.mark_done') do
|
|
|
|
%i.icon-ok= t '.done_q'
|
2012-10-08 21:52:03 +02:00
|
|
|
- else
|
2013-04-12 00:00:02 +02:00
|
|
|
%i.icon-ok= t '.done'
|