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

<?php $__env->startSection('page_sub_title'); ?>    
    OSAA State Championship Programs Archive
<?php $__env->stopSection(); ?>

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

    <style type="text/css">
        
    	



    </style>

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

<?php $__env->startSection('jquery_init'); ?>
    
    $('.back_button')
        .button({'icons' : {'primary' : 'ui-icon-circle-arrow-w'}})
        .css({'font-size' : '9pt'});

    $('div.third').each(function(index, item)
    {
        if ($(item).children('a').length < 1)
        {
            $(item).remove();
        }
    });

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

<?php $__env->startSection('page_functions'); ?>
   
    <a href="<?php echo url('/programs'); ?>" class="back_button">Back</a>

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


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

    <?php if (count($info['school_years']) > 0): ?>

        <?php foreach ($info['school_years'] as $school_year): ?>

            <h1><?php echo $school_year; ?>-<?php echo substr($school_year + 1, 2, 2); ?></h1>

            <div class="columns">
                
                <?php foreach (array('F' => 'Fall', 'W' => 'Winter', 'S' => 'Spring') as $season_slug => $season_name): ?>

                    <div class="third">
                        <h2><?php echo $season_name; ?> Digital Programs</h2>
                        <?php foreach ($info['programs'] as $program): ?>

                            <?php if ($program->school_year == $school_year and $program->season == $season_slug and file_exists(public_path() . '/docs/programs/' . $program->archive_link)): ?>

                                <a href="<?php echo asset('/docs/programs/' . $program->archive_link); ?>" target="_blank"><?php echo str_replace('<br />', ' ', $program->title); ?></a><br />

                            <?php endif; ?>

                        <?php endforeach; ?>
                    </div>
                <?php endforeach; ?>

            </div>

            <br class="clear" /><br />


        <?php endforeach; ?>


    <?php else: ?>
        There are no archived digital programs to display.
    <?php endif; ?>    
        
<?php $__env->stopSection(); ?>