main.phtml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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-7 column">
  19. <h1><i class="fa fa-clock-o"></i> TimeTracker</h1>
  20. </div>
  21. <div class="small-4 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 hide-for-print">
  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> Timesheet Reports</a></li>
  50. ";
  51. }
  52. ?>
  53. </ul>
  54. <!-- Right Nav Section -->
  55. <ul class="right">
  56. <?php
  57. //Administrative Accounts
  58. if($user->getAuthLevel() >= 900)
  59. {
  60. echo "
  61. <li class=\"has-dropdown\">
  62. <a href=\"#\">Admin Tools</a>
  63. <ul class=\"dropdown\">
  64. <li><a href=\"".$this->link(array('accounts')) ."\"><i class=\"fa fa-users\"></i> Accounts</a></li>
  65. <li><a href=\"".$this->link(array('timesheet','admininsert'))."\" ><i class=\"fa fa-plus\" ></i > Admin Time Insert </a ></li >
  66. <li><a href=\"".$this->link(array('audit')) ."\" ><i class=\"fa fa-list-alt\" ></i > Audit Log</a ></li>
  67. <li><a href=\"".$this->link(array('reports','unlock'))."\"><i class=\"fa fa-unlock\"></i> Time Unlock</a></li>
  68. </ul>
  69. </li>
  70. ";
  71. }
  72. ?>
  73. <li><a href="<?php echo $this->link(array('account','logout')) ?>"><i class="fa fa-close"></i> Logout</a></li>
  74. </ul>
  75. </section>
  76. </nav>
  77. </div>
  78. </div>
  79. <?php $this->content(); ?>
  80. <script>
  81. $(document).foundation();
  82. $(document).ready(function() {
  83. var delay = 300000;
  84. setTimeout(function(){window.location = "<?php echo $this->link(array('account','logout')) ?>"; }, delay);
  85. });
  86. </script>
  87. </body>
  88. </html>