Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -135,6 +135,7 @@ class project extends control
|
||||
$productID = ($browseType == 'byproduct') ? (int)$param : 0;
|
||||
$project = $this->commonAction($projectID, $status);
|
||||
$projectID = $project->id;
|
||||
$products = $this->loadModel('product')->getProductsByProject($projectID);
|
||||
|
||||
/* Save to session. */
|
||||
$uri = $this->app->getURI(true);
|
||||
@@ -225,24 +226,25 @@ class project extends control
|
||||
foreach($this->view->teamMembers as $key => $member) $memberPairs[$key] = $member->realname;
|
||||
|
||||
/* Assign. */
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->summary = $this->project->summary($tasks);
|
||||
$this->view->tabID = 'task';
|
||||
$this->view->pager = $pager;
|
||||
$this->view->recTotal = $pager->recTotal;
|
||||
$this->view->recPerPage = $pager->recPerPage;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->status = $status;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->param = $param;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $project;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID = 0, $startModuleID = 0, array('treeModel', 'createTaskLink'));
|
||||
$this->view->projectTree = $this->project->tree();
|
||||
$this->view->memberPairs = $memberPairs;
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->summary = $this->project->summary($tasks);
|
||||
$this->view->tabID = 'task';
|
||||
$this->view->pager = $pager;
|
||||
$this->view->recTotal = $pager->recTotal;
|
||||
$this->view->recPerPage = $pager->recPerPage;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->status = $status;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->param = $param;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $project;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID = 0, $startModuleID = 0, array('treeModel', 'createTaskLink'));
|
||||
$this->view->projectTree = $this->project->tree();
|
||||
$this->view->memberPairs = $memberPairs;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1455,7 +1455,7 @@ class projectModel extends model
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product AS storyProduct, t2.branch AS storyBranch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->story->priList, $story->pri, $story->pri)?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
|
||||
<td class='text-left' title="<?php echo $story->title?>">
|
||||
<?php if(isset($branchGroups[$story->product][$story->branch])) echo "<span class='label label-info lagel-badge'>" . $branchGroups[$story->product][$story->branch] . '</span>';?>
|
||||
<?php if(isset($branchGroups[$story->product][$story->branch])) echo "<span class='label label-info label-badge'>" . $branchGroups[$story->product][$story->branch] . '</span>';?>
|
||||
<?php echo html::a($storyLink,$story->title);?>
|
||||
</td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->task->priList, $task->pri, $task->pri)?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
|
||||
<td class='text-left' title="<?php echo $task->name?>">
|
||||
<?php if(isset($branchGroups[$task->storyProduct][$task->storyBranch])) echo "<span class='label label-info label-badge'>" . $branchGroups[$task->storyProduct][$task->storyBranch] . '</span>';?>
|
||||
<?php
|
||||
if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;
|
||||
if($task->fromBug) echo html::a($this->createLink('bug', 'view', "id=$task->fromBug"), "[BUG#$task->fromBug]", '_blank', "class='bug'");
|
||||
|
||||
@@ -773,7 +773,7 @@ class taskModel extends model
|
||||
*/
|
||||
public function getTasksByModule($projectID = 0, $moduleIds = 0, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product AS storyProduct, t2.branch AS storyBranch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
|
||||
@@ -803,7 +803,7 @@ class taskModel extends model
|
||||
public function getProjectTasks($projectID, $type = 'all', $orderBy = 'status_asc, id_desc', $pager = null)
|
||||
{
|
||||
if(is_string($type)) $type = strtolower($type);
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product AS storyProduct, t2.branch AS storyBranch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
|
||||
|
||||
Reference in New Issue
Block a user