team.html.php 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. /**
  3. * The team view file of marketresearch module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Hu Fangzhou
  8. * @package marketresearch
  9. * @version $Id: team.html.php 4143 2023-09-14 11:01:06Z $
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php js::set('confirmUnlinkMember', $lang->marketresearch->confirmUnlinkMember);?>
  15. <?php js::set('noAccess', $lang->user->error->noAccess);?>
  16. <div id='mainMenu' class='clearfix'>
  17. <div class='btn-toolbar pull-left'>
  18. <span class='btn btn-link btn-active-text'>
  19. <span class='text'><?php echo $lang->project->teamMember;?></span>
  20. <span class="label label-light label-badge"><?php echo count($teamMembers);?></span>
  21. </span>
  22. </div>
  23. <div class='btn-toolbar pull-right'>
  24. <?php
  25. common::printBack($this->session->marketresearchList, 'btn btn-link');
  26. if(!empty($app->user->admin) or empty($app->user->rights['rights']['my']['limited'])) common::printLink('marketresearch', 'manageMembers', "researchID=$researchID&dept=&copyResearchID=0", "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'");
  27. ?>
  28. </div>
  29. </div>
  30. <div id='mainContent'>
  31. <?php if(empty($teamMembers)):?>
  32. <div class="table-empty-tip">
  33. <p>
  34. <span class="text-muted"><?php echo $lang->marketresearch->noMembers;?></span>
  35. <?php if((!empty($app->user->admin) or empty($app->user->rights['rights']['my']['limited'])) && common::hasPriv('marketresearch', 'manageMembers')):?>
  36. <?php echo html::a($this->createLink('marketresearch', 'manageMembers', "researchID=$researchID&dept=&copyResearchID=0"), "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-info'");?>
  37. <?php endif;?>
  38. </p>
  39. </div>
  40. <?php else:?>
  41. <form class='main-table'>
  42. <table class='table' id='memberList'>
  43. <thead>
  44. <tr>
  45. <th><?php echo $lang->team->account;?></th>
  46. <th><?php echo $lang->team->role;?></th>
  47. <th><?php echo $lang->team->join;?></th>
  48. <th><?php echo $lang->team->days;?></th>
  49. <th><?php echo $lang->team->hours;?></th>
  50. <th><?php echo $lang->team->totalHours;?></th>
  51. <th class='c-limited text-center'><?php echo $lang->team->limited;?></th>
  52. <th class='c-actions-1 text-center'><?php echo $lang->actions;?></th>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. <?php $totalHours = 0;?>
  57. <?php foreach($teamMembers as $member):?>
  58. <tr>
  59. <td>
  60. <?php
  61. echo $member->realname;
  62. $memberHours = $member->days * $member->hours;
  63. $totalHours += $memberHours;
  64. ?>
  65. </td>
  66. <td title='<?php echo $member->role;?>'><?php echo $member->role;?></td>
  67. <td><?php echo $member->join;?></td>
  68. <td><?php echo $member->days . $lang->execution->day;?></td>
  69. <td><?php echo $member->hours . $lang->execution->workHour;?></td>
  70. <td><?php echo $memberHours . $lang->execution->workHour;?></td>
  71. <td class="text-center"><?php echo $lang->team->limitedList[$member->limited];?></td>
  72. <td class='c-actions text-center'>
  73. <?php
  74. if (common::hasPriv('marketresearch', 'unlinkMember'))
  75. {
  76. echo html::a("javascript:deleteMemeber($researchID, \"{$member->account}\", \"{$member->userID}\")", '<i class="icon-green-project-unlinkMember icon-unlink"></i>', '', "class='btn' title='{$lang->execution->unlinkMember}'");
  77. }
  78. ?>
  79. </td>
  80. </tr>
  81. <?php endforeach;?>
  82. </tbody>
  83. </table>
  84. <div class='table-footer'>
  85. <div class='table-statistic'><?php echo $lang->team->totalHours . ':' . "<strong>$totalHours{$lang->execution->workHour}" . sprintf($lang->project->teamMembersCount, count($teamMembers)) . "</strong>";?></div>
  86. </div>
  87. </form>
  88. <?php endif;?>
  89. </div>
  90. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>