<?php echo $this->insertTimeForm ?>
<div class="section">
    <div class="row">
        <div class="small-12 medium-4 text-left columns">
            <h3><i class="fa fa-calendar"></i> <?php echo $this->timesheet->currentMonthText ?> <a href="#" data-reveal-id="yearForm"><?php echo $this->timesheet->currentYear ?></a></h3>
        </div>
        <div class="small-12 medium-8 text-right columns">
            <ul class="button-group radius even-4 stack-for-small">
                <li><a class="button secondary" href="<?php echo $this->link(array('timesheet',$this->timesheet->currentYear,$this->timesheet->previousMonth)) ?>"><i class="fa fa-caret-left"></i> Prev.</a></li>
                <li><a class="button secondary" href="<?php echo $this->link(array('timesheet',$this->timesheet->currentYear,$this->timesheet->nextMonth)) ?>">Next <i class="fa fa-caret-right"></i></a></li>
                <li><a class="button"><i class="fa fa-print"></i> Print</a></li>
                <?php
                    if($this->validateRange)
                    {
                        echo "<li><a class=\"button success\"><i class=\"fa fa-check\"></i> Validate</a></li>";
                    }
                ?>
            </ul>
        </div>
    </div>
<?php
    if(count($this->timesheet->entries) > 0)
    {
        echo "
            <div class=\"row\">
                <div class=\"small-4 medium-2 columns\">
                    <b>Date</b>
                </div>
                <div class=\"small-4 medium-2 columns\">
                    <b>Time In</b> <small>(Adjusted)</small>
                </div>
                <div class=\"small-4 medium-2 columns\">
                    <b>Time Out</b> <small>(Adjusted)</small>
                </div>
                <div class=\"small-4 medium-2 columns\">
                    <b>Less Time</b>
                </div>
                <div class=\"small-4 medium-2 columns\">
                    <b>Time Worked</b>
                </div>
                <div class=\"small-4 medium-2 columns\">
                    <b>Time Code</b>
                </div>
                <hr>
            </div>
        ";

        foreach($this->timesheet->entries as $entry)
        {
            echo "
            <div class=\"row\">
                <div class=\"small-4 medium-2 columns\">
                    <a href=\"".$this->link(array('timesheet','edit',$entry->id))."\" class=\"button secondary radius expand\">".$entry->date."</a>
                </div>
                <div class=\"small-4 medium-2 columns\">
                    <span data-tooltip aria-haspopup=\"true\" class=\"has-tip\" title=\"Entered as: ".$entry->inTime."\">".$entry->roundedInTime."</span>
                </div>
                <div class=\"small-4 medium-2 columns\">
                    <span data-tooltip aria-haspopup=\"true\" class=\"has-tip\" title=\"Entered as: ".$entry->outTime."\">".$entry->roundedOutTime."</span>
                </div>
                <div class=\"small-4 medium-2 columns\">
                    ".$entry->lessTime." <small>Min.</small>
                </div>
                <div class=\"small-4 medium-2 columns\">
                    <b>".$entry->timeWorked."</b> <small>Hours</small>
                </div>
                <div class=\"small-4 medium-2 columns\">
                    ".$entry->codeName."
                </div>
                <hr>
            </div>
            ";
        }
    }
    else
    {
        echo "
            <div class=\"row\">
                <div class=\"small-12 columns text-center\">
                    No time submitted.
                </div>
            </div>
        ";
    }

?>
</div>
<div class="section">
    <div class="row">
        <div class="small-4 text-center columns">
            <h5><b>Total Hours Submitted:</b> <?php echo $this->timesheet->normalWorked ?></h5>
        </div>
        <div class="small-4 text-center columns">
            <h5><b>Vacation Used:</b> <?php echo $this->timesheet->vacationUsed ?></h5>
        </div>
        <div class="small-4 text-center columns">
            <h5><b>Sick Time Used:</b> <?php echo $this->timesheet->sickUsed ?></h5>
        </div>
    </div>
</div>
<div id="yearForm" class="reveal-modal small text-center" data-reveal aria-labelledby="Change Year" aria-hidden="true" role="dialog">
    <h2 id="modalTitle">Select a Year</h2>
    <?php echo $this->changeYearForm ?>
    <a class="close-reveal-modal" aria-label="Close">&#215;</a>
</div>