123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <?php echo $this->insertTimeForm ?>
- <div class="section">
- <div class="row">
- <div class="small-6 text-left columns">
- <h2><i class="fa fa-calendar"></i> <?php echo $this->timesheet->currentMonthText ?> <?php echo $this->timesheet->currentYear ?></h2>
- </div>
- <div class="small-6 text-right columns">
- <?php
- if($this->needsValidation)
- {
- echo "<a class=\"button round success\" href=\"".$this->link(array('timesheet','validate',$this->timesheet->currentYear,$this->timesheet->currentMonth))."\"><i class=\"fa fa-check\"></i> Validate</a>";
- }
- ?>
- </div>
- <div class="small-12 text-center columns hide-for-print">
- <ul class="button-group radius even-7">
- <?php
- $year = $this->year;
- if($this->month == 12)
- {
- $year = $this->nextYear;
- }
- if($this->momth == 1)
- {
- $year = $this->previousYear;
- }
- ?>
- <li><a class="button small secondary" href="
- <?php
- switch ($this->month)
- {
- case 01:
- echo $this->link(array('timesheet',$this->previousYear, $this->previousMonth));
- break;
- default:
- echo $this->link(array('timesheet',$this->year, $this->previousMonth));
- }
- ?>
- "><i class="fa fa-caret-left"></i> Previous</a></li>
- <li><a class="button small secondary" href="<?php echo $this->link(array('timesheet',$this->currentYear,$this->currentMonth))?>"><i class="fa fa-flag"></i> Current</a></li>
- <li><a class="button small secondary" href="
- <?php
- switch ($this->month)
- {
- case 12:
- echo $this->link(array('timesheet',$this->nextYear, $this->nextMonth));
- break;
- default:
- echo $this->link(array('timesheet',$this->year, $this->nextMonth));
- }
- ?>
- ">Next <i class="fa fa-caret-right"></i></a></li>
- <li><a class="button small secondary" id="hideAll" href="#"><i class="fa fa-eye-slash"></i> Hide All</a></li>
- <li><a class="button small secondary" id="showAll" href="#"><i class="fa fa-eye"></i> Show All</a></li>
- <li><a class="button small toggleTotals" href="#"><i class="fa fa-calculator"></i> Totals</a></li>
- <li><a class="button small" target="_blank" href="<?php echo $this->link(array('timesheet','printpreview',$this->timesheet->userId,$this->timesheet->currentYear,$this->timesheet->currentMonth)) ?>"><i class="fa fa-print"></i> Print</a></li>
- </ul>
- </div>
- </div><!-- end row -->
- <?php
- if(count($this->timesheet->entries) > 0)
- {
- echo "
- <div class=\"row\" style=\"padding-top:20px; padding-bottom:10px; background-color:#ccc;\">
- <div class=\"small-4 medium-2 columns\">
- <b>Status</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>Total</b>
- </div>
- <div class=\"small-4 medium-2 columns\">
- <b>Code</b>
- </div>
- </div><!-- end row -->
- ";
- $date = 0;
- foreach($this->timesheet->entries as $entry)
- {
- if($date != $entry->date)
- {
- if($this->timesheet->getBatch() != $entry->batchId)
- {
- echo "
- <div class=\"row marker\" style=\"border-bottom:1px #ccc solid; background-color:#eaeaea; padding-top:15px; padding-bottom:15px;\"> \n
- <div class=\"small-12 columns timeTitle\" >
- <b>".$entry->fullDate."</b><i class=\"right fa fa-chevron-up\"></i>\n
- </div>
- </div> <!-- end row --> \n
- ";
- }
- else
- {
- echo "
- <div class=\"row marker\" style=\"border-bottom:1px #ccc solid; background-color:#FFF4A8; padding-top:15px; padding-bottom:15px;\"> \n
- <div class=\"small-12 columns timeTitle\" >
- <b>".$entry->fullDate."</b><i class=\"right fa fa-chevron-up\"></i>\n
- </div>
- </div> <!-- end row --> \n
- ";
- }
- }
- echo "
- <div class=\"row\" style=\"padding-top:5px;\"> \n
- <div class=\"small-4 medium-2 columns\"> \n";
- if($entry->batchId == "ADMIN ADD")
- {
- echo "<i class=\"fa fa-warning\"></i> Admin. Add";
- }
- else
- {
- if($this->timesheet->getBatch() == $entry->batchId)
- {
- echo "<a class=\"\" style=\"margin:0px; width:100%; left:-15px;\" href=\"".$this->link(array('timesheet','edit',$entry->id))."\"><i class=\"fa fa-edit\"></i> Edit Entry</a> \n";
- }
- else
- {
- echo "<i class=\"fa fa-lock\"></i> Validated \n";
- }
- }
- echo "
- </div> \n
- <div class=\"small-4 medium-2 columns\"> \n
- <span data-tooltip aria-haspopup=\"true\" class=\"has-tip\" title=\"Entered as: ".$entry->inTime."\">".$entry->roundedInTime."</span> \n
- </div> \n
- <div class=\"small-4 medium-2 columns\"> \n
- <span data-tooltip aria-haspopup=\"true\" class=\"has-tip\" title=\"Entered as: ".$entry->outTime."\">".$entry->roundedOutTime."</span> \n
- </div> \n
- <div class=\"small-4 medium-2 columns\"> \n
- ".$entry->lessTime." Min. \n
- </div> \n
- <div class=\"small-4 medium-2 columns\"> \n
- ".$entry->timeWorked." Hours \n
- </div> \n
- <div class=\"small-4 medium-2 columns\"> \n
- ".$entry->codeName." \n
- </div> \n
- </div>
- <div class=\"row\" style='border-bottom:1px #a7a7a7 solid; '>
- <div class=\"small-12 medium-10 medium-push-2 columns\"> \n
- ".$entry->note."
- </div> \n
- </div> <!-- end row --> \n
- ";
- $date = $entry->date;
- }
- }
- else
- {
- echo "
- <div class=\"row\">
- <div class=\"small-12 columns text-center\">
- No time submitted.
- </div>
- </div><!-- end row -->
- ";
- }
- ?>
- </div><!-- end section -->
- <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 small radius toggleTotals" href="#"><i class="fa fa-chevron-up"></i></a>
- </div>
- </div> <!-- end row -->
- <div class="row">
- <?php
- foreach($this->timesheet->totals as $key=>$value)
- {
- if($value != '0')
- {
- echo "
- <div class=\"small-6 medium-4 columns totals end\">
- ".$key.": ".$value."
- </div>
- ";
- }
- }
- ?>
- </div>
- </div>
- <script>
- $(function() {
- $(".toggleTotals").click(function() {
- if($("#totals").is(":visible"))
- {
- $('#entryForm').slideDown();
- }
- else
- {
- $('#entryForm').slideUp();
- }
- $("#totals").slideToggle();
- });
- $(".timeTitle").click(function() {
- $(this).parent().nextUntil(".marker").slideToggle("slow");
- $(this).find("i").toggleClass("fa-chevron-up fa-chevron-down")
- return false;
- });
- $("#hideAll").click(function() {
- $(".marker").nextUntil(".marker").slideUp();
- $(".marker").find("i").removeClass("fa-chevron-up")
- $(".marker").find("i").addClass("fa-chevron-down")
- return false;
- });
- $("#showAll").click(function() {
- $(".marker").nextUntil(".marker").slideDown();
- $(".marker").find("i").removeClass("fa-chevron-down")
- $(".marker").find("i").addClass("fa-chevron-up")
- return false;
- });
- });
- </script>
|