main.phtml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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> Open Time Tracker</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">
  32. <nav class="top-bar hide-for-print" 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> Your Dashboard</a></li>
  43. <li><a href="<?php echo $this->link(array('timesheet')) ?>"><i class="fa fa-clock-o"></i> Your Time Sheet</a></li>
  44. </ul>
  45. <!-- Right Nav Section -->
  46. <ul class="right">
  47. <?php
  48. //Administrative Accounts
  49. if($user->getAuthLevel() >= 900)
  50. {
  51. echo "
  52. <li><a href=\"".$this->link(array('accounts')) ."\"><i class=\"fa fa-users\"></i> Accounts</a></li>
  53. <li class=\"has-dropdown\">
  54. <a href=\"#\"><i class='fa fa-file'></i> Reports</a>
  55. <ul class=\"dropdown\">
  56. <li><a href=\"".$this->link(array('reports','payroll'))."\"><i class=\"fa fa-file\"></i> Month Totals</a></li>
  57. <li><a href=\"".$this->link(array('reports','payperiod'))."\"><i class=\"fa fa-file\"></i> Daily Totals</a></li>
  58. <li><a href=\"".$this->link(array('audit')) ."\" ><i class=\"fa fa-list-alt\" ></i > Audit Log</a ></li>
  59. </ul>
  60. </li>
  61. <li class=\"has-dropdown\">
  62. <a href=\"#\"><i class='fa fa-gear'></i> Tools</a>
  63. <ul class=\"dropdown\">
  64. <li><a href=\"".$this->link(array('timesheet','admininsert'))."\" ><i class=\"fa fa-plus\" ></i > Time Insert </a ></li >
  65. <li><a href=\"".$this->link(array('reports','unlock'))."\"><i class=\"fa fa-unlock\"></i> Time Unlock</a></li>
  66. </ul>
  67. </li>
  68. ";
  69. }
  70. ?>
  71. <?php
  72. //Supervisor Accounts
  73. if($user->getAuthLevel() >= 500)
  74. {
  75. echo "
  76. <li class=\"has-dropdown\">
  77. <a href=\"#\"><i class='fa fa-file'></i> Time Sheets</a>
  78. <ul class=\"dropdown\">
  79. <li><a href=\"".$this->link(array('reports')) ."\"><i class=\"fa fa-user\"></i> Active Accounts</a></li>
  80. <li><a href=\"".$this->link(array('reports','inactive'))."\" ><i class=\"fa fa-user\" ></i > Inactive Accounts</a ></li>
  81. </ul>
  82. </li>
  83. ";
  84. }
  85. if($user->getAuthLevel() >= 900)
  86. {
  87. echo "<li><a href=\"".$this->link(array('messages','index'))."\" ><i class=\"fa fa-envelope\" ></i > Messaging </a ></li>";
  88. }
  89. elseif($user->getAuthLevel() >= 500)
  90. {
  91. echo "<li><a href=\"".$this->link(array('messages','account'))."\" ><i class=\"fa fa-envelope\" ></i > Messaging </a ></li>";
  92. }
  93. ?>
  94. <li><a href="<?php echo $this->link(array('account','logout')) ?>"><i class="fa fa-close"></i> Logout</a></li>
  95. </ul>
  96. </section>
  97. </nav>
  98. </div>
  99. </div>
  100. <?php $this->content(); ?>
  101. <script>
  102. $(document).foundation();
  103. var delay = 600000; //10 Minutes
  104. $(document).ready(function() {
  105. setTimeout(function(){window.location = "<?php echo $this->link(array('account','logout')) ?>"; }, delay);
  106. });
  107. </script>
  108. </body>
  109. </html>