
<?php \Laravel\Section::start('content'); ?>
<?php // print_r(array_values($ids)); ?>
<?php // print_r(array_values($teams)); ?>
	<div id="tabs">
		<ul>
			<?php foreach($ids as $i): ?> 
				<li><a href="#tabs-<?php echo  $i ; ?>"><?php echo  $teams[$i]->team_name ; ?></a></li>
			<?php endforeach; ?>
		</ul>
		<?php foreach($ids as $i): ?>
		<div id="tabs-<?php echo  $i ; ?>">
			<div id="accordion-<?php echo  $i ; ?>">
				<?php foreach($games[$i] as $game): ?>
					<h3><?php echo  $game->game_date ; ?>
						<span class="acchead">	<?php echo  $game->host_team ; ?>
							<span class="score"><?php echo  $game->score_host ; ?> - <?php echo  $game->score_guest ; ?></span>
							<?php echo  $game->guest_team ; ?>
						</span>
					</h3>
					<div>
					<table><tr>
						<td width="30px" >
							<?php echo  HTML::link_to_route('game' , '', array($game->id), array( 'class'=>'show', 'alt'=>'show', 'title'=>'show details')) ; ?>
							<br/><br/><?php echo  HTML::link_to_route('edit_game' , '', array($game->id), array('class'=>'upd', 'alt'=>'upd', 'title'=>'update')) ; ?>
							<br/><br/><?php echo  HTML::link_to_route('new_game' , '', null,array('class'=>'add', 'alt'=>'add', 'title'=>'add new')) ; ?>
						</td>
						<td width="15px" bgcolor="#eeeeee"></td>
						<td><table width-"100%">
							<tr><th colspan="5"><?php echo  $game->host_team ; ?></th></tr>
							<tr><th>1</th><td> - </td><td><?php echo  $game->h_player1 ; ?></td><td> </td><td><?php echo  $game->host_player1 ; ?></td></tr>
							<tr><th>2</th><td> - </td><td><?php echo  $game->h_player2 ; ?></td><td> </td><td><?php echo  $game->host_player2 ; ?></td></tr>
							<tr><th>3</th><td> - </td><td><?php echo  $game->h_player3 ; ?></td><td> </td><td><?php echo  $game->host_player3 ; ?></td></tr>
						</table></td>
						<td width="15px" bgcolor="#eeeeee"></td>
						<td><table>
							<tr><th colspan="5"><?php echo  $game->guest_team ; ?></th></tr>
							<tr><th>1</th><td> - </td><td><?php echo  $game->g_player1 ; ?></td><td> </td><td><?php echo  $game->guest_player1 ; ?></td></tr>
							<tr><th>2</th><td> - </td><td><?php echo  $game->g_player2 ; ?></td><td> </td><td><?php echo  $game->guest_player2 ; ?></td></tr>
							<tr><th>3</th><td> - </td><td><?php echo  $game->g_player3 ; ?></td><td> </td><td><?php echo  $game->guest_player3 ; ?></td></tr>
						</table></td>
						<td width="15px" bgcolor="#eeeeee"></td>
						<td>
							<p><?php echo  $game->club_address ; ?></p>
						</td>
						<td width="15px" bgcolor="#eeeeee"></td>
						<td width="200px">
							<p><?php echo  $game->game_comments ; ?></p>
						</td>
					</tr></table>
					<br/>
					<span class="notes">last updated <?php echo  date("d M Y", strtotime($game->updated_at)) ; ?> by <?php echo  $game->updated_by ; ?></span>
					</div>
				<?php endforeach; ?>
			</div>
		</div>
		<?php endforeach; ?>
	</div>
<?php \Laravel\Section::stop(); ?>

<?php echo view('layouts.medium')->with(get_defined_vars())->render(); ?>