* Finish task#41217.
This commit is contained in:
@@ -1128,7 +1128,7 @@ class actionModel extends model
|
||||
elseif($action->objectType == 'team')
|
||||
{
|
||||
$action->objectLink = '';
|
||||
if($action->project) $action->objectLink = helper::createLink('project', 'manageMembers', 'projectID=' . $action->project);
|
||||
if($action->project) $action->objectLink = helper::createLink('project', 'team', 'projectID=' . $action->project);
|
||||
if($action->execution) $action->objectLink = helper::createLink('execution', 'team', 'executionID=' . $action->execution);
|
||||
$action->objectLabel = zget($this->lang->action->objectTypes, $action->objectLabel);
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ $lang->scrum->menu->devops = array('link' => "{$lang->repo->common}|repo|brow
|
||||
$lang->scrum->menu->build = array('link' => "{$lang->build->common}|project|build|project=%s");
|
||||
$lang->scrum->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse|project=%s", 'subModule' => 'projectrelease');
|
||||
$lang->scrum->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s");
|
||||
$lang->scrum->menu->settings = array('link' => "$lang->settings|project|view|project=%s", 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
|
||||
$lang->scrum->menu->settings = array('link' => "$lang->settings|project|view|project=%s", 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist,team');
|
||||
|
||||
$lang->scrum->dividerMenu = ',execution,programplan,doc,settings,';
|
||||
|
||||
@@ -218,7 +218,7 @@ $lang->scrum->menu->qa['subMenu']->testreport = array('link' => "{$lang->testrep
|
||||
$lang->scrum->menu->settings['subMenu'] = new stdclass();
|
||||
$lang->scrum->menu->settings['subMenu']->view = array('link' => "$lang->overview|project|view|project=%s", 'alias' => 'edit');
|
||||
$lang->scrum->menu->settings['subMenu']->products = array('link' => "{$lang->product->common}|project|manageProducts|project=%s", 'alias' => 'manageproducts');
|
||||
$lang->scrum->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|manageMembers|project=%s", 'alias' => 'managemembers');
|
||||
$lang->scrum->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|team|project=%s", 'alias' => 'managemembers,team');
|
||||
$lang->scrum->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel');
|
||||
$lang->scrum->menu->settings['subMenu']->stakeholder = array('link' => "{$lang->stakeholder->common}|stakeholder|browse|project=%s", 'subModule' => 'stakeholder');
|
||||
$lang->scrum->menu->settings['subMenu']->group = array('link' => "{$lang->priv}|project|group|project=%s", 'alias' => 'group,manageview,managepriv');
|
||||
|
||||
@@ -237,6 +237,8 @@ if($config->systemMode == 'new')
|
||||
$lang->resource->project->export = 'export';
|
||||
$lang->resource->project->createGuide = 'createGuide';
|
||||
$lang->resource->project->updateOrder = 'updateOrder';
|
||||
$lang->resource->project->team = 'teamAction';
|
||||
$lang->resource->project->unlinkMember = 'unlinkMember';
|
||||
|
||||
$lang->project->methodOrder[0] = 'index';
|
||||
$lang->project->methodOrder[5] = 'browse';
|
||||
@@ -275,6 +277,8 @@ if($config->systemMode == 'new')
|
||||
$lang->project->methodOrder[170] = 'export';
|
||||
$lang->project->methodOrder[175] = 'createGuide';
|
||||
$lang->project->methodOrder[180] = 'updateOrder';
|
||||
$lang->project->methodOrder[185] = 'team';
|
||||
$lang->project->methodOrder[190] = 'unlinkMember';
|
||||
|
||||
$lang->resource->projectbuild = new stdclass();
|
||||
$lang->resource->projectbuild->browse = 'browse';
|
||||
|
||||
@@ -1106,6 +1106,66 @@ class project extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse team of a project.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function team($projectID = 0)
|
||||
{
|
||||
$this->app->loadLang('execution');
|
||||
$this->project->setMenu($projectID);
|
||||
|
||||
$project = $this->project->getById($projectID);
|
||||
|
||||
$this->view->title = $project->name . $this->lang->colon . $this->lang->project->team;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->teamMembers = $this->project->getTeamMembers($projectID);
|
||||
$this->view->deptUsers = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid');
|
||||
$this->view->canBeChanged = common::canModify('project', $project);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink a memeber.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $userID
|
||||
* @param string $confirm yes|no
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkMember($projectID, $userID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no') die(js::confirm($this->lang->project->confirmUnlinkMember, $this->inlink('unlinkMember', "projectID=$projectID&userID=$userID&confirm=yes")));
|
||||
|
||||
$user = $this->loadModel('user')->getById($userID, 'id');
|
||||
$account = $user->account;
|
||||
|
||||
$this->project->unlinkMember($projectID, $account);
|
||||
if(!dao::isError()) $this->loadModel('action')->create('team', $projectID, 'managedTeam');
|
||||
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
{
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
die(js::locate($this->inlink('team', "projectID=$projectID"), 'parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage project members.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
function checkUserDept(userID)
|
||||
{
|
||||
alert(noAccess);
|
||||
}
|
||||
+18
-15
@@ -52,6 +52,7 @@ $lang->project->unlinkedProducts = "Unlinked {$lang->productCommon}s";
|
||||
$lang->project->testreport = 'Test Report';
|
||||
$lang->project->selectProgram = 'Program filtering';
|
||||
$lang->project->teamMember = 'Team Member';
|
||||
$lang->project->unlinkMember = 'Remove Member';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = 'Project';
|
||||
@@ -77,6 +78,7 @@ $lang->project->closedDate = 'ClosedDate';
|
||||
$lang->project->canceledBy = 'CanceledBy';
|
||||
$lang->project->canceledDate = 'CanceledDate';
|
||||
$lang->project->team = 'Team';
|
||||
$lang->project->teamAction = 'Team List';
|
||||
$lang->project->order = 'Rank';
|
||||
$lang->project->budget = 'Budget';
|
||||
$lang->project->budgetUnit = 'Budget Unit';
|
||||
@@ -231,18 +233,19 @@ $lang->project->programTitle['0'] = 'Hidden';
|
||||
$lang->project->programTitle['base'] = 'Base-level project only';
|
||||
$lang->project->programTitle['end'] = 'End-level project only';
|
||||
|
||||
$lang->project->accessDenied = 'Access denied to this project';
|
||||
$lang->project->chooseProgramType = 'Select management type';
|
||||
$lang->project->scrumTitle = 'Agile Development Management';
|
||||
$lang->project->cannotCreateChild = 'The project has contents, so you cannot add a child project. You can create a parent project for this one and then add a child project for the parent project.';
|
||||
$lang->project->hasChildren = 'This project has a child project, so it cannot be deleted.';
|
||||
$lang->project->confirmDelete = 'Do you want to delete this project?';
|
||||
$lang->project->cannotChangeToCat = "The project has contents, so you cannot it to a parent project.";
|
||||
$lang->project->cannotCancelCat = "There are child projects of this project. You cannot cancel the parent project mark.";
|
||||
$lang->project->parentBeginEnd = "The begin and end date of the parent project: %s ~ %s";
|
||||
$lang->project->parentBudget = "The budget of the parent project: ";
|
||||
$lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project.";
|
||||
$lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project.";
|
||||
$lang->project->beginGreateChild = "The minimum start date of the project set: %s. The start date of the project cannot be less than the minimum start date of the project set.";
|
||||
$lang->project->endLetterChild = "The maximum finish date for the project set: %s. The completion date of a project cannot be greater than the maximum completion date of the project set.";
|
||||
$lang->project->childLongTime = "There are long-term projects in the child project, and the parent project should also be a long-term project.";
|
||||
$lang->project->accessDenied = 'Access denied to this project';
|
||||
$lang->project->chooseProgramType = 'Select management type';
|
||||
$lang->project->scrumTitle = 'Agile Development Management';
|
||||
$lang->project->cannotCreateChild = 'The project has contents, so you cannot add a child project. You can create a parent project for this one and then add a child project for the parent project.';
|
||||
$lang->project->hasChildren = 'This project has a child project, so it cannot be deleted.';
|
||||
$lang->project->confirmDelete = 'Do you want to delete this project?';
|
||||
$lang->project->cannotChangeToCat = "The project has contents, so you cannot it to a parent project.";
|
||||
$lang->project->cannotCancelCat = "There are child projects of this project. You cannot cancel the parent project mark.";
|
||||
$lang->project->parentBeginEnd = "The begin and end date of the parent project: %s ~ %s";
|
||||
$lang->project->parentBudget = "The budget of the parent project: ";
|
||||
$lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project.";
|
||||
$lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project.";
|
||||
$lang->project->beginGreateChild = "The minimum start date of the project set: %s. The start date of the project cannot be less than the minimum start date of the project set.";
|
||||
$lang->project->endLetterChild = "The maximum finish date for the project set: %s. The completion date of a project cannot be greater than the maximum completion date of the project set.";
|
||||
$lang->project->childLongTime = "There are long-term projects in the child project, and the parent project should also be a long-term project.";
|
||||
$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?";
|
||||
|
||||
@@ -22,7 +22,7 @@ $lang->project->editGroup = '项目编辑分组';
|
||||
$lang->project->copyGroup = '项目复制分组';
|
||||
$lang->project->manageView = '项目维护视野';
|
||||
$lang->project->managePriv = '项目维护权限';
|
||||
$lang->project->manageMembers = '项目团队';
|
||||
$lang->project->manageMembers = '团队管理';
|
||||
$lang->project->export = '导出';
|
||||
$lang->project->addProduct = '新建产品';
|
||||
$lang->project->manageGroupMember = '维护分组用户';
|
||||
@@ -52,6 +52,7 @@ $lang->project->unlinkedProducts = '未关联';
|
||||
$lang->project->testreport = '测试报告';
|
||||
$lang->project->selectProgram = '项目集筛选';
|
||||
$lang->project->teamMember = '团队成员';
|
||||
$lang->project->unlinkMember = '移除成员';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = '项目';
|
||||
@@ -77,6 +78,7 @@ $lang->project->closedDate = '关闭日期';
|
||||
$lang->project->canceledBy = '由谁取消';
|
||||
$lang->project->canceledDate = '取消日期';
|
||||
$lang->project->team = '团队';
|
||||
$lang->project->teamAction = '团队列表';
|
||||
$lang->project->order = '排序';
|
||||
$lang->project->budget = '预算';
|
||||
$lang->project->budgetUnit = '预算单位';
|
||||
@@ -231,18 +233,19 @@ $lang->project->programTitle['0'] = '不显示';
|
||||
$lang->project->programTitle['base'] = '只显示一级项目集';
|
||||
$lang->project->programTitle['end'] = '只显示最后一级项目集';
|
||||
|
||||
$lang->project->accessDenied = '您无权访问该项目!';
|
||||
$lang->project->chooseProgramType = '选择项目管理方式';
|
||||
$lang->project->scrumTitle = '敏捷开发全流程项目管理';
|
||||
$lang->project->cannotCreateChild = '该项目已经有实际的内容,无法直接添加子项目。您可以为当前项目创建一个父项目,然后在新的父项目下面添加子项目。';
|
||||
$lang->project->hasChildren = '该项目有子项目存在,不能删除。';
|
||||
$lang->project->confirmDelete = "您确定删除项目[%s]吗?";
|
||||
$lang->project->cannotChangeToCat = "该项目已经有实际的内容,无法修改为父项目";
|
||||
$lang->project->cannotCancelCat = "该项目下已经有子项目,无法取消父项目标记";
|
||||
$lang->project->parentBeginEnd = "父项目起止时间:%s ~ %s";
|
||||
$lang->project->parentBudget = "父项目预算:";
|
||||
$lang->project->beginLetterParent = "父项目的开始日期:%s,开始日期不能小于父项目的开始日期";
|
||||
$lang->project->endGreaterParent = "父项目的完成日期:%s,完成日期不能大于父项目的完成日期";
|
||||
$lang->project->beginGreateChild = "项目集的最小开始日期:%s,项目的开始日期不能小于项目集的最小开始日期";
|
||||
$lang->project->endLetterChild = "项目集的最大完成日期:%s,项目的完成日期不能大于项目集的最大完成日期";
|
||||
$lang->project->childLongTime = "子项目中有长期项目,父项目也应该是长期项目";
|
||||
$lang->project->accessDenied = '您无权访问该项目!';
|
||||
$lang->project->chooseProgramType = '选择项目管理方式';
|
||||
$lang->project->scrumTitle = '敏捷开发全流程项目管理';
|
||||
$lang->project->cannotCreateChild = '该项目已经有实际的内容,无法直接添加子项目。您可以为当前项目创建一个父项目,然后在新的父项目下面添加子项目。';
|
||||
$lang->project->hasChildren = '该项目有子项目存在,不能删除。';
|
||||
$lang->project->confirmDelete = "您确定删除项目[%s]吗?";
|
||||
$lang->project->cannotChangeToCat = "该项目已经有实际的内容,无法修改为父项目";
|
||||
$lang->project->cannotCancelCat = "该项目下已经有子项目,无法取消父项目标记";
|
||||
$lang->project->parentBeginEnd = "父项目起止时间:%s ~ %s";
|
||||
$lang->project->parentBudget = "父项目预算:";
|
||||
$lang->project->beginLetterParent = "父项目的开始日期:%s,开始日期不能小于父项目的开始日期";
|
||||
$lang->project->endGreaterParent = "父项目的完成日期:%s,完成日期不能大于父项目的完成日期";
|
||||
$lang->project->beginGreateChild = "项目集的最小开始日期:%s,项目的开始日期不能小于项目集的最小开始日期";
|
||||
$lang->project->endLetterChild = "项目集的最大完成日期:%s,项目的完成日期不能大于项目集的最大完成日期";
|
||||
$lang->project->childLongTime = "子项目中有长期项目,父项目也应该是长期项目";
|
||||
$lang->project->confirmUnlinkMember = "您确定从该项目中移除该用户吗?";
|
||||
|
||||
@@ -22,7 +22,7 @@ $lang->project->editGroup = '項目編輯分組';
|
||||
$lang->project->copyGroup = '項目複製分組';
|
||||
$lang->project->manageView = '項目維護視野';
|
||||
$lang->project->managePriv = '項目維護權限';
|
||||
$lang->project->manageMembers = '項目團隊';
|
||||
$lang->project->manageMembers = '團隊管理';
|
||||
$lang->project->export = '導出';
|
||||
$lang->project->addProduct = '新建產品';
|
||||
$lang->project->manageGroupMember = '維護分組用戶';
|
||||
@@ -52,6 +52,7 @@ $lang->project->unlinkedProducts = '未關聯';
|
||||
$lang->project->testreport = '測試報告';
|
||||
$lang->project->selectProgram = '項目集篩選';
|
||||
$lang->project->teamMember = '團隊成員';
|
||||
$lang->project->unlinkMember = '移除成員';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = '項目';
|
||||
@@ -77,6 +78,7 @@ $lang->project->closedDate = '關閉日期';
|
||||
$lang->project->canceledBy = '由誰取消';
|
||||
$lang->project->canceledDate = '取消日期';
|
||||
$lang->project->team = '團隊';
|
||||
$lang->project->teamAction = '團隊清單';
|
||||
$lang->project->order = '排序';
|
||||
$lang->project->budget = '預算';
|
||||
$lang->project->budgetUnit = '預算單位';
|
||||
@@ -231,18 +233,19 @@ $lang->project->programTitle['0'] = '不顯示';
|
||||
$lang->project->programTitle['base'] = '只顯示一級項目集';
|
||||
$lang->project->programTitle['end'] = '只顯示最後一級項目集';
|
||||
|
||||
$lang->project->accessDenied = '您無權訪問該項目!';
|
||||
$lang->project->chooseProgramType = '選擇項目管理方式';
|
||||
$lang->project->scrumTitle = '敏捷開發全流程項目管理';
|
||||
$lang->project->cannotCreateChild = '該項目已經有實際的內容,無法直接添加子項目。您可以為當前項目創建一個父項目,然後在新的父項目下面添加子項目。';
|
||||
$lang->project->hasChildren = '該項目有子項目存在,不能刪除。';
|
||||
$lang->project->confirmDelete = "您確定刪除項目[%s]嗎?";
|
||||
$lang->project->cannotChangeToCat = "該項目已經有實際的內容,無法修改為父項目";
|
||||
$lang->project->cannotCancelCat = "該項目下已經有子項目,無法取消父項目標記";
|
||||
$lang->project->parentBeginEnd = "父項目起止時間:%s ~ %s";
|
||||
$lang->project->parentBudget = "父項目預算:";
|
||||
$lang->project->beginLetterParent = "父項目的開始日期:%s,開始日期不能小於父項目的開始日期";
|
||||
$lang->project->endGreaterParent = "父項目的完成日期:%s,完成日期不能大於父項目的完成日期";
|
||||
$lang->project->beginGreateChild = "項目集的最小開始日期:%s,項目的開始日期不能小於項目集的最小開始日期";
|
||||
$lang->project->endLetterChild = "項目集的最大完成日期:%s,項目的完成日期不能大於項目集的最大完成日期";
|
||||
$lang->project->childLongTime = "子項目中有長期項目,父項目也應該是長期項目";
|
||||
$lang->project->accessDenied = '您無權訪問該項目!';
|
||||
$lang->project->chooseProgramType = '選擇項目管理方式';
|
||||
$lang->project->scrumTitle = '敏捷開發全流程項目管理';
|
||||
$lang->project->cannotCreateChild = '該項目已經有實際的內容,無法直接添加子項目。您可以為當前項目創建一個父項目,然後在新的父項目下面添加子項目。';
|
||||
$lang->project->hasChildren = '該項目有子項目存在,不能刪除。';
|
||||
$lang->project->confirmDelete = "您確定刪除項目[%s]嗎?";
|
||||
$lang->project->cannotChangeToCat = "該項目已經有實際的內容,無法修改為父項目";
|
||||
$lang->project->cannotCancelCat = "該項目下已經有子項目,無法取消父項目標記";
|
||||
$lang->project->parentBeginEnd = "父項目起止時間:%s ~ %s";
|
||||
$lang->project->parentBudget = "父項目預算:";
|
||||
$lang->project->beginLetterParent = "父項目的開始日期:%s,開始日期不能小於父項目的開始日期";
|
||||
$lang->project->endGreaterParent = "父項目的完成日期:%s,完成日期不能大於父項目的完成日期";
|
||||
$lang->project->beginGreateChild = "項目集的最小開始日期:%s,項目的開始日期不能小於項目集的最小開始日期";
|
||||
$lang->project->endLetterChild = "項目集的最大完成日期:%s,項目的完成日期不能大於項目集的最大完成日期";
|
||||
$lang->project->childLongTime = "子項目中有長期項目,父項目也應該是長期項目";
|
||||
$lang->project->confirmUnlinkMember = "您確定從該項目中移除該用戶嗎?";
|
||||
|
||||
@@ -1256,6 +1256,25 @@ class projectModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink a member.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkMember($projectID, $account)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_TEAM)->where('root')->eq((int)$projectID)->andWhere('type')->eq('project')->andWhere('account')->eq($account)->exec();
|
||||
|
||||
$this->loadModel('user');
|
||||
$this->user->updateUserView($projectID, 'project', array($account));
|
||||
|
||||
$linkedProducts = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
if(!empty($linkedProducts)) $this->user->updateUserView(array_keys($linkedProducts), 'product', array($account));
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage team members.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/**
|
||||
* The team view file of project module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Qiyu Xie
|
||||
* @package project
|
||||
* @version $Id: team.html.php 4143 2021-08-11 11:01:06Z $
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('confirmUnlinkMember', $lang->project->confirmUnlinkMember)?>
|
||||
<?php js::set('noAccess', $lang->user->error->noAccess)?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->project->teamMember;?></span></span>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
if($canBeChanged)
|
||||
{
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("projectID=$projectID");
|
||||
echo html::a($this->createLink('tutorial', 'wizard', "module=project&method=manageMembers¶ms=$wizardParams"), "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!empty($app->user->admin) or empty($app->user->rights['rights']['my']['limited'])) common::printLink('project', 'manageMembers', "projectID=$projectID", "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent'>
|
||||
<?php if(empty($teamMembers)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->execution->noMembers;?></span>
|
||||
<?php if((!empty($app->user->admin) or empty($app->user->rights['rights']['my']['limited'])) && common::hasPriv('project', 'manageMembers')):?>
|
||||
<?php echo html::a($this->createLink('project', 'manageMembers', "projectID=$projectID"), "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<form class='main-table'>
|
||||
<table class='table' id='memberList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->team->account;?></th>
|
||||
<th><?php echo $lang->team->role;?></th>
|
||||
<th><?php echo $lang->team->join;?></th>
|
||||
<th><?php echo $lang->team->days;?></th>
|
||||
<th><?php echo $lang->team->hours;?></th>
|
||||
<th><?php echo $lang->team->totalHours;?></th>
|
||||
<th class='w-100px text-center'><?php echo $lang->team->limited;?></th>
|
||||
<?php if($canBeChanged):?>
|
||||
<th class='c-actions-1 w-80px text-center'><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $totalHours = 0;?>
|
||||
<?php foreach($teamMembers as $member):?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
if(common::hasPriv('user', 'view'))
|
||||
{
|
||||
$link = isset($deptUsers[$member->userID]) ? $this->createLink('user', 'view', "userID={$member->userID}") : "javascript:checkUserDept();";
|
||||
echo html::a($link, $member->realname, '', 'data-app="system"');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $member->realname;
|
||||
}
|
||||
$memberHours = $member->days * $member->hours;
|
||||
$totalHours += $memberHours;
|
||||
?>
|
||||
</td>
|
||||
<td title='<?php echo $member->role;?>'><?php echo $member->role;?></td>
|
||||
<td><?php echo $member->join;?></td>
|
||||
<td><?php echo $member->days . $lang->execution->day;?></td>
|
||||
<td><?php echo $member->hours . $lang->execution->workHour;?></td>
|
||||
<td><?php echo $memberHours . $lang->execution->workHour;?></td>
|
||||
<td class="text-center"><?php echo $lang->team->limitedList[$member->limited];?></td>
|
||||
<?php if($canBeChanged):?>
|
||||
<td class='c-actions text-center'>
|
||||
<?php
|
||||
if (common::hasPriv('project', 'unlinkMember', $member))
|
||||
{
|
||||
$unlinkURL = $this->createLink('project', 'unlinkMember', "projectID=$projectID&userID=$member->userID&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"mainContent\", confirmUnlinkMember)", '<i class="icon-green-project-unlinkMember icon-unlink"></i>', '', "class='btn' title='{$lang->project->unlinkMember}'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<div class='table-statistic'><?php echo $lang->team->totalHours . ':' . "<strong>$totalHours{$lang->execution->workHour}</strong>";?></div>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
Reference in New Issue
Block a user