<?php $__env->startSection('page_title'); ?>
    OSAA Staff
<?php $__env->stopSection(); ?>

<?php $__env->startSection('header'); ?>
	View/Edit Schools
<?php $__env->stopSection(); ?>

<?php $__env->startSection('jquery_init'); ?>    	

	$('table tbody tr:even').css('background-color', '#f2f2f2');
	
	$("#schools tbody tr[is_retired]").css('background-color', '#7d7b7d');


<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="admin_page" style="height:100%; font-size:11pt; padding: 1em 1.4em; background-color:#ffffff;">

<?php		
	$schools = school::orderBy('name')->get();
?>

<button type="button" class="button float_right" style="font-size:10pt;" id="toggle_hide_retired">Hide Retired</button>

<h1>Schools</h1>
<p>
	Showing <?php echo count($schools); ?> schools.
</p>
<table id="schools" style="width:100%;">
	<thead class="ui-tabs-nav ui-widget-header ui-corner-all" >
		<tr>
			<th style="">ID</th>
			<th style="">Name</th>
			<th style="">Short Name</th>
			<th style="">Type</th>
			<th style="">HyTek Code</th>			
			<th style="">Key Code</th>
			<th style="">Retired?</th>
		</tr>
	</thead>

	<tbody>
		<?php foreach ($schools as $school): ?>
			<tr style="height:2em;" <?php if($school->is_retired): ?> is_retired="true" <?php endif; ?>>				
				<td><?php echo $school->id; ?></td>
				<td><?php echo $school->name; ?></td>
				<td><?php echo $school->short_name; ?></td>
				<td><?php echo $school->school_type; ?></td>
				<td><?php echo $school->hytek_code; ?></td>
				<td><?php echo $school->key_code; ?></td>
				<td><?php echo $school->is_retired; ?></td>				
			</tr>
		<?php endforeach; ?>

	</tbody>


</table>

</div>

<?php $__env->stopSection(); ?>