@if (request('action') == 'sort_tasks') {{ link_to_route('jobs.show', trans('app.done'), [$job->id], ['class' => 'btn btn-default btn-xs pull-right', 'style' => 'margin: -2px -8px']) }} @else {{ link_to_route('jobs.show', trans('job.sort_tasks'), [$job->id, 'action' => 'sort_tasks', '#job-tasks'], ['class' => 'btn btn-default btn-xs pull-right', 'style' => 'margin: -2px -8px']) }} @endif

{{ trans('job.tasks') }}

@forelse($job->tasks as $key => $task) @empty @endforelse
{{ trans('app.table_no') }} {{ trans('task.name') }} {{ trans('task.progress') }} {{ trans('app.action') }}
{{ 1 + $key }}
{{ $task->name }}
{!! nl2br($task->description) !!}
{{ $task->progress }} % @can('update', $task) {!! html_link_to_route('jobs.show', '', [ $job->id, 'action' => 'task_edit', 'task_id' => $task->id ],[ 'class' => 'btn btn-warning btn-xs', 'title' => trans('task.edit'), 'id' => $task->id . '-tasks-edit', 'icon' => 'edit' ]) !!} @endcan @can('delete', $task) {!! html_link_to_route('jobs.show', '', [ $job->id, 'action' => 'task_delete', 'task_id' => $task->id ],[ 'class' => 'btn btn-danger btn-xs', 'title' => trans('task.delete'), 'id' => $task->id . '-tasks-delete', 'icon' => 'close' ]) !!} @endcan
{{ trans('task.empty') }}
Total {{ formatDecimal($job->tasks->avg('progress')) }} % @if (request('action') == 'sort_tasks') {{ link_to_route('jobs.show', trans('app.done'), [$job->id], ['class' => 'btn btn-default btn-xs pull-right']) }} @else {{ link_to_route('jobs.show', trans('job.sort_tasks'), [$job->id, 'action' => 'sort_tasks', '#job-tasks'], ['class' => 'btn btn-default btn-xs pull-right']) }} @endif
@if (request('action') == 'sort_tasks') @section('ext_js') {!! Html::script(url('assets/js/plugins/jquery-ui.min.js')) !!} @endsection @section('script') @endsection @endif