featurebar.html.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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(common::hasPriv('user', 'todocalendar'))
  11. {
  12. $link = $this->createLink('user', 'todocalendar', "userID={$user->id}");
  13. }
  14. elseif(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. if($config->URAndSR)
  36. {
  37. $label = "<span class='text'>{$lang->URCommon}</span>";
  38. $active = ($methodName == 'story' and $storyType == 'requirement') ? ' btn-active-text' : '';
  39. common::printLink('user', 'story', "userID={$user->id}&storyType=requirement", $label, '', "class='btn btn-link $active URTab'");
  40. }
  41. $label = "<span class='text'>{$lang->SRCommon}</span>";
  42. $active = ($methodName == 'story' and $storyType == 'story') ? ' btn-active-text' : '';
  43. common::printLink('user', 'story', "userID={$user->id}&storyType=story", $label, '', "class='btn btn-link $active SRTab'");
  44. $label = "<span class='text'>{$lang->user->bug}</span>";
  45. $active = $methodName == 'bug' ? ' btn-active-text' : '';
  46. common::printLink('user', 'bug', "userID={$user->id}", $label, '', "class='btn btn-link $active bugTab'");
  47. $label = "<span class='text'>{$lang->user->testTask}</span>";
  48. $active = $methodName == 'testtask' ? ' btn-active-text' : '';
  49. common::printLink('user', 'testtask', "userID={$user->id}", $label, '', "class='btn btn-link $active testtaskTab'");
  50. $label = "<span class='text'>{$lang->user->testCase}</span>";
  51. $active = $methodName == 'testcase' ? ' btn-active-text' : '';
  52. common::printLink('user', 'testcase', "userID={$user->id}", $label, '', "class='btn btn-link $active testcaseTab'");
  53. $label = "<span class='text'>{$lang->user->execution}</span>";
  54. $active = $methodName == 'execution' ? ' btn-active-text' : '';
  55. common::printLink('user', 'execution', "userID={$user->id}", $label, '', "class='btn btn-link $active executionTab'");
  56. if($this->config->edition == 'max' or $this->config->edition == 'ipd')
  57. {
  58. if(helper::hasFeature('issue'))
  59. {
  60. $label = "<span class='text'>{$lang->user->issue}</span>";
  61. $active = ($methodName == 'issue' or $methodName == 'issue')? ' btn-active-text' : '';
  62. common::printLink('user', 'issue', "userID={$user->id}", $label, '', "class='btn btn-link $active issueTab'");
  63. }
  64. if(helper::hasFeature('risk'))
  65. {
  66. $label = "<span class='text'>{$lang->user->risk}</span>";
  67. $active = ($methodName == 'risk' or $methodName == 'risk')? ' btn-active-text' : '';
  68. common::printLink('user', 'risk', "userID={$user->id}", $label, '', "class='btn btn-link $active riskTab'");
  69. }
  70. }
  71. $label = "<span class='text'>{$lang->user->dynamic}</span>";
  72. $active = $methodName == 'dynamic' ? ' btn-active-text' : '';
  73. common::printLink('user', 'dynamic', "userID={$user->id}&type=today", $label, '', "class='btn btn-link $active dynamicTab'");
  74. $label = "<span class='text'>{$lang->user->profile}</span>";
  75. $active = $methodName == 'profile' ? ' btn-active-text' : '';
  76. common::printLink('user', 'profile', "userID={$user->id}", $label, '', "class='btn btn-link $active profileTab'");
  77. ?>
  78. </div>
  79. <div class='actions'></div>
  80. </div>
  81. <script>
  82. var type = '<?php echo $type;?>';
  83. var period = '<?php echo $period;?>';
  84. </script>