<?php 
$titles = __('error_titles', true);
$bodies = __('error_bodies', true);
$filter = __('filter', true);
?>
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-sm-12">
		<div class="row">
			<div class="col-sm-10">
				<h2><?php echo $titles['AS09']; ?></h2>
			</div>
		</div><!-- /.row -->

		<p class="m-b-none"><i class="fa fa-info-circle"></i> <?php echo $bodies['AS09'];?></p>
	</div><!-- /.col-md-12 -->
</div>

<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-lg-12">
			<?php
	    	$error_code = $controller->_get->toString('err');
	    	if (!empty($error_code))
	    	{
	    	    $titles = __('error_titles', true);
	    	    $bodies = __('error_bodies', true);
	    	    switch (true)
	    	    {
	    	        case in_array($error_code, array('AS01', 'AS03')):
	    	            ?>
	    				<div class="alert alert-success">
	    					<i class="fa fa-check m-r-xs"></i>
	    					<strong><?php echo @$titles[$error_code]; ?></strong>
	    					<?php echo @$bodies[$error_code]?>
	    				</div>
	    				<?php
	    				break;
	                case in_array($error_code, array('AS04', 'AS08')):
	    				?>
	    				<div class="alert alert-danger">
	    					<i class="fa fa-exclamation-triangle m-r-xs"></i>
	    					<strong><?php echo @$titles[$error_code]; ?></strong>
	    					<?php echo @$bodies[$error_code]?>
	    				</div>
	    				<?php
	    				break;
	    		}
	    	}
	    	?>
			<div class="ibox float-e-margins">
				<div class="ibox-content">
					<div class="row m-b-md">
						<div class="col-sm-3">
							<a href="<?php echo $_SERVER['PHP_SELF'].'?controller=pjAdminSpaces&action=pjActionCreate'?>" class="btn btn-primary"><i class="fa fa-plus"></i> <?php __('btnAddSpace');?></a>
						</div><!-- /.col-md-6 -->

						<div class="col-md-3 col-sm-5">
							<form action="" method="get" class="form-horizontal frm-filter">
	                            <div class="input-group">
	                                <input type="text" name="q" placeholder="<?php __('plugin_base_btn_search', false, true); ?>" class="form-control">
	                                <div class="input-group-btn">
	                                    <button class="btn btn-primary" type="submit">
	                                        <i class="fa fa-search"></i>
	                                    </button>
	                                </div>
	                            </div>
	                        </form>
						</div><!-- /.col-md-3 -->
						<div class="col-lg-6 col-md-6 col-sm-12 text-right">
							<div class="btn-group" role="group" aria-label="...">
								<button type="button" class="btn btn-default btn-all"><?php __('lblAll'); ?></button>
	                            <button type="button" class="btn btn-default btn-filter" data-column="status" data-value="T"><i class="fa fa-check"></i> <?php echo $filter['active']; ?></button>
	                            <button type="button" class="btn btn-default btn-filter" data-column="status" data-value="F"><i class="fa fa-times"></i> <?php echo $filter['inactive']; ?></button>
							</div>
						</div><!-- /.col-md-6 -->
					</div><!-- /.row -->
					<div id="grid"></div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
var pjGrid = pjGrid || {};
pjGrid.hasAccessCreate = <?php echo pjAuth::factory('pjAdminSpaces', 'pjActionCreate')->hasAccess() ? 'true' : 'false';?>;
pjGrid.hasAccessUpdate = <?php echo pjAuth::factory('pjAdminSpaces', 'pjActionUpdate')->hasAccess() ? 'true' : 'false';?>;
pjGrid.hasAccessDeleteSingle = <?php echo pjAuth::factory('pjAdminSpaces', 'pjActionDelete')->hasAccess() ? 'true' : 'false';?>;
pjGrid.hasAccessDeleteMulti = <?php echo pjAuth::factory('pjAdminSpaces', 'pjActionDeleteBulk')->hasAccess() ? 'true' : 'false';?>;
var myLabel = myLabel || {};
myLabel.name = <?php x__encode('lblName'); ?>;
myLabel.occupied_now = <?php x__encode('lblOccupiedNow');?>;
myLabel.available_now = <?php x__encode('lblAvailableNow');?>;
myLabel.price_today = <?php x__encode('lblPriceToday');?>;
myLabel.set_price = <?php x__encode('lblSetPrice');?>;
myLabel.total_spaces_today = <?php x__encode('lblTotalSpacesToday'); ?>;
myLabel.avail_spaces_today = <?php x__encode('lblAvailableSpacesToday'); ?>;
myLabel.status = <?php x__encode('lblStatus'); ?>;
myLabel.active = <?php x__encode('filter_ARRAY_active'); ?>;
myLabel.inactive = <?php x__encode('filter_ARRAY_inactive'); ?>;
myLabel.delete_selected = <?php x__encode('delete_selected', true); ?>;
myLabel.delete_confirmation = <?php x__encode('delete_confirmation', true); ?>;
</script>