<?php $__env->startSection('content'); ?>


<div class="content" id="content">			
	<div class="overlay"></div>			
	
<?php echo $__env->make('admin.includes.topbar', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
	
	<!-- main content -->
	<div class="main-content">
		<div class="manage_buttons">
			<div class="row">
				<div class="col-md-12">
					<div class="buttons-list">
						<div class="pull-right-btn">
							<a href="<?php echo URL('admin/settings/categories/addcategory'); ?>" class="btn btn-primary">Add New Category</a>
						</div>
					</div>
				</div>
			</div>
		</div>

		<div class="row">
			<div class="col-md-12">

				<!-- panel -->
				<div class="panel panel-piluku panel-users">

					<div class="panel-heading">
						<h3 class="panel-title">
							List of Categories
							<span class="panel-options">
								<a href="#" class="panel-refresh">
									<i class="icon ti-reload"></i> 
								</a>
								<a href="#" class="panel-minimize">
									<i class="icon ti-angle-up"></i> 
								</a>
								<a href="#" class="panel-close">
									<i class="icon ti-close"></i> 
								</a>
							</span>
						</h3>
					</div>
					<div class="panel-body nopadding">
						<div class="table-responsive">
							<table class="table table-hover">
								<thead>
									<tr>
										<th>&nbsp;</th>	
						                <th>Name</th>
						                <th>Type</th>
										<th>&nbsp;</th>
									
									</tr>
								</thead>
								<tbody>
								     <?php foreach($categories as $category): ?>
									<tr class="table-row">
										<td>
											<img src="<?php echo URL('/media/uploads/images/hotel/size/263x197/'.$category->featured_image.''); ?>" alt="user">
										</td>
						                <td><?php echo $category->name; ?></td>
						                <?php
						                $x = $category->type;
						                $type = "";
						                if($x == 1){
						                	$type = "Hotels";
						                }
						                elseif($x == 2){
						                	$type = "Offers";
						                }
						                elseif($x == 3){
						                	$type = "Last Minute";
						                }
						                elseif($x == 4){
						                	$type = "Rooms";
						                }
						                elseif($x == 5){
						                	$type = "Information";
						                }

						                elseif($x == 6){
						                	$type = "Blog";
						                }
						                else{
						                	$type = "unavailable";
						                }
						                ?>
						               
						                <td><?php echo $type; ?></td>

										<td>
										<a href="<?php echo URL('admin/settings/categories'); ?>/<?php echo $category->id; ?>"class="btn btn-green"><i class="ion ion-edit"></i></a>
											<a href="<?php echo URL('admin/settings/categories/delete'); ?>/<?php echo $category->id; ?>" class="btn btn-red"><i class="ion ion-ios-trash-outline"></i></a>
										</td>
											
									</tr>
									<?php endforeach; ?>
									
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<!-- /panel -->
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<ul class="pagination small-pagination pull-right">
					
				</ul>
			</div>
		</div>
	</div>
	<!-- /main content -->		

</div>  
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>