* Finish task #8116.

This commit is contained in:
Yagami
2020-10-14 10:01:28 +08:00
parent 6ac38da8c2
commit 7eecf4b27f
12 changed files with 39 additions and 677 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ CREATE TABLE `zt_stakeholder` (
-- DROP TABLE IF EXISTS `zt_expect`;
CREATE TABLE `zt_expect` (
`id` mediumint(8) NOT NULL,
`id` mediumint(8) NOT NULL AUTO_INCREMENT,
`userID` mediumint(8) NOT NULL,
`program` mediumint(8) NOT NULL DEFAULT 0,
`expect` text NOT NULL,
+1 -1
View File
@@ -1301,7 +1301,7 @@ CREATE TABLE IF NOT EXISTS `zt_entry` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_expect`;
CREATE TABLE `zt_expect` (
`id` mediumint(8) NOT NULL,
`id` mediumint(8) NOT NULL AUTO_INCREMENT,
`userID` mediumint(8) NOT NULL,
`program` mediumint(8) NOT NULL DEFAULT 0,
`expect` text NOT NULL,
+6 -6
View File
@@ -37,13 +37,13 @@
<th class='c-id w-80px'>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='w-100px'><?php common::printOrderLink('code', $orderBy, $vars, $lang->program->code);?></th>
<th class='table-nest-title'><?php common::printOrderLink('name', $orderBy, $vars, $lang->program->name);?></th>
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->program->status);?></th>
<th class='w-100px'><?php common::printOrderLink('code', $orderBy, $vars, $lang->program->PRJCode);?></th>
<th class='table-nest-title'><?php common::printOrderLink('name', $orderBy, $vars, $lang->program->PRJName);?></th>
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->program->PRJStatus);?></th>
<th class='w-100px'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->program->begin);?></th>
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->program->end);?></th>
<th class='w-100px'><?php common::printOrderLink('budget', $orderBy, $vars, $lang->program->budget);?></th>
<th class='w-100px'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->program->PM);?></th>
<th class='w-100px'><?php common::printOrderLink('budget', $orderBy, $vars, $lang->program->PRJBudget);?></th>
<th class='w-100px'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->program->PRJPM);?></th>
<th class='text-center w-240px'><?php echo $lang->actions;?></th>
<?php if($canOrder):?>
<th class='w-60px sort-default'><?php common::printOrderLink('order', $orderBy, $vars, $lang->project->orderAB);?></th>
@@ -93,7 +93,7 @@
<?php common::printIcon('program', 'suspend', "programID=$program->id", $program, 'list', '', '', 'iframe', true);?>
<?php common::printIcon('program', 'close', "programID=$program->id", $program, 'list', '', '', 'iframe', true);?>
<?php if(common::hasPriv('program', 'edit')) echo html::a($this->createLink("program", "edit", "programID=$program->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
<?php common::printIcon('program', 'create', "template=&programID=$program->id", '', 'list', 'treemap-alt', '', '', '', '', $this->lang->program->children);?>
<?php common::printIcon('program', 'create', "template=&programID=$program->id", '', 'list', 'treemap-alt', '', '', '', '', $this->lang->program->PRJChildren);?>
<?php if(common::hasPriv('program', 'delete')) echo html::a($this->createLink("program", "delete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$lang->delete}'");?>
</td>
<?php if($canOrder):?>
-175
View File
@@ -149,44 +149,6 @@ class stakeholder extends control
$this->display();
}
/**
* Stakeholder plan list.
*
* @param int $stakeholderID
* @access public
* @return void
*/
public function plan()
{
if($_POST)
{
$result = $this->stakeholder->savePlan();
$response['result'] = 'success';
$response['message'] = $this->lang->saveSuccess;
if(!$result)
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
$this->send($response);
}
$response['locate'] = inlink('plan');
$this->send($response);
}
$this->view->title = $this->lang->stakeholder->planField->common;
$this->view->position[] = $this->lang->stakeholder->planField->common;
$this->view->plans = $this->stakeholder->getPlans();
$this->view->processGroup = $this->stakeholder->getProcessGroup();
$this->view->activities = $this->stakeholder->getActivities();
$this->view->processes = $this->stakeholder->getProcess();
$this->view->stakeholders = $this->stakeholder->getListByType();
$this->display();
}
/**
* Ajax get members.
*
@@ -419,143 +381,6 @@ class stakeholder extends control
$this->view->actions = $this->loadModel('action')->getList($object, $stakeholderID);
}
/**
* Get expected list data.
*
* @param string $browseType
* @param string orderBy
* @param int recTotal
* @param int recPerPage
* @param int pageID
* @access public
* @return void
*/
public function expectation($browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->config->stakeholder->search['params']['userID']['values'] = $this->stakeholder->getStakeholderUsers();
/* Build the search form. */
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
$actionURL = $this->createLink('stakeholder', 'expectation', "browseType=bysearch&queryID=myQueryID");
$this->stakeholder->buildSearchForm($actionURL, $queryID);
$this->app->loadClass('pager', true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$expects = $this->stakeholder->getExpectList($browseType, $queryID, $orderBy, $pager);
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->expectation;
$this->view->position[] = $this->lang->stakeholder->view;
$this->view->pager = $pager;
$this->view->recTotal = $recTotal;
$this->view->recPerPage = $recPerPage;
$this->view->pageID = $pageID;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->expects = $expects;
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
$this->display();
}
/**
* Deleted expect.
*
* @access public
* @param int $expectID
* @param string $confirm yes|no
* @return void
*/
public function deleteExpect($expectID, $confirm = 'no')
{
if($confirm == 'no')
{
die(js::confirm($this->lang->stakeholder->confirmDeleteExpect, inLink('deleteExpect', "expectID=$expectID&confirm=yes")));
}
else
{
$this->stakeholder->deleteExpect($expectID);
die(js::reload('parent'));
}
}
/**
* Add expect.
*
* @access public
* @return void
*/
public function createExpect()
{
if($_POST)
{
$expectID = $this->stakeholder->expect();
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$actionID = $this->loadModel('action')->create('expect', $expectID, 'Opened');
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('expectation')));
}
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->createExpect;
$this->view->position[] = $this->lang->stakeholder->createExpect;
$this->view->users = $this->stakeholder->getStakeholderUsers();
$this->display();
}
/**
* Edit expect.
*
* @param int $expectID
* @access public
* @return void
*/
public function editExpect($expectID)
{
if($_POST)
{
$changes = $this->stakeholder->editExpect($expectID);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$actionID = $this->loadModel('action')->create('expect', $expectID, 'Edited');
$this->action->logHistory($actionID, $changes);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('expectation')));
}
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->editExpect;
$this->view->position[] = $this->lang->stakeholder->editExpect;
$this->view->users = $this->stakeholder->getStakeholderUsers();
$this->view->expect = $this->stakeholder->getExpectByID($expectID);
$this->display();
}
/**
* Expect details.
*
* @access public
* @param int $expectID
* @return void
*/
public function viewExpect($expectID = 0)
{
$this->commonAction($expectID, 'expect');
$expect = $this->stakeholder->getExpectByID($expectID);
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->viewExpect;
$this->view->position[] = $this->lang->stakeholder->viewExpect;
$this->view->expect = $expect;
$this->view->user = $this->stakeholder->getByID($expect->userID);
$this->view->users = $this->loadModel('project')->getTeamMemberPairs($this->session->PRJ ,'nodeleted');
$this->display();
}
/**
* Issue details.
*
+26 -55
View File
@@ -6,7 +6,6 @@ $lang->stakeholder->batchCreate = '批量添加';
$lang->stakeholder->create = '添加干系人';
$lang->stakeholder->edit = '编辑干系人';
$lang->stakeholder->view = '干系人详情';
$lang->stakeholder->plan = '介入计划表';
$lang->stakeholder->delete = '删除干系人';
$lang->stakeholder->createdBy = '创建者';
$lang->stakeholder->createdDate = '创建时间';
@@ -28,51 +27,27 @@ $lang->stakeholder->viewIssue = '活动问题列表';
$lang->stakeholder->userIssue = '干系人问题列表';
/* Fields. */
$lang->stakeholder->id = '编号';
$lang->stakeholder->user = '用户';
$lang->stakeholder->type = '类型';
$lang->stakeholder->name = '姓名';
$lang->stakeholder->phone = '手机';
$lang->stakeholder->qq = 'QQ';
$lang->stakeholder->weixin = '微信';
$lang->stakeholder->email = '邮箱';
$lang->stakeholder->isKey = '关键干系人';
$lang->stakeholder->inside = '内部干系人';
$lang->stakeholder->outside = '外部干系人';
$lang->stakeholder->from = '类型';
$lang->stakeholder->company = '所属公司';
$lang->stakeholder->nature = '性格特征';
$lang->stakeholder->analysis = '影响分析';
$lang->stakeholder->strategy = '应对策略';
$lang->stakeholder->expect = '期望内容';
$lang->stakeholder->progress = '达成进展';
$lang->stakeholder->createdBy = '创建者';
$lang->stakeholder->createdDate = '创建日期';
$lang->stakeholder->noPlan = '暂无活动,请先进行过程裁剪。';
$lang->stakeholder->emptyTip = '暂无问题。';
/* Plan */
$lang->stakeholder->planField = new stdclass();
$lang->stakeholder->planField->common = '干系人介入计划表';
$lang->stakeholder->planField->process = '过程活动';
$lang->stakeholder->planField->begin = '计划开展日期';
$lang->stakeholder->planField->realBegin = '实际开展日期';
$lang->stakeholder->planField->status = '状况跟踪';
$lang->stakeholder->planField->inside = '内部干系人';
$lang->stakeholder->planField->outside = '外部干系人';
$lang->stakeholder->planField->comment = '备注';
$lang->stakeholder->planField->situation = '实际参与情况';
$lang->stakeholder->planField->issue = '问题列表';
$lang->stakeholder->planField->statusTips = '状况跟踪:已获得承诺、已确认';
$lang->stakeholder->planField->partakeTips = '参与类型: P(Principal:主要负责),I(Involved:参与),O(Optional:可选参与)';
$lang->stakeholder->planField->stautsList['no'] = 'N';
$lang->stakeholder->planField->stautsList['yes'] = 'Y';
$lang->stakeholder->planField->partakeList[''] = '';
$lang->stakeholder->planField->partakeList['principal'] = 'P';
$lang->stakeholder->planField->partakeList['involved'] = 'I';
$lang->stakeholder->planField->partakeList['optional'] = 'O';
$lang->stakeholder->id = '编号';
$lang->stakeholder->user = '用户';
$lang->stakeholder->type = '类型';
$lang->stakeholder->name = '姓名';
$lang->stakeholder->phone = '手机';
$lang->stakeholder->qq = 'QQ';
$lang->stakeholder->weixin = '微信';
$lang->stakeholder->email = '邮箱';
$lang->stakeholder->isKey = '关键干系人';
$lang->stakeholder->inside = '内部干系人';
$lang->stakeholder->outside = '外部干系人';
$lang->stakeholder->from = '类型';
$lang->stakeholder->company = '所属公司';
$lang->stakeholder->nature = '性格特征';
$lang->stakeholder->analysis = '影响分析';
$lang->stakeholder->strategy = '应对策略';
$lang->stakeholder->expect = '期望内容';
$lang->stakeholder->progress = '达成进展';
$lang->stakeholder->createdBy = '创建者';
$lang->stakeholder->createdDate = '创建日期';
$lang->stakeholder->emptyTip = '暂无问题。';
$lang->stakeholder->keyList[0] = '否';
$lang->stakeholder->keyList[1] = '是';
@@ -84,16 +59,12 @@ $lang->stakeholder->fromList['team'] = '项目团队成员';
$lang->stakeholder->fromList['company'] = '公司同事';
$lang->stakeholder->fromList['outside'] = '外部人员';
$lang->stakeholder->situationList['all'] = '全部参与';
$lang->stakeholder->situationList['part'] = '部分参与';
$lang->stakeholder->situationList['wait'] = '未开始';
$lang->stakeholder->userEmpty = '用户不能为空!';
$lang->stakeholder->nameEmpty = '姓名不能为空!';
$lang->stakeholder->companyEmpty = '所属公司不能为空!';
$lang->stakeholder->confirmDelete = "您确定删除该干系人吗?";
$lang->stakeholder->userEmpty = '用户不能为空!';
$lang->stakeholder->nameEmpty = '姓名不能为空!';
$lang->stakeholder->companyEmpty = '所属公司不能为空!';
$lang->stakeholder->confirmDelete = "您确定删除该干系人吗?";
$lang->stakeholder->confirmDeleteExpect = "您确定删除该干系人期望吗?";
$lang->stakeholder->createCommunicate = '<i class="icon icon-chat-line"></i>添加沟通记录';
$lang->stakeholder->createCommunicate = '<i class="icon icon-chat-line"></i>添加沟通记录';
$lang->stakeholder->action = new stdclass();
$lang->stakeholder->action->communicate = array('main' => '$date, 由 <strong>$actor</strong> 沟通。');
+4 -32
View File
@@ -102,6 +102,7 @@ class stakeholderModel extends model
*/
public function batchCreate()
{
$this->loadModel('action');
$data = (array)fixer::input('post')->get();
$members = $this->loadModel('project')->getTeamMemberPairs($this->session->PRJ);
@@ -122,6 +123,9 @@ class stakeholderModel extends model
$stakeholder->createdDate = isset($oldJoin[$account]) ? $oldJoin[$account] : helper::today();
$this->dao->insert(TABLE_STAKEHOLDER)->data($stakeholder)->exec();
$stakeholderID = $this->dao->lastInsertId();
$this->action->create('stakeholder', $stakeholderID, 'Opened');
}
/* Only changed account update userview. */
@@ -178,38 +182,6 @@ class stakeholderModel extends model
return false;
}
/**
* Save stakeholder plan.
*
* @param string $browseType
* @param string $orderBy
* @param object $pager
* @access public
* @return array
*/
public function savePlan()
{
$data = fixer::input('post')->get();
foreach($data->status as $activityID => $value)
{
$stakeholder = new stdclass();
$stakeholder->activity = $activityID;
$stakeholder->status = $data->status[$activityID];
$stakeholder->begin = $data->begin[$activityID];
$stakeholder->realBegin = $data->realBegin[$activityID];
$stakeholder->partake = json_encode($data->partake[$activityID]);
$stakeholder->situation = $data->situation[$activityID];
$stakeholder->program = $this->session->PRJ;
$stakeholder->createdBy = $this->app->user->account;
$stakeholder->createdDate = helper::today();
$this->dao->replace(TABLE_INTERVENTION)->data($stakeholder)->exec();
}
return !dao::isError();
}
/**
* Get stakeholder list.
*
@@ -1,44 +0,0 @@
<?php
/**
* The view view of stakeholder module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package product
* @version $Id: browse.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id="mainContent" class="main-content fade">
<div class="center-block">
<div class="main-header">
<h2><?php echo $lang->stakeholder->createExpect;?></h2>
</div>
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='expectForm'>
<table class="table table-form">
<tbody>
<tr>
<th><?php echo $lang->stakeholder->common;?></th>
<td><?php echo html::select('userID', $users, '', "class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->stakeholder->expect;?></th>
<td colspan="2"><?php echo html::textarea('expect', '', "rows='6'");?></td>
</tr>
<tr>
<th><?php echo $lang->stakeholder->progress;?></th>
<td colspan="2"><?php echo html::textarea('progress', '', "rows='6'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
@@ -1,45 +0,0 @@
<?php
/**
* The view view of stakeholder module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package product
* @version $Id: browse.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id="mainContent" class="main-content fade">
<div class="center-block">
<div class="main-header">
<h2><?php echo $lang->stakeholder->editExpect;?></h2>
</div>
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='expectForm'>
<table class="table table-form">
<tbody>
<tr>
<th><?php echo $lang->stakeholder->common;?></th>
<td><?php echo html::select('userID', $users, $expect->userID, "class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->stakeholder->expect;?></th>
<td colspan="2"><?php echo html::textarea('expect', $expect->expect, "rows='6'");?></td>
</tr>
<tr>
<th><?php echo $lang->stakeholder->progress;?></th>
<td colspan="2"><?php echo html::textarea('progress', $expect->progress, "rows='6'");?></td>
</tr>
<tr>
<?php echo html::hidden('id', $expect->id);?>
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
@@ -1,77 +0,0 @@
<?php
/**
* The view view of stakeholder module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package product
* @version $Id: browse.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a($this->createLink('stakeholder', 'expectation', 'browseType=all'), '<span class="text">' . $lang->stakeholder->browse . '</span>', '', 'class="btn btn-link btn-active-text"');?>
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->stakeholder->search;?></a>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('stakeholder', 'createExpect', '', "<i class='icon icon-plus'></i>" . $lang->stakeholder->createExpect, '', "class='btn btn-primary'");?>
</div>
</div>
<div id='mainContent' class='main-row fade'>
<div class='main-col'>
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-module="stakeholder"></div>
<?php if(!empty($expects)):?>
<form class='main-table table-user' data-ride='table' action='' method='post' id='userListForm'>
<table class='table has-sort-head' id='userList'>
<thead>
<tr>
<?php $vars = "browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<th class='c-id w-60px'>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class="w-200px"><?php echo $lang->stakeholder->common;?></th>
<th class="w-100px"><?php echo $lang->stakeholder->createdBy;?></th>
<th class="w-120px"><?php echo $lang->stakeholder->createdDate;?></th>
<th class='c-actions w-60px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($expects as $expect):?>
<tr>
<td class='c-id'>
<?php echo html::a($this->createLink('stakeholder', 'viewExpect', "id=$expect->id"), sprintf('%03d', $expect->id));?>
</td>
<td title="<?php echo $expect->realname;?>">
<?php echo $expect->realname;?>
<?php if($expect->key):?>
<i class="icon icon-star-empty"></i>
<?php endif;?>
</td>
<td><?php echo zget($users, $expect->createdBy);?></td>
<td><?php echo $expect->createdDate;?></td>
<td class='c-actions'>
<?php
common::printIcon('stakeholder', 'editExpect', "id=$expect->id", $expect, 'list', 'edit', '', '', '');
$deleteClass = common::hasPriv('stakeholder', 'deleteExpect') ? 'btn' : 'btn disabled';
echo html::a($this->createLink('stakeholder', 'deleteExpect', "id=$expect->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->stakeholder->delete}' class='{$deleteClass}'");
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if($expects):?>
<div class='table-footer'>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</form>
<?php else:?>
<div class='table-empty-tip'><?php echo $lang->noData;?></div>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-130
View File
@@ -1,130 +0,0 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datatable.html.php';?>
<?php
$insideWidth = isset($stakeholders['inside']) ? count($stakeholders['inside']) * 200 : 200;
$outsideWidth = isset($stakeholders['outside']) ? count($stakeholders['outside']) * 200 : 200;
$insideWidth = "data-width=$insideWidth" . " style=$insideWidth";
$outsideWidth = "data-width=$outsideWidth" . " style=$outsideWidth";
$insideList = '<th></th>';
$outsideList = '<th></th>';
$insideColspan = 1;
$outsideColspan = 1;
if(isset($stakeholders['inside']))
{
$insideColspan = count($stakeholders['inside']);
$insideList = '';
foreach($stakeholders['inside'] as $user)
{
if($user->role) $user->name .= '(' . zget($lang->user->roleList, $user->role) . ')';
$insideList .= "<th style='width: 200px;'>" . $user->name . '</th>';
}
}
if(isset($stakeholders['outside']))
{
$outsideColspan = count($stakeholders['outside']);
$outsideList = '';
foreach($stakeholders['outside'] as $user)
{
if($user->role) $user->name .= '(' . zget($lang->user->roleList, $user->role) . ')';
$outsideList .= '<th style="width: 200px;">' . $user->name . '</th>';
}
}
js::set('insideList', $insideList);
js::set('insideColspan', $insideColspan);
js::set('outsideList', $outsideList);
js::set('outsideColspan', $outsideColspan);
?>
<div id='mainContent' class='main-row fade'>
<div class='main-col'>
<?php if(!empty($processGroup)):?>
<form class='main-table form-ajax' method='post'>
<table class="table table-bordered" id='planList'>
<thead>
<tr class='text-center'>
<th data-flex='false'><?php echo $lang->stakeholder->planField->process;?></th>
<th data-flex='false'><?php echo $lang->stakeholder->planField->begin;?></th>
<th data-flex='false'><?php echo $lang->stakeholder->planField->realBegin;?></th>
<th data-flex='false'><?php echo $lang->stakeholder->planField->status;?></th>
<th data-flex='false'><?php echo $lang->stakeholder->planField->situation;?></th>
<th data-flex='true' <?php echo $insideWidth;?>><?php echo $lang->stakeholder->planField->inside;?></th>
<th data-flex='true' <?php echo $outsideWidth;?>><?php echo $lang->stakeholder->planField->outside;?></th>
<th data-flex='false'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($processGroup as $processID => $activityGroup):?>
<tr class='process'>
<td colspan='5' title=<?php echo zget($processes, $processID);?>>
<?php echo '<strong>' . zget($processes, $processID) . '</strong>';?>
</td>
</tr>
<?php foreach($activityGroup as $activity):?>
<tr>
<td title=<?php echo zget($activities, $activity->activity);?>>
<?php echo zget($activities, $activity->activity);?>
</td>
<td class='text-center'><?php echo isset($plans[$activity->activity]) ? $plans[$activity->activity]->begin : '';?></td>
<td class='text-center'><?php echo isset($plans[$activity->activity]) ? $plans[$activity->activity]->realBegin : '';?></td>
<td class='text-center'><?php echo isset($plans[$activity->activity]) ? zget($lang->stakeholder->planField->stautsList, $plans[$activity->activity]->status) : '';?></td>
<td class='text-center'><?php echo isset($plans[$activity->activity]) ? zget($lang->stakeholder->situationList, $plans[$activity->activity]->situation) : '';?></td>
<td class='inside'>
<?php
$partake = isset($plans[$activity->activity]) ? json_decode($plans[$activity->activity]->partake) : new stdclass();
if(isset($stakeholders['inside']))
{
foreach($stakeholders['inside'] as $user)
{
if(isset($partake->{$user->account}))
{
echo '<span class="text-center">' . zget($lang->stakeholder->planField->partakeList, $partake->{$user->account}) . '</span>';
}
else
{
echo '<span></span>';
}
}
}
?>
</td>
<td class='outside'>
<?php
if(isset($stakeholders['outside']))
{
foreach($stakeholders['outside'] as $user)
{
if(isset($partake->{$user->account}))
{
echo '<span class="text-center">' . zget($lang->stakeholder->planField->partakeList, $partake->{$user->account}) . '</span>';
}
else
{
echo '<span></span>';
}
}
}
?>
</td>
<td class='c-actions text-center'>
<?php echo html::a('javascript:void(0)', '<i class="icon icon-edit"></i>', '', "class='btn edit-btn' title=$lang->edit activity=$activity->activity");?>
<?php common::printIcon('stakeholder', 'viewIssue', "activityID=$activity->activity", '', 'list', 'eye', '', 'iframe', true, '', $lang->stakeholder->planField->issue);?>
</td>
</tr>
<?php endforeach;?>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer fixed-footer'>
<div class="table-statistic"><?php echo $lang->stakeholder->planField->statusTips . '; ' . $lang->stakeholder->planField->partakeTips;?></div>
</div>
</form>
<?php else:?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->stakeholder->noPlan;?></span></p>
</div>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -58,7 +58,7 @@ $createLink = $this->createLink('stakeholder', 'create');
<div class="detail">
<div class="detail-title"><?php echo $lang->stakeholder->expect . "($expect->createdDate)";?></div>
<div class="detail-content article-content">
<?php echo !empty($expect->expectr) ? $expect->expect : '<div class="text-center text-muted">' . $lang->noData . '</div>';?>
<?php echo !empty($expect->expect) ? $expect->expect : '<div class="text-center text-muted">' . $lang->noData . '</div>';?>
</div>
</div>
<div class="detail">
-110
View File
@@ -1,110 +0,0 @@
<?php
/**
* The view view of stakeholder module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology C
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Congzhi Chen <congzhi@cnezsoft.com>
* @package company
* @version $Id: edit.html.php 4488 2013-02-27 02:54:49Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php
$browseLink = $this->createLink('stakeholder', 'expectation');
$createLink = $this->createLink('stakeholder', 'createExpect');
?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php if(!isonlybody()):?>
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i>' . $lang->goback, '', 'class="btn btn-secondary"');?>
<div class="divider"></div>
<?php endif;?>
<div class="page-title">
<span class="label label-id"><?php echo $expect->id?></span>
<span class="text" title="<?php echo $user->name?>"><?php echo $user->name?></span>
</div>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('stakeholder', 'createExpect')) echo html::a($createLink, "<i class='icon icon-plus'></i> {$lang->stakeholder->createExpect}", '', "class='btn btn-primary'");?>
</div>
</div>
<div class="main-row" id="mainContent">
<div class="main-col col-8">
<div class="cell">
<div class="detail">
<div class="detail-title"><?php echo $lang->stakeholder->expect;?></div>
<div class="detail-content article-content">
<?php echo !empty($expect->expect) ? $expect->expect : '<div class="text-center text-muted">' . $lang->noData . '</div>';?>
</div>
</div>
<div class="detail">
<div class="detail-title"><?php echo $lang->stakeholder->progress;?></div>
<div class="detail-content article-content">
<?php echo !empty($expect->progress) ? $expect->progress : '<div class="text-center text-muted">' . $lang->noData . '</div>';?>
</div>
</div>
</div>
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=expect&objectID=$expect->id");?>
<div class="cell" id="expect"><?php include '../../common/view/action.html.php';?></div>
</div>
<div class="side-col col-4">
<div class="cell">
<div class="tabs">
<ul class="nav nav-tabs">
<li class="active">
<a href="#basicInfo" data-toggle="tab"><?php echo $lang->stakeholder->basicInfo;?></a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="basicInfo">
<table class="table table-data">
<tbody>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->stakeholder->name;?></th>
<td><?php echo $user->name?></td>
</tr>
<tr>
<th><?php echo $this->lang->stakeholder->type;?></th>
<td><?php echo zget($lang->stakeholder->typeList, $user->type, '');?></td>
</tr>
<tr>
<th><?php echo $this->lang->stakeholder->company;?></th>
<td><?php echo $user->companyName;?></td>
</tr>
<tr>
<th><?php echo $this->lang->stakeholder->phone;?></th>
<td><?php echo $user->phone;?></td>
</tr>
<tr>
<th><?php echo $this->lang->stakeholder->qq;?></th>
<td><?php echo $user->qq;?></td>
</tr>
<tr>
<th><?php echo $this->lang->stakeholder->weixin;?></th>
<td><?php echo $user->weixin;?></td>
</tr>
<tr>
<th><?php echo $this->lang->stakeholder->email;?></th>
<td><?php echo $user->email;?></td>
</tr>
<tr>
<th><?php echo $this->lang->stakeholder->isKey;?></th>
<td><?php echo zget($lang->stakeholder->keyList, $user->key, '');?></td>
</tr>
<tr>
<th><?php echo $this->lang->stakeholder->from;?></th>
<td><?php echo zget($lang->stakeholder->fromList, $user->from, '');?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include '../../common/view/syntaxhighlighter.html.php';?>
<?php include '../../common/view/footer.html.php';?>