123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <?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-5 stack-for-small">
- <li><a class="button small 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 small 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 small toggleTotals" href="#"><i class="fa fa-calculator"></i> Totals</a></li>
- <li><a class="button small" href="#"><i class="fa fa-print"></i> Print</a></li>
- <li><a class="button small success" href="<?php echo $this->link(array('timesheet','validate',$this->timesheet->currentYear,$this->timesheet->currentMonth))?>"><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=\"\">".$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." Min.
- </div>
- <div class=\"small-4 medium-2 columns\">
- <b>".$entry->timeWorked."</b> Hours
- </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 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">×</a>
- </div>
- <div id="totals" class="totalsPanel">
- <div class="row">
- <div class="small-10 columns">
- <h3 id="modalTitle"><i class="fa fa-calculator"></i> Totals for this month</h3>
- </div>
- <div class="small-2 columns text-right">
- <a class="button secondary small radius toggleTotals" href="#"><i class="fa fa-chevron-up"></i></a>
- </div>
- </div>
- <div class="row">
- <div class="small-6 medium-4 large-3 columns totals">
- <b>Total hours: </b> <?php echo $this->timesheet->normalWorked ?>
- </div>
- <div class="small-6 medium-4 large-3 columns totals">
- <b>Vacation used: </b> <?php echo $this->timesheet->vacationUsed ?>
- </div>
- <div class="small-6 medium-4 large-3 columns totals end">
- <b>Sick used: </b> <?php echo $this->timesheet->sickUsed ?>
- </div>
- </div>
- </div>
- <script>
- $(function() {
- $(".toggleTotals").click(function() {
- if($("#totals").is(":visible"))
- {
- $('#entryForm').slideDown();
- }
- else
- {
- $('#entryForm').slideUp();
- }
- $("#totals").slideToggle();
- });
- });
- </script>
|