@section('header')
	@include('common.header')
@stop

@section('content')
	<div class="widget">
		<div class="widget-content">
			<h3>Workflow</h3>
			<p>This module allows you to define custom workflow event and actions that get triggered when some condition is met.</p>

			{{-- Workflow table --}}
			<table class="table">
				<tbody>
					@foreach ($events as $event)
						<tr>
							<td>{!! $event->description !!}</td>
							<td>{!! $event->model !!}</td>
							<td><span class="label label-info">{!! $event->event !!}</span></td>
							<td>{!! json_encode($event->filters) !!}</td>
							<td class="centered">{!! $event->active ? '<i class="fa fa-check"></i>' : '' !!}</td>
							<td><a href="{!! URL::route('workflow.show', $event->id) !!}">Edit</a></td>
						</tr>
					@endforeach
				</tbody>
			</table>
		</div>
	</div>
@stop