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

<?php $__env->startSection('page_sub_title'); ?>    
   OSAA Committees
<?php $__env->stopSection(); ?>

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

    <style type="text/css">

        h3 {
            color: #990000 !important;
        }

        table.committee {
            width: 100%;
            border-collapse: collapse;
            font-size: 10pt;
            border: 1px solid #dddddd;
        }

        table.committee thead th {
            padding: 4px 2px;
            text-align: left;
        }

        table.committee thead tr {            
            background-color: #005FA9;
            color: #ffffff;
        }

        table.committee tbody td {
            padding: 0.5em 2px;
            border-bottom: 1px solid #dddddd;
        }

        .files_link {
            position: absolute;
            top: 34px;
            right: 5px;
            font-size: 8pt;
            padding: 2px 4px;
            background-color: #f2f2f2;
        }

    </style>

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

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

	$('.button').button();

	$('.tabs').tabs();

    /* Focus tab on page load, if specified */    
    var anchor = window.location.hash.substring(1);
    if (anchor)
    {
        $('.tabs').tabs('option', 'active', anchor);

        setTimeout(function() {
            window.scrollTo(0, 0);
        }, 1);
    }

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

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


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

    <div class="tabs awards">
        
        <?php /*  Tab list of committees  */ ?>
        <ul style="padding-left:5px; font-size:8pt;">            
            <?php foreach ($committees as $committee): ?>
                <li><a href="#<?php echo $committee->id; ?>"><?php echo $committee->name; ?></a></li>
            <?php endforeach; ?>
        </ul>

        <?php /*  List each tab  */ ?>
        <?php foreach ($committees as $committee): ?>
        
            <!-- <?php echo ucwords(str_replace('-', ' ', $committee->id)); ?> -->
            <div id="<?php echo $committee->id; ?>">            
                <?php if ($committee->files and Auth::check() and Auth::user()->isOsaaUser()): ?>
                    <div class="files_link ui-corner-bottom">
                        <img src="<?php echo asset('/images/icons/shield_16px.png'); ?>" alt="" title="" style="width: 16px; height: 16px; vertical-align: middle;" />
                        <b>Files Link:</b>
                        <a href="<?php echo url('/governance/committees'); ?>?show-files=<?php echo substr(md5($committee->id), 0, 8); ?>#<?php echo $committee->id; ?>"><?php echo url('/governance/committees'); ?>?show-files=<?php echo substr(md5($committee->id), 0, 8); ?>#<?php echo $committee->id; ?></a>
                    </div>
                <?php endif; ?>

                <?php if (!file_exists(app_path() . '/views/governance/committees/' . str_replace('-', '_', str_replace('-committee', '', $committee->id)) . '_slice.blade.php')): ?>
                  
                  <h2>Coming Soon...</h2>

                  <?php if (Auth::check() and Auth::user()->isOsaaUser()): ?>
                  
                      To show information on this tab, you will need to create a file named:<br />                      
                      <div style="display: inline-block; width: 40px;"></div><b><?php echo str_replace('-', '_', str_replace('-committee', '', $committee->id)) . '_slice.blade.php'; ?></b><br /><br />
                      Save this file to:<br />
                      <div style="display: inline-block; width: 40px;"></div>app/views/governance/committees
                  
                  <?php endif; ?>
                <?php else: ?>
                    <?php echo $__env->make ('governance.committees.' . str_replace('-', '_', str_replace('-committee', '', $committee->id)) . '_slice', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php endif; ?>

            </div>
            <!-- End of <?php echo ucwords(str_replace('-', ' ', $committee->id)); ?> -->

        <?php endforeach; ?>        
                       
    </div>	
<?php $__env->stopSection(); ?>