@extends('master')
	@section('content')
	<link rel="apple-touch-icon" sizes="76x76" href="{{asset('img/new_logo.png')}}">
	<link rel="icon" type="image/png" sizes="96x96" href="{{asset('img/room.png')}}">
	<title>Pengunjung</title>
<div class="form-group row add">
	<div class="col-md-6" style="margin-left: 450px;">
		{!! Form::open(['method'=>'GET','url'=>'pengunjung','class'=>'navbar-form navbar-left','role'=>'search']) !!}
		<div class="input-group custom-search-form">
			<input type="text" name="search" class="form-control" placeholder="Search........">
			<span class="input-group-btn">
				<button type="submit" class="btn btn-default-sm">
					<i class="fa fa-search">search</i>
				</button>
			</span>
		</div>
		{!! Form::close() !!}
		</div>
		</div>

	<div class="row">
	<div class="col-md-12">
	<h2>Daftar Buku di Perpustakaan</h2>
	</div>
	</div>


<div class="panel-body">
<a href="{{URL::to('deleteAllPengunjung')}}" class="btn btn-danger">Delete All</a>
<a href="{{URL::to('getImportPengunjung')}}" class="btn btn-success">Import</a>
<div class="btn-group">
	<button type="button" class="btn btn-info">Export</button>
	<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
	<span class="caret"></span>
	<span class="sr-only">Toggle Dropdown</span>
	</button>
	<ul class="dropdown-menu" role="menu" id="export-men">
	<li id="export-to-excel"><a href="{{URL::to('getExportPengunjung')}}">Export To Excel</a></li>
	<li id="export-to-pdf"><a href="{{URL::to('getPDFPengunjung')}}">Export To PDF</a></li>
	<li class="divider"></li>

	</ul>
</div>
</div>



	<div class="row">
		<table class="table table-striped">
		<tr>
		<th>No.</th>
		<th>Kode Pemesanan</th>
		<th>Nama</th>
		<th>Jenis Kamar</th>
		<th>Kontak</th>
		<th>Check-In</th>
		<th>Check-Out</th>
		<th>Actions</th>
		</tr>

		

		<a href="{{route('pengunjung.create')}}" class="btn btn-info pull-right">Create New Pengunjung</a><br>
		
		<a href="{{route('receptionist')}}"><button type="button" class="btn btn-lg"><i class="glyphicon glyphicon-hand-left"></i></button></a><br>
		<?php $no=1; ?>

		@foreach($pengunjungs as $pengunjung)

		<tr>
		<td>{{$no++}}</td>
		<td>{{$pengunjung->kode_pemesanan}}</td>
		<td>{{$pengunjung->nama}}</td>
		<td>{{$pengunjung->jenis_kamar}}</td>
		<td>{{$pengunjung->kontak}}</td>
		<td>{{$pengunjung->check_in}}</td>
		<td>{{$pengunjung->check_out}}</td>
		<td>
		<form class="" action="{{route('pengunjung.destroy', $pengunjung->id)}}" method="post">
		<input type="hidden" name="_method" value="delete">
		<input type="hidden" name="_token" value="{{ csrf_token() }}">
		<a href="{{route('pengunjung.edit',$pengunjung->id)}}" class="btn btn-primary">Edit</a>
		
		
		

		<input type="submit" class="btn btn-danger" onclick="return confirm('Are you sure to delete this data');" name="name" value="delete">
		</form>
		</td>

		</tr>

		@endforeach

		</table>

		
		</div>



	@stop