<div class="container-fluid">
	<div class="row">
		<div class="col-lg-12 text-right">
			<?php include PJ_VIEWS_PATH . 'pjFrontEnd/elements/locale.php';?>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-12">
			<?php include PJ_VIEWS_PATH . 'pjFrontEnd/elements/filter.php';?>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
			<div class="panel panel-default pjAsContainer pjAsAside">
				<div class="panel-heading pjAsHead">
					<h2 class="pjAsHeadTitle"><?php __('front_select_date'); ?></h2><!-- /.pjAsHeadTitle -->
				</div><!-- /.panel-heading pjAsHead -->

				<div class="panel-body pjAsCalendarInline">
					<?php include PJ_VIEWS_PATH . 'pjFrontEnd/elements/calendar.php'; ?>
				</div><!-- /.panel-body pjAsCalendarInline -->

				<ul class="list-group pjAsAsideServices">
					<?php
					$cart = $controller->cart->getAll();
					$cart_arr = $tpl['cart_arr'];
					include PJ_VIEWS_PATH . 'pjFrontPublic/elements/cart_layout2.php';
					?>
				</ul><!-- /.list-group pjAsAsideServices -->
			</div><!-- /.panel panel-default pjAsContainer pjAsAside -->
		</div><!-- /.col-lg-4 col-md-4 col-sm-4 col-xs-12 -->

		<div id="pjAsServicesWrapper" class="col-lg-8 col-md-8 col-sm-8 col-xs-12">
			<div class="panel panel-default pjAsContainer pjAsAside">
				<?php 
				include PJ_VIEWS_PATH . 'pjFrontPublic/elements/header.php';
				$selected_date = $controller->_get->toString('date');
				?>
				<ul class="list-group pjAsListElements pjAsServices">
					<li class="list-group-item pjAsListElement pjAsService">
						<div class="row pjAsNavCalendarDate">											
							<div class="col-xs-6">
								<?php if ($selected_date > $tpl['first_working_date']) { ?>
									<a href="javascript:void(0);" class="pjAsCalendarDate" data-iso="<?php echo date('Y-m-d', strtotime($selected_date.' -1 day'));?>"><i class="glyphicon glyphicon-chevron-left"></i> <?php __('front_previous');?></a>
								<?php } ?>&nbsp;
							</div>
							<div class="col-xs-6 text-right">
								<a href="javascript:void(0);" class="pjAsCalendarDate" data-iso="<?php echo date('Y-m-d', strtotime($selected_date.' +1 day'));?>"><?php __('front_next');?> <i class="glyphicon glyphicon-chevron-right"></i></a>
							</div>
						</div>
						<div class="form-horizontal asEmployeeInfo">
							<?php
							if(!isset($tpl['unavailable']))
							{
								?>
								<?php if ($tpl['available_slote_arr']) { ?>
									<form class="pjAsAddToCartForm" action="" method="post">
										<div class="form-group">
											<div class="col-sx-12">
												<div class="pjAsTableTimes">
													<?php foreach ($tpl['available_slote_arr'] as $slot) { 
														$time_arr = explode('~:~', $slot);
														list($start_ts, , , ) = explode('|', $time_arr[0]);
														?>
														<span class="pjAsTimeAvailable"><a href="javascript:void(0);" class="pjAsSlotAvailable" data-times="<?php echo $slot;?>"><?php echo date($tpl['option_arr']['o_time_format'], $start_ts);?></a></span>
													<?php } ?>
												</div><!-- /.pjAsTableTimes -->
											</div><!-- /.col-lg-8 col-md-8 col-sm-8 col-sx-12 -->
										</div><!-- /.form-group -->									
										
										<div class="form-group">
											<div class="col-lg-9 col-lg-offset-3 col-md-9 col-md-offset-3 col-sm-9 col-sm-offset-3 col-sx-12">
												<input class="btn btn-default pjAsBtn pjAsBtnPrimary pjAsBtnAppointment" value="<?php __('front_btn_book_slot', false, true); ?>" disabled="disabled" type="submit">
												<a href="#" class="btn btn-default pjAsBtn pjAsBtnSecondary pjAsBtnBackToServices"><?php __('btnCancel'); ?></a>
											</div><!-- /.col-lg-8 col-lg-offset-4 col-md-8 col-md-offset-4 col-sm-8 col-sm-offset-4 col-sx-12 -->
										</div><!-- /.form-group -->
										
										<input type="hidden" name="date" value="<?php echo date($tpl['option_arr']['o_date_format'], strtotime($controller->_get->toString('date')));?>" />
										<input type="hidden" name="times" value="" />
									</form>
								<?php } else { ?>
									<div class="text-danger"><?php __('front_no_timeslots_available');?></div>
								<?php } ?>
							</div><!-- /.form-horizontal asEmployeeInfo -->
							<?php
						} else { ?>
							<div class="text-danger"><?php echo sprintf(__('front_accept_booking_days_ahead_msg', true), (int)$tpl['option_arr']['o_booking_days_earlier']);?></div>
						<?php } ?>
					</li>
				</ul>						
			</div><!-- /.panel panel-default pjAsContainer -->
		</div><!-- /.col-lg-8 col-md-8 col-sm-8 col-xs-12 -->
	</div><!-- /.row -->
</div><!-- /.container-fluid -->