<?php \Laravel\Section::start('content'); ?>
	<h1>Competition players</h1>
	<div class="table">
	<table id="tb_players" class="grid">
		<thead>
			<tr>
				<th width="80px"></th>
				<th>id</th>
				<th>Name</th>
				<th>e-mail</th>
				<th>Mobile</th>
				<th>Birthday</th>
				<th>CL.</th>
				<th>Team</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<th colspan="8">
					<?php echo  Form::open('player/new', 'GET') ; ?>
					<?php echo  Form::submit('new player' , array( 'class' => 'button')) ; ?>
					<?php echo  Form::close() ; ?>
				</th>
			</tr>
		</tfoot>
		<tbody>
		<?php foreach($players as $player): ?>
			<tr>
				<td><?php echo  HTML::link_to_route('player' , '', array($player->id), array( 'class'=>'show', 'alt'=>'show', 'title'=>'show details')) ; ?>
					<?php echo  HTML::link_to_route('edit_player', '', array($player->id), array( 'class'=>'upd', 'alt'=>'upd', 'title'=>'update')) ; ?>
					<?php echo  HTML::link_to_route('confirm_player', '', array($player->id), array( 'class'=>'del', 'alt'=>'del', 'title'=>'delete')) ; ?></td>
				<td><?php echo  $player->id ; ?></td>
				<td><?php echo  $player->person_name . ' ' . $player->person_surname ; ?></td>
				<td>
					<?php if(Session::get('user')['id'] > 0): ?>
						<?php echo  $player->person_email_link ; ?>
					<?php else: ?>
						* * * * * * * * * *
					<?php endif; ?>
				</td>
				<td>
					<?php if(Session::get('user')['id'] > 0): ?>
						<?php echo  $player->person_mobile; ?>
					<?php else: ?>
						* * * * * * *
					<?php endif; ?>
				</td>
				<td>
					<?php if(Session::get('user')['id'] > 0): ?>
						<?php echo  $player->person_birthday; ?>
					<?php else: ?>
						* * * * * * *
					<?php endif; ?>
				</td>
				<td><?php echo  $player->classif_code ; ?> [<?php echo  $player->classif_value ; ?>]</td>
				<td><?php echo  $player->team_name ; ?></td>
			</tr>
		<?php endforeach; ?>
		</tbody>
	</table>
	</div>
<?php \Laravel\Section::stop(); ?>





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