diff --git a/resources/views/jobs/partials/job-tasks-operation.blade.php b/resources/views/jobs/partials/job-tasks-operation.blade.php index 05304f2..4887762 100644 --- a/resources/views/jobs/partials/job-tasks-operation.blade.php +++ b/resources/views/jobs/partials/job-tasks-operation.blade.php @@ -1,45 +1,19 @@ -@if (Request::has('action') == false) -@can('create', new App\Entities\Projects\Task) -{!! Form::open(['route' => ['tasks.store', $job->id]])!!} -
-

{{ __('task.create') }}

-
-
-
{!! FormField::text('name', ['label' => __('task.name')]) !!}
-
- {!! Form::label('progress', __('task.progress'), ['class' => 'control-label']) !!} - {!! Form::input('range', 'progress', 0, [ - 'min' => '0', 'max' => '100', 'step' => '10', - ]) !!} -
-
- 0% -
-
- {!! FormField::textarea('description', ['label' => __('task.description')]) !!} - {!! Form::submit(__('task.create'), ['class' => 'btn btn-primary']) !!} - {!! Form::close() !!} -
-
-@endcan -@endif - @if (Request::get('action') == 'task_edit' && $editableTask) @can('update', $editableTask) -{!! Form::model($editableTask, ['route' => ['tasks.update', $editableTask], 'method' => 'patch'])!!} +{{ Form::model($editableTask, ['route' => ['tasks.update', $editableTask], 'method' => 'patch']) }}

{{ __('task.edit') }}

{!! FormField::text('name') !!}
- {!! Form::label('progress', __('task.progress'), ['class' => 'control-label']) !!} + {{ Form::label('progress', __('task.progress'), ['class' => 'control-label']) }} - {!! Form::input('range', 'progress', null, [ + {{ Form::input('range', 'progress', null, [ 'min' => '0', 'max' => '100', 'step' => '10', - ]) !!} + ]) }}
{{ $editableTask->progress }}% @@ -50,10 +24,12 @@
{!! FormField::select('job_id', $job->project->jobs->pluck('name', 'id'), ['label' => __('task.move_to_other_job')]) !!}
+

+ {{ Form::submit(__('task.update'), ['class' => 'btn btn-warning']) }} + {{ link_to_route('jobs.show', __('app.cancel'), [$job], ['class' => 'btn btn-default']) }} +
- {!! Form::submit(__('task.update'), ['class' => 'btn btn-warning']) !!} - {{ link_to_route('jobs.show', __('app.cancel'), [$job], ['class' => 'btn btn-default']) }} - {!! Form::close() !!} + {{ Form::close() }}
@endcan diff --git a/resources/views/jobs/partials/job-tasks.blade.php b/resources/views/jobs/partials/job-tasks.blade.php index 222f206..ea906d0 100644 --- a/resources/views/jobs/partials/job-tasks.blade.php +++ b/resources/views/jobs/partials/job-tasks.blade.php @@ -80,6 +80,31 @@ @endif
+@if (Request::has('action') == false) +@can('create', new App\Entities\Projects\Task) +{{ Form::open(['route' => ['tasks.store', $job->id]]) }} +
+

{{ __('task.create') }}

+
+
+
{!! FormField::text('name', ['label' => __('task.name')]) !!}
+
+ {{ Form::label('progress', __('task.progress'), ['class' => 'control-label']) }} + {{ Form::input('range', 'progress', 0, [ + 'min' => '0', 'max' => '100', 'step' => '10', + ]) }} +
+
+ 0% +
+
+ {!! FormField::textarea('description', ['label' => __('task.description')]) !!} + {{ Form::submit(__('task.create'), ['class' => 'btn btn-primary']) }} + {{ Form::close() }} +
+
+@endcan +@endif @if (request('action') == 'sort_tasks') @section('ext_js') diff --git a/resources/views/jobs/show.blade.php b/resources/views/jobs/show.blade.php index f3ae9ec..4ff3eda 100755 --- a/resources/views/jobs/show.blade.php +++ b/resources/views/jobs/show.blade.php @@ -15,15 +15,15 @@
@include('jobs.partials.job-show') + @include('jobs.partials.job-dates')
- @include('jobs.partials.job-dates') @include('jobs.partials.job-tasks-operation') + @include('jobs.partials.job-tasks')
- @include('jobs.partials.job-tasks')
@endsection