<!DOCTYPE html>
<html>
<head>
	<title>Daftar Client</title>
</head>

	<link rel="stylesheet" type="text/css" href="{{ asset('bootstrap/css/bootstrap.min.css')}}">

<body>
	<div align="center">
		<h1 >@yield('judul')</h1>
	</div>
	<hr>
	<div class="row">
		<div class="col-md-6 col-md-offset-3">
			<br><br>
			<form url="blog" role="search" method="GET">
					<div class="input-group custom-search-form">
						<input type="text" name="search" class="form-control" placeholder="Search by nama">
						<span class="input-group-btn">
							<button type="submit" class="btn btn-default">
								<i class="glyphicon glyphicon-search"></i> Search
							</button>
						</span>
					</div>
			</form>
			<br>
		</div>
	</div>

	<div class="row" align ="center">
		<div class="col-md-8 col-md-offset-2">
			@yield('konten')
		</div>
	</div>
	<br>
	<div align="center" class="col-md-8 col-md-offset-2">
		<a href="{{ url ('/client/create') }}" class="btn btn-success">
			<i class="glyphicon glyphicon-plus"></i> Tambah Client
		</a>
	</div>
	<br><br>
	<br>
	<div align="center" class="col-md-8 col-md-offset-2">
		<a href="{{ url ('/client') }}" class="btn btn-success">
			<i class="glyphicon glyphicon-home"></i> Home
		</a>
	</div>
		<br><br>
	<hr>
	<footer >
			<div class="footer" align="center" >
		© 2016 PabweHata. All Rights Reserved.
		</div>
	</footer>
</body>
</html>

@section('script')
<script type="text/javascript">
	$(document).ready(function()
	{
		$('#search').on('keyup',function()
		{
			$value = $(this).val();
			$.ajax(
				{
				type : 'get',
				url : '{{URL::to('search')}}',
				data : {'search':$value},
				success:function(data)
				{
					$('tbody').html(data);
				}
			});
		});
	});
</script>
@endsection
