weekly.phtml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <div class="section">
  2. <div class="row">
  3. <div class="small-12 columns">
  4. <h2><i class="fa fa-file"></i> Weekly Breakdown Report</h2>
  5. </div>
  6. </div>
  7. <div class="row">
  8. <div class="small-12 columns">
  9. <?php
  10. echo $this->form;
  11. echo "<h3>".$this->account['firstName']." ".$this->account['lastName']."</h3>";
  12. if(count($this->report) > 0)
  13. {
  14. echo "
  15. <table width=\"100%\">
  16. <thead>
  17. <tr>
  18. <th width='50%'>Week</th>
  19. <th width='50%'>Hours Worked</th>
  20. </tr>
  21. </thead>
  22. <tbody>
  23. ";
  24. $i = 0;
  25. foreach($this->report as $entry)
  26. {
  27. if($entry['hoursWorked'] !== null)
  28. {
  29. echo "
  30. <tr>
  31. <td>
  32. <b>Week:</b> ".$entry['week']." <br>
  33. <b>Start:</b> ".$entry['start']['dayName'].", ".$entry['start']['month']." ".$entry['start']['day']." ".$entry['start']['year']." <br>
  34. <b>End:</b> ".$entry['end']['dayName'].", ".$entry['end']['month']." ".$entry['end']['day']." ".$entry['end']['year']."
  35. </td>
  36. <td>".$entry['hoursWorked']."</td>
  37. </tr>
  38. ";
  39. $i++;
  40. }
  41. }
  42. if($i == 0)
  43. {
  44. echo "
  45. <tr>
  46. <td colspan='2'>
  47. <div class='text-center'>User hasn't submitted any time entries for ".$this->year.".</div>
  48. </td>
  49. </tr>
  50. ";
  51. }
  52. echo "
  53. </tbody>
  54. </table>
  55. ";
  56. }
  57. ?>
  58. </div>
  59. </div>
  60. </div>