<?php $__env->startSection('page_title'); ?>
    OSAA - Associate Member Schools
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_sub_title'); ?>    
   OSAA Associate Member Schools 
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    @parent

    <style type="text/css">
    	.page_functions {
    		width: auto !important;
    	}
    </style>

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

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

	$('#manage_associate_schools_button')
		.button({'icons':{'primary':'ui-icon-home'}})
		.css({'font-size':'9pt'});

	$('#invoice_associate_schools_button')
		.button({'icons':{'primary':'ui-icon-tag'}})
		.css({'font-size':'9pt'});

	$('#download_button')
		.button({'icons':{'primary':'ui-icon-arrowthickstop-1-s'}})
		.css({'font-size':'9pt'});


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

<?php $__env->startSection('page_functions'); ?>
    
	<?php if (Auth::check() and Auth::user()->isOsaaUser()): ?>

		<a href="<?php echo url('schools/associate-members/download'); ?>" target="_blank" id="download_button">Download</a>

	<?php endif; ?>


	<?php if (Auth::check() and Auth::user()->isOsaaUser() and Helpers::strEqual(Auth::user()->email, array('gibbyr@osaa.org', 'candyp@osaa.org', 'meridithp@osaa.org', 'kellyf@osaa.org'))): ?>		
		
		<a href="<?php echo url('/schools/associate-members/edit'); ?>" id="manage_associate_schools_button">Manage Schools</a>		

	<?php endif; ?>


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


<?php $__env->startSection('main_content'); ?>    		
		
	<div style="float: right;">
		&raquo; <a href="<?php echo asset('/docs/forms/MembershipApplication-Associate.pdf'); ?>" target="_blank">Membership Application - Associate</a>
	</div>

	<?php	    
	    $count = count($schools);	    	    	    
	?>	

	<?php if ($count < 1): ?>
		<h1>There are no Associate Member schools to list</h1>
	<?php elseif ($count == 1): ?>
		<h1>Listing 1 Associate Member School</h1>
	<?php else: ?>
		<h1>All <?php echo $count; ?> Associate Member Schools</h1>		
	<?php endif; ?>

	<?php if ($count > 0): ?>
		
		<div class="columns">

			<div class="half">

				<?php
					$i = 0;
				?>
				<?php foreach ($schools as $school): ?>
					<?php
						$i++;

						if ($i == (int) (($count + 3) / 2))
						{
							echo "</div><div class=\"half\">";
						}						

					?>

					<a href="<?php echo url('/schools/' . $school->id); ?>" class="associate_member_school"><?php echo $school->name; ?></a>

				<?php endforeach; ?>
			
			</div>

		</div>
	<?php endif; ?>	

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

<?php /* 



































 */ ?>