@extends('layouts.default')

@section('title')
@parent
Причины отказа для проекта {{ $project->name }}
@stop

@section('content')
<div class="row">
  <div class="col-md-12">
		<h4>Причины отказа для проекта {{ $project->name }}</h4>
		<div class="table-responsive">
			<table class="table table-striped table-hover">
				<thead>
				<th>Название</th>
				<th>Действия</th>
				</thead>
				<tbody>
					@foreach ($project->rejects as $reject)
					<tr>
						<td>
							{{ $reject->name }}
						</td>
						<td>
							<button class="btn btn-sm btn-default" onClick="location.href ='{{ action('RejectsController@edit', array($project->id, $reject->id)) }}'">Редактировать</button>
							<button class="btn btn-sm btn-default action_confirm" type="button" data-method="delete" href="{{ action('RejectsController@destroy', array($project->id, $reject->id)) }}">Удалить</button>
						</td>
					</tr>
					@endforeach
				</tbody>
			</table>
		</div>
		<button class="btn btn-primary" onClick="location.href ='{{ URL::to('projects') }}/{{ $project->id }}/rejects/create'">Добавить причину отказа</button>
	</div>
</div>
@stop
