2013-04-12 00:00:02 +02:00
|
|
|
- title t('.title')
|
2012-11-12 13:13:01 +01:00
|
|
|
= render 'nav'
|
2012-10-08 21:52:03 +02:00
|
|
|
|
|
|
|
%section
|
|
|
|
%dl.dl-horizontal
|
2013-10-09 22:41:23 +02:00
|
|
|
%dt= Task.human_attribute_name(:name)
|
2012-10-08 21:52:03 +02:00
|
|
|
%dd= @task.name
|
2012-12-16 19:03:04 +01:00
|
|
|
- if @task.description.present?
|
2013-10-09 22:41:23 +02:00
|
|
|
%dt= Task.human_attribute_name(:description)
|
2012-12-16 19:03:04 +01:00
|
|
|
%dd= simple_format(@task.description)
|
|
|
|
- if @task.due_date.present?
|
2013-10-09 22:41:23 +02:00
|
|
|
%dt= Task.human_attribute_name(:due_date)
|
2013-06-27 10:22:22 +02:00
|
|
|
%dd
|
|
|
|
= format_date(@task.due_date)
|
|
|
|
- if @task.periodic?
|
|
|
|
%i.icon-repeat{title: t('tasks.repeated')}
|
2013-10-09 22:41:23 +02:00
|
|
|
%dt= Task.human_attribute_name(:duration)
|
2013-04-12 00:00:02 +02:00
|
|
|
%dd= t('.hours', count: @task.duration)
|
2013-10-09 22:41:23 +02:00
|
|
|
%dt= Task.human_attribute_name(:user_list)
|
2012-10-08 21:52:03 +02:00
|
|
|
%dd= task_assignments(@task)
|
2013-10-09 22:41:23 +02:00
|
|
|
%dt= Task.human_attribute_name(:workgroup)
|
2012-10-08 21:52:03 +02:00
|
|
|
%dd
|
|
|
|
- if @task.workgroup
|
|
|
|
= link_to @task.workgroup.name, workgroup_tasks_path(workgroup_id: @task.workgroup_id)
|
2012-11-12 09:03:23 +01:00
|
|
|
%p
|
2012-12-22 14:29:59 +01:00
|
|
|
- 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-success'
|
2012-12-22 14:29:59 +01:00
|
|
|
- if @task.is_assigned?(current_user)
|
2013-04-12 00:00:02 +02:00
|
|
|
= link_to t('.reject_task'), reject_task_path(@task), method: :post, class: 'btn'
|
2012-11-12 09:03:23 +01:00
|
|
|
- unless @task.done?
|
2013-04-12 00:00:02 +02:00
|
|
|
= link_to t('.mark_done'), set_done_task_path(@task), method: :post, class: 'btn'
|
|
|
|
= link_to t('ui.edit'), edit_task_path(@task), class: 'btn'
|
2013-10-04 10:09:33 +02:00
|
|
|
= link_to t('ui.delete'), task_path(@task), :method => :delete, :confirm => t('.confirm_delete_single'),
|
2012-11-12 09:03:23 +01:00
|
|
|
class: 'btn btn-danger'
|
2013-06-21 13:48:48 +02:00
|
|
|
- if @task.periodic?
|
2013-06-24 11:53:52 +02:00
|
|
|
= link_to t('.delete_group'), task_path(@task, periodic: true), method: :delete,
|
|
|
|
confirm: t('.confirm_delete_group'), class: 'btn btn-danger'
|