Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
tianshujie98
2020-11-30 08:21:13 +08:00
4 changed files with 11 additions and 8 deletions
+6 -4
View File
@@ -1367,17 +1367,19 @@ class bugModel extends model
* @param string $type
* @param string $orderBy
* @param int $limit
* @param int $pager
* @param object $pager
* @param int $projectID
* @access public
* @return void
*/
public function getUserBugs($account, $type = 'assignedTo', $orderBy = 'id_desc', $limit = 0, $pager = null, $programID = 0)
public function getUserBugs($account, $type = 'assignedTo', $orderBy = 'id_desc', $limit = 0, $pager = null, $projectID = 0)
{
if(!$this->loadModel('common')->checkField(TABLE_BUG, $type)) return array();
$bugs = $this->dao->select('*')->from(TABLE_BUG)
->where('deleted')->eq(0)
->beginIF($programID)->andWhere('PRJ')->eq($programID)->fi()
->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi()
->beginIF($projectID)->andWhere('PRJ')->eq($projectID)->fi()
->beginIF(!$this->app->user->admin)->andWhere('PRJ')->in($this->app->user->view->projects)->fi()
->beginIF(!$this->app->user->admin)->andWhere('project')->in($this->app->user->view->sprints)->fi()
->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('status')->ne('closed')->fi()
->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi()
->orderBy($orderBy)
+1 -1
View File
@@ -17,7 +17,7 @@ class stakeholder extends control
$this->app->loadClass('pager', true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$stakeholders = $this->stakeholder->getStakeHolders($browseType, $orderBy, $pager);
$stakeholders = $this->stakeholder->getStakeholders($browseType, $orderBy, $pager);
$this->view->title = $this->lang->stakeholder->browse;
$this->view->position[] = $this->lang->stakeholder->browse;
+2 -1
View File
@@ -198,9 +198,10 @@ class stakeholderModel extends model
*/
public function getStakeholders($browseType = 'all', $orderBy = 'id_desc', $pager = null)
{
$stakeholders = $this->dao->select('t1.*, t2.phone, t2.realname as name, t2.email, t2.qq, t2.weixin, t2.nature, t2.analysis, t2.strategy, t3.name as companyName')->from(TABLE_STAKEHOLDER)->alias('t1')
$stakeholders = $this->dao->select('t1.*, t2.phone, t2.realname as name, t2.email, t2.qq, t2.weixin, t2.nature, t2.analysis, t2.strategy, t3.name as companyName, t4.model as projectModel')->from(TABLE_STAKEHOLDER)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.objectID=t4.id')
->where('t1.deleted')->eq('0')
->andWhere('t1.objectID')->eq($this->session->PRJ)
->beginIF($browseType == 'inside')->andWhere('t1.type')->eq('inside')->fi()
+2 -2
View File
@@ -38,7 +38,7 @@
<th class="w-120px"><?php echo $lang->stakeholder->qq;?></th>
<th class="w-120px"><?php echo $lang->stakeholder->weixin;?></th>
<th class="w-200px"><?php echo $lang->stakeholder->email;?></th>
<th class='c-actions w-160px'><?php echo $lang->actions;?></th>
<th class='c-actions text-center w-150px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -60,7 +60,7 @@
<?php
common::printIcon('stakeholder', 'communicate', "id=$stakeholder->id", $stakeholder, 'list', 'chat-line', '', 'iframe', 'yes');
common::printIcon('stakeholder', 'expect', "id=$stakeholder->id", $stakeholder, 'list', 'flag', '', 'iframe', 'yes');
common::printIcon('stakeholder', 'userIssue', "account=$stakeholder->id", $stakeholder, 'list', 'list-alt', '', 'iframe', 'yes');
if($stakeholder->projectModel == 'waterfall') common::printIcon('stakeholder', 'userIssue', "account=$stakeholder->id", $stakeholder, 'list', 'list-alt', '', 'iframe', 'yes');
common::printIcon('stakeholder', 'edit', "id=$stakeholder->id", $stakeholder, 'list', '', '', '', '');
$deleteClass = common::hasPriv('stakeholder', 'delete') ? 'btn' : 'btn disabled';
echo html::a($this->createLink('stakeholder', 'delete', "id=$stakeholder->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->stakeholder->delete}' class='{$deleteClass}'");