<?php
    if(count($this->messages) > 0)
    {
        echo "
            <div class=\"section message\">
                <div class=\"row\">
                    <div class=\"small-12 columns\">";
                        foreach($this->messages as $message)
                        {
                            echo "<p>".$message."</p>";
                        }
                        echo "
                    </div>
                </div>
            </div>
        ";
    }
?>

<div class="section">
    <div class="row">
        <div class="small-6 columns">
            <div class="panel info">
            <?php
            echo "
                <div class=\"row\">
                    <div class='small-12 columns'>
                        <h2>Time submitted this week</h2>
                    </div>
                    <div class='small-12 columns text-center'>
                        <p>".$this->week['start']['month']." ".$this->week['start']['day']." ".$this->week['year']." to ".$this->week['end']['month']." ".$this->week['end']['day']." ".$this->week['year']."</p>
                    </div>
                    <div class='small-12 columns text-center'>
                        <h2>".$this->week['total']."</h2>
                    </div>
                    ";
            echo "</div>";
            ?>
            </div>
        </div>
        <div class="small-6 columns">
            <div class="panel">
            <h2><?php echo $this->month." ".$this->year ?> <small> Hours Breakout</small></h2>

            <?php

             foreach($this->timesheet->totals as $key=>$value)
             {
                 if($value > 0)
                 {
                     echo "
                    <div class='row'>
                        <div class='small-6 columns'>
                            <h4>$key</h4>
                        </div>
                        <div class='small-6 columns'>
                            <h4>$value</>
                        </div>
                    </div>
                ";
                 }
             }

             if($this->timesheet->totals['Total Time'] == 0)
             {
                 echo "
                    <div class=\"row\">
                        <div class=\"small-12 columns text-center\">
                            <h4 class='subheader'>No time submitted</h4>
                        </div>
                    </div>
                ";
             }
             ?>
            </div>
        </div>
        <div class='small-12 columns text-center'>
            <a class='button round' href="<?php echo $this->link(array('timesheet')) ?>"><i class='fa fa-clock-o'></i> Your Time Sheet</a>
        </div>
    </div>
</div>