<?php $__env->startSection('content'); ?>
	
	<div class="row">
		<div class="col-xs-6">
			<h2>Contacts</h2>
		</div>
	</div>
	
	<table class="table table-bordered table-striped">
		<thead>
			<tr>
				<th class="text-center">ID</th>
              	<th class="text-center">Full name</th>
				<th class="col-md-4">Email</th>
                <th class="text-center">Phone</th>
				<th class="text-center">Created</th>
				<th class="text-center" colspan="2">Actions</th>
			</tr>
		</thead>
		<tbody>
		<?php if($contacts): ?>
			<?php foreach($contacts as $contact): ?>
			<tr>
				<td class="text-center"><?php echo $contact->contact_id; ?></td>
				<td><?php echo $contact->name; ?></td>
         		<td><?php echo $contact->email; ?></td>
                <td><?php echo $contact->phone; ?></td>
				<td class="text-center"><?php echo date('M d, Y, g:ia', strtotime($contact->created_at)); ?></td>
				<td align="center"><a href="<?php echo URL::to('admin/contact/'.$contact->contact_id); ?>" title="Edit"><i class="glyphicon glyphicon-eye-open"></i></a></td>
			</tr>
			<?php endforeach; ?>
		<?php else: ?>
			<tr>
				<td colspan="6">No contacts yet.</td>
			</tr>
		<?php endif; ?>
		</tbody>
	</table>
    
    <?php echo $contacts->appends(array('query' => Input::get('query')))->links(); ?>
	
<?php $__env->stopSection(); ?>