<?php $__env->startSection('content'); ?>
	<div class="tp-banner-container">
        <div class="tp-banner">
            <ul>
                <!-- SLIDE ONE  -->
                <li data-transition="fade" data-slotamount="5" data-masterspeed="700">
                    <!-- MAIN IMAGE -->
                    <img src="<?php echo $splash = array_key_exists('category', $other) && $other['category'] == 'Channel 3' ? $variable->getMedia('L10-Ch3-MantiHighSchool') : $variable->getMedia('L10-BasketballSlider'); ?>" alt="Live Football" data-bgfit="cover" data-bgposition="center center" data-bgrepeat="no-repeat">
                </li>
            </ul>
            <div class="tp-bannertimer"></div>
        </div>
    </div>
	<div class="container-fluid modul-bt-one">
	    <div class="container">
	    	<div class="row">
	    		<div class="col-xs-12 col-md-8 col-md-offset-2">
                    <div class="advert-two-title">
                        <h1>
                       		<?php if(array_key_exists('category', $other)): ?>
                        		<?php echo e($other['category'] . ''); ?> 
                            <?php else: ?>
                                <?php echo e("All Events"); ?>

                                <?php $other['category'] = "All"; ?>
                            <?php endif; ?>
                        </h1>
                     </div>
                 </div>
	    	</div>
	      <div class="row">
	    	<div class="dataTable_wrapper">
                    <table class="table table-striped table-bordered table-hover" id="dataTables-events">
                         <thead>
                                <tr>
                                	<th></th>
									<th>Title</th>
									<th>Category</th>
                                </tr>
                         </thead>
                         <tbody>
                               <?php $count = 0;  ?>
                               <?php foreach($other['events'] as $event): ?>
                                <?php $count++; ?>
                                <?php if($count % 2 == 1): ?>
                                <tr class="odd">
                                <?php else: ?>
                                <tr class="even">
                                <?php endif; ?>
                                	<td>
                                	<?php if($event->stage == 'live'): ?>
                                		<i style="display: none;"><?php echo e(strtotime($event->start_time)); ?></i> 
                                		<a href="<?php echo e(url('stream/'.$event->id.'/'.$event->seoTitle())); ?>" target="_blank" style="text-decoration: none;"><strong>Live Now</strong></a>
                                	<?php elseif($event->stage == 'scheduled'): ?>
                                		<?php if($event->display_date): ?>
                                		<i style="display: none;"><?php echo e(strtotime($event->start_time)); ?></i>
											<?php if(date('Y', strtotime($event->start_time)) == date('Y')): ?>
                                				<?php echo e(date('M j @ g:i a', strtotime($event->start_time))); ?>

                                			<?php else: ?>
                                				<?php echo e(date('M j, Y @ g:i a', strtotime($event->start_time))); ?>

                                			<?php endif; ?>
                                		<?php else: ?>
                                		<i style="display: none;"><?php echo e(strtotime($event->start_time)); ?></i>
                                		Upcoming
                                		<?php endif; ?>
                                	<?php else: ?>
                                		<?php if($event->display_date): ?>
                                		<i style="display: none;"><?php echo e(strtotime($event->start_time)); ?></i>
											<?php if(date('Y', strtotime($event->start_time)) == date('Y')): ?>
                                				<?php echo e(date('M j', strtotime($event->start_time))); ?>

                                			<?php else: ?>
                                				<?php echo e(date('M j, Y', strtotime($event->start_time))); ?>

                                			<?php endif; ?>
                                		<?php else: ?>
                                		<i style="display: none;"><?php echo e(strtotime($event->start_time)); ?></i>
                                		<?php endif; ?>
                                	<?php endif; ?>
                                	</td>
									<td>
										<a href="<?php echo e(url('stream/'.$event->id.'/'.$event->seoTitle())); ?>" target="_blank" style="text-decoration: none;">
											<?php if($event->stage == 'scheduled'): ?>
											<i class="fa fa-info-circle"></i> &nbsp;
											<?php echo e($event->title); ?>

											<?php elseif($event->stage == 'live'): ?>
											<strong>
												<i class="fa fa-play-circle"></i> &nbsp;
												<?php echo e($event->title); ?>

											</strong>
											<?php else: ?>
											<i class="fa fa-play-circle"></i> &nbsp;
											<?php echo e($event->title); ?>

											<?php endif; ?>
										</a>
									</td>
									<td>
										<?php $count2 = count($event->categories); ?>
										<?php foreach($event->categories as $ind): ?>
											<?php if($count2 == 1): ?>
											<a href="<?php echo e(url('events/'.$ind->id.'/'.\App\Event::seo($ind->name))); ?>" style="text-decoration: none;">
												<?php echo e($ind->name); ?>

											</a>
											<?php else: ?>
											<i style="display:none;"><?php echo e($ind->name . ', '); ?></i>
											<?php endif; ?>
											<?php $count2--; ?> 
										<?php endforeach; ?>
									</td>
                                </tr>
                            <?php endforeach; ?>
                            <?php foreach($other['old'] as $event): ?>
								<?php $count++; ?>
                                <?php if($count % 2 == 1): ?>
                                <tr class="odd">
                                <?php else: ?>
                                <tr class="even">
                                <?php endif; ?>
                                	<td>
                                		<?php if($event->display_date): ?>
                                		<i style="display: none;"><?php echo e(strtotime($event->ts)); ?></i>
                                			<?php if(date('Y', strtotime($event->ts)) == date('Y')): ?>
                                				<?php echo e(date('M j', strtotime($event->ts))); ?>

                                			<?php else: ?>
                                				<?php echo e(date('M j, Y', strtotime($event->ts))); ?>

                                			<?php endif; ?>
                                		<?php else: ?>
                                		<i style="display: none;"><?php echo e(strtotime($event->ts)); ?></i>
                                		<?php endif; ?>
                                	</td>
									<td>
										<a href="<?php echo e(url('archive/'.$event->id.'/'.\App\Event::seo($event->subtitle))); ?>" target="_blank" style="text-decoration: none;">
										<i class="fa fa-play-circle"></i> &nbsp;
										<?php echo $event->subtitle; ?>

										</a>
									</td>
									<td>
										<?php echo e($event->title); ?>

									</td>
                                </tr>
							<?php endforeach; ?>
                        </tbody>
                   </table>
              </div>
            </div>
            <br>
	    </div>
	</div>
	
<?php $__env->stopSection(); ?>

<?php $__env->startSection('extras'); ?>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/t/bs/pdfmake-0.1.18,dt-1.10.11,b-1.1.2,b-flash-1.1.2,b-html5-1.1.2,b-print-1.1.2/datatables.min.css"/>
    
    <style>
    	a {
    		text-decoration: none;
    	}
    	
    	body {
	    	background-color: white;
    	}
    </style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('bottom'); ?>
<script type="text/javascript" src="https://cdn.datatables.net/t/bs/pdfmake-0.1.18,dt-1.10.11,b-1.1.2,b-flash-1.1.2,b-html5-1.1.2,b-print-1.1.2/datatables.min.js"></script>

	<script type="text/javascript">
        var revapi;
        jQuery(document).ready(function() {

            revapi = jQuery('.tp-banner').revolution({
                delay: 10000,
                startwidth: 1170,
                startheight: 394,
                hideThumbs: 10,
                fullScreen: "off",
                fullScreenAlignForce: "off",
                fullScreenOffsetContainer: ".navigation-menu"
            });

            var table1 =    $('#dataTables-events').dataTable( {

				"pageLength": 25,
				"aaSorting": [],
				"stateSave" : false,
				"scrollX" : window.innerWidth < 800 ? true : false,
				"columnDefs": [
				               {
				                   "targets": [ 0 ],
				                   "visible": true,
				                   "searchable": true
				               },
				           ],
	             "oLanguage": {
	        	      "sInfo": "Showing _START_ to _END_ of _TOTAL_ events",
	        	      "sInfoFiltered": "(filtered from _MAX_ total events)",
	        	      "sSearch": "Find Event:"
	        	    }

				
    } ); 
            
            //$('.tp-banner').delay(6000).fadeOut(1000);
            	
            

        });

        if ( typeof $.fn.dataTable == "function" && typeof $.fn.dataTableExt.fnVersionCheck == "function" && $.fn.dataTableExt.fnVersionCheck('1.9.2')/*older versions should work too*/ )
        {
            $.fn.dataTableExt.oApi.clearSearch = function ( oSettings )
            {
         
                var table = this;
                 
                //any browser, must include your own file
                //var clearSearch = $('<img src="/images/delete.png" style="vertical-align:text-bottom;cursor:pointer;" alt="Delete" title="Delete"/>');
                 
                //no image file needed, css embedding must be supported by browser
                var clearSearch = $('<i class="fa fa-times-circle-o fa-fw" style="vertical-align:text-bottom;cursor:pointer;color: gray;"></i>');
                $(clearSearch).click( function ()
                        {
                              table.fnFilter('');
                        });
                $(oSettings.nTableWrapper).find('div.dataTables_filter').append(clearSearch);
                $(oSettings.nTableWrapper).find('div.dataTables_filter label').css('margin-right', '-16px');//16px the image width
                $(oSettings.nTableWrapper).find('div.dataTables_filter input').css('padding-right', '16px');
            }
         
            //auto-execute, no code needs to be added
            $.fn.dataTable.models.oSettings['aoInitComplete'].push( {
                "fn": $.fn.dataTableExt.oApi.clearSearch,
                "sName": 'whatever'
            } );
        }
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('residential.local10.event_template', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>