Merge branch 'master' of git@github.com:easysoft/zentaopms
This commit is contained in:
@@ -104,17 +104,25 @@ class productplan extends control
|
||||
* Browse plans.
|
||||
*
|
||||
* @param int $product
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($product = 0)
|
||||
public function browse($product = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1 )
|
||||
{
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$this->session->set('productPlanList', $this->app->getURI(true));
|
||||
$this->commonAction($product);
|
||||
$products = $this->product->getPairs();
|
||||
$this->view->title = $products[$product] . $this->lang->colon . $this->lang->productplan->browse;
|
||||
$this->view->position[] = $this->lang->productplan->browse;
|
||||
$this->view->plans = $this->productplan->getList($product);
|
||||
$this->view->plans = $this->productplan->getList($product, $pager);
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -32,14 +32,17 @@ class productplanModel extends model
|
||||
* Get list
|
||||
*
|
||||
* @param int $product
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getList($product = 0)
|
||||
public function getList($product = 0, $pager = null)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('product')->eq($product)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('begin desc')->fetchAll();
|
||||
->orderBy('begin desc')
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,5 +45,6 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tr><td colspan='6'><?php $pager->show();?></td></tr>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -66,10 +66,10 @@ class testtask extends control
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->pager = $pager;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->tasks = $this->testtask->getProductTasks($productID);
|
||||
$this->view->tasks = $this->testtask->getProductTasks($productID, $orderBy, $pager);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$this->view->pager = $pager;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -49,6 +49,10 @@ $lang->testtask->lastRunTime = 'Time';
|
||||
$lang->testtask->lastRunResult = 'Result';
|
||||
$lang->testtask->report = 'Report';
|
||||
|
||||
$lang->testtask->legendDesc = 'Desc';
|
||||
$lang->testtask->legendReport = 'Report';
|
||||
$lang->testtask->legendBasicInfo = 'Basic info';
|
||||
|
||||
$lang->testtask->statusList['wait'] = 'Pending';
|
||||
$lang->testtask->statusList['doing'] = 'In progress';
|
||||
$lang->testtask->statusList['done'] = 'Done';
|
||||
|
||||
@@ -49,6 +49,10 @@ $lang->testtask->lastRunTime = '执行时间';
|
||||
$lang->testtask->lastRunResult = '结果';
|
||||
$lang->testtask->report = '测试总结';
|
||||
|
||||
$lang->testtask->legendDesc = '任务描述';
|
||||
$lang->testtask->legendReport = '测试总结';
|
||||
$lang->testtask->legendBasicInfo = '基本信息';
|
||||
|
||||
$lang->testtask->statusList['wait'] = '未开始';
|
||||
$lang->testtask->statusList['doing'] = '进行中';
|
||||
$lang->testtask->statusList['done'] = '已完成';
|
||||
|
||||
@@ -11,22 +11,22 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<table class='table-1 colored tablesorter fixed'>
|
||||
<caption class='caption-tl'>
|
||||
<div class='f-left'><?php echo $lang->testtask->browse;?></div>
|
||||
<div class='f-right'><?php common::printIcon('testtask', 'create', "product=$productID");?></div>
|
||||
</caption>
|
||||
<thead>
|
||||
<?php $vars = "productID=$productID&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'><?php echo $lang->idAB;?></th>
|
||||
<th><?php echo $lang->testtask->name;?></th>
|
||||
<th><?php echo $lang->testtask->project;?></th>
|
||||
<th><?php echo $lang->testtask->build;?></th>
|
||||
<th class='w-user'><?php echo $lang->testtask->owner;?></th>
|
||||
<th class='w-80px'><?php echo $lang->testtask->begin;?></th>
|
||||
<th class='w-80px'><?php echo $lang->testtask->end;?></th>
|
||||
<th class='w-50px'><?php echo $lang->statusAB;?></th>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->testtask->name);?></th>
|
||||
<th> <?php common::printOrderLink('project', $orderBy, $vars, $lang->testtask->project);?></th>
|
||||
<th> <?php common::printOrderLink('build', $orderBy, $vars, $lang->testtask->build);?></th>
|
||||
<th class='w-user'><?php common::printOrderLink('owner', $orderBy, $vars, $lang->testtask->owner);?></th>
|
||||
<th class='w-80px'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->begin);?></th>
|
||||
<th class='w-80px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->testtask->end);?></th>
|
||||
<th class='w-50px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-100px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -35,7 +35,7 @@
|
||||
<tr class='a-center'>
|
||||
<td><?php echo html::a(inlink('view', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
|
||||
<td class='a-left' title="<?php echo $task->name?>"><?php echo html::a(inlink('view', "taskID=$task->id"), $task->name);?></td>
|
||||
<td class='a-left' title="<?php echo $task->projectName?>"><?php echo $task->projectName?></td>
|
||||
<td class='a-left' title="<?php echo $task->projectName?>"><?php echo html::a($this->createLink('project', 'story', "projectID=$task->project"), $task->projectName);?></td>
|
||||
<td class='a-left' title="<?php echo $task->buildName?>"><?php $task->build == 'trunk' ? print('Trunk') : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?></td>
|
||||
<td><?php echo $users[$task->owner];?></td>
|
||||
<td><?php echo $task->begin?></td>
|
||||
@@ -52,5 +52,6 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tr><td colspan='9'><?php $pager->show();?></td></tr>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -11,66 +11,88 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<table class='table-1'>
|
||||
<caption <?php if($task->deleted) echo "class='deleted'";?>>TASK #<?php echo $task->id . ' ' . $task->name;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->name;?></th>
|
||||
<td><?php echo $task->name;?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->project;?></th>
|
||||
<td><?php echo $task->projectName;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->build;?></th>
|
||||
<td><?php $task->buildName ? print($task->buildName) : print($task->build);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->owner;?></th>
|
||||
<td><?php echo $users[$task->owner];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->pri;?></th>
|
||||
<td><?php echo $task->pri;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->begin;?></th>
|
||||
<td><?php echo $task->begin;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->end;?></th>
|
||||
<td><?php echo $task->end;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->status;?></th>
|
||||
<td><?php echo $lang->testtask->statusList[$task->status];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->desc;?></th>
|
||||
<td class='content'><?php echo $task->desc;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->report;?></th>
|
||||
<td class='content'><?php echo $task->report;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='a-center f-16px strong'>
|
||||
<?php
|
||||
$browseLink = $this->session->testtaskList ? $this->session->testtaskList : $this->createLink('testtask', 'browse', "productID=$task->product");
|
||||
if(!$task->deleted)
|
||||
{
|
||||
common::printIcon('testtask', 'start', "taskID=$task->id", $task);
|
||||
common::printIcon('testtask', 'close', "taskID=$task->id", $task);
|
||||
common::printIcon('testtask', 'cases', "taskID=$task->id", $task);
|
||||
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task);
|
||||
<div id='titlebar'>
|
||||
<div id='main' <?php if($task->deleted) echo "class='deleted'";?>>TASK #<?php echo $task->id . ' ' . $task->title;?></div>
|
||||
<div>
|
||||
<?php
|
||||
$browseLink = $this->session->testtaskList ? $this->session->testtaskList : $this->createLink('testtask', 'browse', "productID=$task->product");
|
||||
$actionLinks = '';
|
||||
if(!$task->deleted)
|
||||
{
|
||||
ob_start();
|
||||
|
||||
common::printDivider();
|
||||
common::printIcon('testtask', 'edit', "taskID=$task->id");
|
||||
common::printIcon('testtask', 'delete', "taskID=$task->id", '', 'button', '', 'hiddenwin');
|
||||
}
|
||||
common::printRPN($browseLink);
|
||||
?>
|
||||
common::printIcon('testtask', 'start', "taskID=$task->id", $task);
|
||||
common::printIcon('testtask', 'close', "taskID=$task->id", $task);
|
||||
common::printIcon('testtask', 'cases', "taskID=$task->id", $task);
|
||||
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task);
|
||||
|
||||
common::printDivider();
|
||||
common::printIcon('testtask', 'edit', "taskID=$task->id");
|
||||
common::printIcon('testtask', 'delete', "taskID=$task->id", '', 'button', '', 'hiddenwin');
|
||||
|
||||
$actionLinks = ob_get_contents();
|
||||
ob_clean();
|
||||
echo $actionLinks;
|
||||
}
|
||||
common::printRPN($browseLink);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
|
||||
<table class='cont-rt5'>
|
||||
<tr valign='top'>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->testtask->legendDesc;?></legend>
|
||||
<div class='content'><?php echo $task->desc;?></div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->testtask->legendReport;?></legend>
|
||||
<div class='content'><?php echo $task->report;?></div>
|
||||
</fieldset>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
<div class='a-center actionlink'><?php echo $actionLinks;?></div>
|
||||
</td>
|
||||
<td class='divider'></td>
|
||||
<td class='side'>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->testtask->legendBasicInfo;?></legend>
|
||||
<table class='table-1 a-left fixed'>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->project;?></th>
|
||||
<td><?php echo html::a($this->createLink('project', 'story', "projectID=$task->project"), $task->projectName);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->build;?></th>
|
||||
<td><?php $task->build == 'trunk' ? print('Trunk') : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->owner;?></th>
|
||||
<td><?php echo $users[$task->owner];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->pri;?></th>
|
||||
<td><?php echo $task->pri;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->begin;?></th>
|
||||
<td><?php echo $task->begin;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->end;?></th>
|
||||
<td><?php echo $task->end;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->status;?></th>
|
||||
<td><?php echo $lang->testtask->statusList[$task->status];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->testtask->report;?></th>
|
||||
<td class='content'><?php echo $task->report;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user