foodsoft/app/views/tasks/show.haml

35 lines
1.5 KiB
Text
Raw Normal View History

2013-04-12 00:00:02 +02:00
- title t('.title')
= render 'nav'
2012-10-08 21:52:03 +02:00
%section
%dl.dl-horizontal
2013-04-12 00:00:02 +02:00
%dt= t 'simple_form.labels.task.name'
2012-10-08 21:52:03 +02:00
%dd= @task.name
- if @task.description.present?
2013-04-12 00:00:02 +02:00
%dt= t 'simple_form.labels.defaults.description'
%dd= simple_format(@task.description)
- if @task.due_date.present?
2013-04-12 00:00:02 +02:00
%dt= t '.due_date'
%dd= format_date(@task.due_date)
2013-04-12 00:00:02 +02:00
%dt= t 'simple_form.labels.task.duration'
%dd= t('.hours', count: @task.duration)
%dt= t 'simple_form.labels.task.user_list'
2012-10-08 21:52:03 +02:00
%dd= task_assignments(@task)
2013-04-12 00:00:02 +02:00
%dt= t 'simple_form.labels.task.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)
%p
- 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'
- 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'
- 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'
= link_to t('ui.delete'), task_path(@task), :method => :delete, :confirm => "Die Aufgabe wirklich löschen?",
class: 'btn btn-danger'
2013-06-21 13:48:48 +02:00
- if @task.periodic?
2013-06-21 22:04:36 +02:00
= link_to 'Aufgabe und folgende löschen', task_path(@task, periodic: true), method: :delete,
confirm: "Diese und alle folgenden wöchentlichen Aufgaben wirklich löschen?", class: 'btn btn-danger'