foodsoft/app/views/tasks/show.haml

48 lines
1.9 KiB
Text
Raw Permalink 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
%dt= heading_helper Task, :name
2012-10-08 21:52:03 +02:00
%dd= @task.name
2020-03-06 13:04:03 +01:00
%dt= heading_helper Task, :created_on
%dd= format_time @task.created_on
%dt= heading_helper Task, :created_by
%dd= show_user @task.created_by
- if @task.description.present?
%dt= heading_helper Task, :description
%dd= simple_format(@task.description)
- if @task.due_date.present?
%dt= heading_helper Task, :due_date
%dd
2013-06-27 10:22:22 +02:00
= format_date(@task.due_date)
- if @task.periodic?
%i.icon-repeat{title: t('tasks.repeated')}
%dt= heading_helper Task, :duration
2013-04-12 00:00:02 +02:00
%dd= t('.hours', count: @task.duration)
%dt= heading_helper Task, :user_list
2012-10-08 21:52:03 +02:00
%dd= task_assignments(@task)
%dt= heading_helper 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'
2013-06-21 13:48:48 +02:00
- if @task.periodic?
= link_to edit_task_path(@task, periodic: true), class: 'btn' do
%i.icon.icon-repeat
= t('.edit_group')
= link_to t('ui.delete'), task_path(@task), method: :delete, class: 'btn btn-danger',
data: {confirm: @task.periodic? ? t('.confirm_delete_single_from_group') : t('.confirm_delete_single')}
- if @task.periodic?
= link_to task_path(@task, periodic: true), method: :delete, class: 'btn btn-danger',
data: {confirm: t('.confirm_delete_group')} do
%i.icon.icon-repeat
= t('.delete_group')