main.phtml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php echo $this->doctype; ?>
  2. <!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
  3. <html class="no-js" lang="en">
  4. <head>
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <meta charset="utf-8">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title><?php echo $this->title; ?></title>
  9. <?php
  10. $this->metas();
  11. $this->styles();
  12. $this->scripts();
  13. ?>
  14. </head>
  15. <body>
  16. <div class="header">
  17. <div class="row">
  18. <div class="small-8 column">
  19. <h1><i class="fa fa-clock-o"></i> TimeTracker</h1>
  20. </div>
  21. <div class="small-3 column text-right">
  22. <h4>
  23. <?php
  24. $auth = Staple_Auth::get();
  25. $user = new userModel($auth->getAuthId());
  26. echo ucfirst($user->getFirstName())." ".ucfirst($user->getLastName());
  27. ?>
  28. </h4>
  29. </div>
  30. </div>
  31. <div class="contain-to-grid">
  32. <nav class="top-bar" data-topbar role="navigation">
  33. <ul class="title-area">
  34. <li class="name">
  35. </li>
  36. <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
  37. <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
  38. </ul>
  39. <section class="top-bar-section">
  40. <!-- Right Nav Section -->
  41. <ul class="left">
  42. <li><a href="<?php echo $this->link(array('index')) ?>"><i class="fa fa-dashboard"></i> Dashboard</a></li>
  43. <li><a href="<?php echo $this->link(array('timesheet')) ?>"><i class="fa fa-clock-o"></i> Timesheet</a></li>
  44. <?php
  45. //Supervisor Accounts
  46. if($user->getAuthLevel() >= 500)
  47. {
  48. echo "
  49. <li><a href=\"".$this->link(array('reports')) ."\"><i class=\"fa fa-file\"></i> Reports</a></li>
  50. ";
  51. }
  52. //Administrative Accounts
  53. if($user->getAuthLevel() >= 900)
  54. {
  55. echo "
  56. <li><a href=\"".$this->link(array('accounts')) ."\"><i class=\"fa fa-users\"></i> Accounts</a></li>
  57. ";
  58. }
  59. ?>
  60. </ul>
  61. <!-- Right Nav Section -->
  62. <ul class="right">
  63. <li><a href="<?php echo $this->link(array('account','logout')) ?>"><i class="fa fa-close"></i> Logout</a></li>
  64. </ul>
  65. </section>
  66. </nav>
  67. </div>
  68. </div>
  69. <?php $this->content(); ?>
  70. <script>
  71. $(document).foundation();
  72. $(document).ready(function() {
  73. var delay = 300000;
  74. setTimeout(function(){window.location = "<?php echo $this->link(array('account','logout')) ?>"; }, delay);
  75. });
  76. </script>
  77. </body>
  78. </html>