@extends('layouts.app') @section('title', trans('project.features') . ' | ' . $project->name) @section('content') @include('projects.partials.breadcrumb',['title' => trans('project.features')])

{!! html_link_to_route('features.create', trans('feature.create'), [$project->id], ['class' => 'btn btn-primary','icon' => 'plus']) !!} {!! html_link_to_route('features.add-from-other-project', trans('feature.add_from_other_project'), [$project->id], ['class' => 'btn btn-primary','icon' => 'plus']) !!}
{{ $project->name }} {{ trans('project.features') }}

@include('projects.partials.nav-tabs')
@forelse($features as $key => $feature) @empty @endforelse
{{ trans('app.table_no') }} {{ trans('feature.name') }} {{ trans('feature.tasks_count') }} {{ trans('feature.progress') }} {{ trans('feature.price') }} {{ trans('feature.worker') }} {{ trans('app.action') }}
{{ 1 + $key }} {{ $feature->name }} @if ($feature->tasks->isEmpty() == false)
    @foreach($feature->tasks as $task)
  • {{ $task->name }}
  • @endforeach
@endif
{{ $feature->tasks_count = $feature->tasks->count() }} {{ formatDecimal($feature->progress = $feature->tasks->avg('progress')) }} % {{ formatRp($feature->price) }} {{ $feature->worker->name }} {!! link_to_route('features.show', trans('task.create'),[$feature->id],['class' => 'btn btn-default btn-xs']) !!} {!! link_to_route('features.show', trans('app.show'),[$feature->id],['class' => 'btn btn-info btn-xs']) !!} {!! link_to_route('features.edit', trans('app.edit'),[$feature->id],['class' => 'btn btn-warning btn-xs']) !!}
{{ trans('feature.empty') }}
Total {{ $features->sum('tasks_count') }} {{ formatDecimal($features->avg('progress')) }} % {{ formatRp($features->sum('price')) }}
@endsection