featurebar.html.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <div id="mainMenu" class="clearfix">
  2. <div class="btn-toolbar pull-left">
  3. <?php
  4. if(!isset($type)) $type = 'today';
  5. if(!isset($period)) $period = 'today';
  6. $date = isset($date) ? $date : helper::today();
  7. echo "<div class='input-control w-120px'>" . $userList . "</div>";
  8. $methodName = $this->app->getMethodName();
  9. $label = "<span class='text'>{$lang->user->schedule}</span>";
  10. if($this->config->edition != 'open' and common::hasPriv('user', 'todocalendar'))
  11. {
  12. $link = $this->createLink('user', 'todocalendar', "userID={$user->id}");
  13. }
  14. elseif($this->config->edition != 'open' and common::hasPriv('user', 'effortcalendar'))
  15. {
  16. $link = $this->createLink('user', 'effortcalendar', "userID={$user->id}");
  17. }
  18. elseif(common::hasPriv('user', 'todo'))
  19. {
  20. $link = $this->createLink('user', 'todo', "userID={$user->id}");
  21. }
  22. elseif(common::hasPriv('user', 'effort'))
  23. {
  24. $link = $this->createLink('user', 'effort', "userID={$user->id}");
  25. }
  26. if($link)
  27. {
  28. $active = '';
  29. if($methodName == 'todocalendar' or $methodName == 'todo' or $methodName == 'effortcalendar' or $methodName == 'effort') $active = ' btn-active-text';
  30. echo html::a($link, $label, '', "class='btn btn-link $active todoTab'");
  31. }
  32. $label = "<span class='text'>{$lang->user->task}</span>";
  33. $active = $methodName == 'task' ? ' btn-active-text' : '';
  34. common::printLink('user', 'task', "userID={$user->id}", $label, '', "class='btn btn-link $active taskTab'");
  35. $label = "<span class='text'>{$lang->SRCommon}</span>";
  36. $active = ($methodName == 'story' and $storyType == 'story') ? ' btn-active-text' : '';
  37. common::printLink('user', 'story', "userID={$user->id}&storyType=story", $label, '', "class='btn btn-link $active SRTab'");
  38. if($this->config->systemMode == 'ALM')
  39. {
  40. $label = "<span class='text'>{$lang->user->execution}</span>";
  41. $active = $methodName == 'execution' ? ' btn-active-text' : '';
  42. common::printLink('user', 'execution', "userID={$user->id}", $label, '', "class='btn btn-link $active executionTab'");
  43. }
  44. $label = "<span class='text'>{$lang->user->dynamic}</span>";
  45. $active = $methodName == 'dynamic' ? ' btn-active-text' : '';
  46. common::printLink('user', 'dynamic', "userID={$user->id}&type=today", $label, '', "class='btn btn-link $active dynamicTab'");
  47. $label = "<span class='text'>{$lang->user->profile}</span>";
  48. $active = $methodName == 'profile' ? ' btn-active-text' : '';
  49. common::printLink('user', 'profile', "userID={$user->id}", $label, '', "class='btn btn-link $active profileTab'");
  50. ?>
  51. </div>
  52. <div class='actions'></div>
  53. </div>
  54. <script>
  55. var type = '<?php echo $type;?>';
  56. var period = '<?php echo $period;?>';
  57. </script>