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

<?php $__env->startSection('page_sub_title'); ?>    
    My Contests Missing Scores
<?php $__env->stopSection(); ?>

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

    <?php
        GeneralController::getLiveAlert();
    ?>
    
<?php $__env->stopSection(); ?>

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

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

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

    $('.button').button();
    $('.button.go').button({ icons : { primary : 'ui-icon-circle-arrow-e' }});   

    function colorRows ()
    {
        $('table tbody tr:odd').css('background-color', '#f2f2f2');
    }   

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

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


<?php $__env->startSection('main_content'); ?>    			
  
	<h2>Hello, <?php echo Auth::user()->getDisplayFullName(); ?></h2>   

    <?php if (count ($information['contests']) < 1): ?>
        <p>
            You do not have any contests that are missing scores.
        </p>
    <?php else: ?>
        <p>
            According to our records, you are missing scores for the following contests.
        </p> 
    

        <table class="missing_scores_table">
            <thead class="head ui-tabs-nav ui-widget-header ui-corner-top">
                <tr>
                    <th>Activity</th>
                    <th>Type</th>
                    <th>Date</th>
                    <th>Time</th>
                    <th>Home Team</th>
                    <th>Away Team</th>
                    <th></th>
                </tr>
            </thead>

            <tbody>

                <?php foreach ($information['contests'] as $contest): ?>
                    <tr>
                        <td><?php echo Helpers::getActivityName($contest->activity); ?></td>
                        <td><?php echo $contest->contest_type; ?></td>
                        <td><?php echo date('n/j/Y', strtotime($contest->info->start_at)); ?></td>
                        <td><?php echo date('g:i a', strtotime($contest->info->start_at)); ?></td>
                        <td>
                            <?php
                                $home = $contest->home_team_name;
                                if (!is_null($contest->home_team))
                                {
                                    $team = team::find($contest->home_team);

                                    if (!is_null($team))
                                    {
                                        $level = null;

                                        if (!Helpers::strEqual($team->level, 'V'))
                                        {
                                            $level = ' [' . $team->level . ']';
                                        }

                                        $home = '<a href="' . url('/teams/' . $team->activity_program . '#tabs-V">') . $contest->home_team_name . $level . '</a>';
                                    }
                                }
                            ?>
                            <?php echo $home; ?>                            
                        </td>
                        <td>
                            <?php
                                $away = $contest->away_team_name;
                                if (!is_null($contest->away_team))
                                {
                                    $team = team::find($contest->away_team);

                                    if (!is_null($team))
                                    {
                                        $level = null;

                                        if (!Helpers::strEqual($team->level, 'V'))
                                        {
                                            $level = ' [' . $team->level . ']';
                                        }


                                        $away = '<a href="' . url('/teams/' . $team->activity_program . '#tabs-V">') . $contest->away_team_name . $level . '</a>';
                                    }
                                }
                            ?>
                            <?php echo $away; ?>
                        </td>
                        <td><a href="<?php echo url('/contests/' . $contest->id . '/submit-scores'); ?>" class="button go tooltip" title="Submit scores for this contest." style="font-size:9pt;">Submit Scores</a></td>
                    </tr>
                <?php endforeach; ?> 
            </tbody>
        </table>
    <?php endif; ?>  

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

<?php /* 
s
dg
d
gh
dfh
sdf
hsd
h
s
hsf
gj
fgj
f
gj
sdfh
sdf
jhsd
j
sgjfgh


fgjdfj
t
sdtj
srtj
srtj
srt5j
sr5
jsr
5js
r5j
srtj
srt
js
jsr
tj

s
js
j
s
s
j
 */ ?>