<?php \Laravel\Section::start('content'); ?>
	<div><h1>Τα μέλη του Ομίλου το <?php echo  Session::get('year')['year_label'] ; ?></h1></div>
	<div class="table">
	<table id="tb_grid" class="grid">
		<thead>
			<tr>
				<th></th>
				<th>Αρ.μητρώου</th>
				<th>Αρ.μέλους</th>
				<th>όνομα</th>
				<th>email</th>
				<th>χρέωση</th>
				<th>πίστωση</th>
				<th>υπόλοιπο</th>
				<th>status</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<th colspan="9"></th>
			</tr>
		</tfoot>
		<tbody>
		<?php foreach($members as $member): ?>
			<tr>
				<td><?php if (Session::get('user')['role'] == 'Administrator' ): ?>
					<?php echo  HTML::link_to_route('member' , '', array($member->member_id), array( 'class'=>'show', 'alt'=>'show', 'title'=>'show details')) ; ?>
					<?php echo  HTML::link_to_route('edit_member' , '', array($member->member_id), array( 'class'=>'upd', 'alt'=>'upd', 'title'=>'update')) ; ?>
					<?php echo  HTML::link_to_route('confirm_member' , '', array($member->member_id), array( 'class'=>'del', 'alt'=>'del', 'title'=>'delete')) ; ?></td>
					<?php endif; ?>
				<td><?php echo  HTML::link_to_route('person' , substr('0000' . $member->person_id, - 5), array($member->person_id)) ; ?></td>
				<td><?php echo  substr('0000' . $member->member_code, - 5) ; ?></td>
				<td><?php echo  $member->person_surname . ' ' . $member->person_name ; ?></td>
				<td><?php echo  HTML::mailto($member->person_email,$member->person_email); ?></td>
				<td class="money"><?php echo  $member->member_debit	. ' €'; ?></td>
				<td class="money"><?php echo  $member->member_credit	. ' €'; ?></td>
				<td class="money"><?php echo  $member->member_amount	. ' €'; ?></td>
				<td><?php echo  $member->status_label; ?></td>
			</tr>
		<?php endforeach; ?>
		</tbody>
	</table>
	</div>
<?php \Laravel\Section::stop(); ?>





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