* Finish task #65781.
This commit is contained in:
@@ -1370,10 +1370,13 @@ class testcase extends control
|
||||
* @param int $caseID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkCases($caseID, $browseType = '', $param = 0)
|
||||
public function linkCases($caseID, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* Get case and queryID. */
|
||||
$case = $this->testcase->getById($caseID);
|
||||
@@ -1392,14 +1395,21 @@ class testcase extends control
|
||||
/* Get cases to link. */
|
||||
$cases2Link = $this->testcase->getCases2Link($caseID, $browseType, $queryID);
|
||||
|
||||
/* Pager. */
|
||||
$this->app->loadClass('pager', true);
|
||||
$recTotal = count($cases2Link);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$cases2Link = array_chunk($cases2Link, $pager->recPerPage);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $case->title . $this->lang->colon . $this->lang->testcase->linkCases;
|
||||
$this->view->position[] = html::a($this->createLink('product', 'view', "productID=$case->product"), $this->products[$case->product]);
|
||||
$this->view->position[] = html::a($this->createLink('testcase', 'view', "caseID=$caseID"), $case->title);
|
||||
$this->view->position[] = $this->lang->testcase->linkCases;
|
||||
$this->view->case = $case;
|
||||
$this->view->cases2Link = $cases2Link;
|
||||
$this->view->cases2Link = empty($cases2Link) ? $cases2Link : $cases2Link[$pageID - 1];
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->pager = $pager;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1410,10 +1420,13 @@ class testcase extends control
|
||||
* @param int $caseID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkBugs($caseID, $browseType = '', $param = 0)
|
||||
public function linkBugs($caseID, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->loadModel('bug');
|
||||
|
||||
@@ -1431,11 +1444,18 @@ class testcase extends control
|
||||
/* Get cases to link. */
|
||||
$bugs2Link = $this->testcase->getBugs2Link($caseID, $browseType, $queryID);
|
||||
|
||||
/* Pager. */
|
||||
$this->app->loadClass('pager', true);
|
||||
$recTotal = count($bugs2Link);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$bugs2Link = array_chunk($bugs2Link, $pager->recPerPage);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->position[] = $this->lang->testcase->linkBugs;
|
||||
$this->view->case = $case;
|
||||
$this->view->bugs2Link = $bugs2Link;
|
||||
$this->view->bugs2Link = empty($bugs2Link) ? $bugs2Link : $bugs2Link[$pageID - 1];
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->pager = $pager;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#mainContent {min-height: 400px;}
|
||||
@@ -1,2 +1,2 @@
|
||||
#mainContent {min-height: 300px;}
|
||||
#mainContent {min-height: 400px;}
|
||||
.table-actions {padding-left: 0;}
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
<?php printf('%03d', $bug2Link->id);?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->bug->priList, $bug2Link->pri, $bug2Link->pri)?>'><?php echo zget($lang->bug->priList, $bug2Link->pri, $bug2Link->pri)?></span></td>
|
||||
<td><?php echo html::a($this->createLink('product', 'browse', "productID={$bug2Link->product}&branch={$bug2Link->branch}"), $products[$bug2Link->product], '_blank');?></td>
|
||||
<td class='text-left' title='<?php echo $bug2Link->title;?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug2Link->id"), $bug2Link->title, '_blank');?></td>
|
||||
<td class='c-name'><?php echo html::a($this->createLink('product', 'browse', "productID={$bug2Link->product}&branch={$bug2Link->branch}"), $products[$bug2Link->product], '_blank');?></td>
|
||||
<td class='text-left c-name' title='<?php echo $bug2Link->title;?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug2Link->id"), $bug2Link->title, '_blank');?></td>
|
||||
<td><?php echo zget($lang->bug->typeList, $bug2Link->type);?></td>
|
||||
<td><?php echo zget($users, $bug2Link->openedBy);?></td>
|
||||
<td class='status-<?php echo $bug2Link->status?>'><?php echo $this->bug->processStatus('bug', $bug2Link);?></td>
|
||||
@@ -66,6 +66,7 @@
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar"><?php if($bugCount) echo html::submitButton('', '', 'btn btn-default');?></div>
|
||||
<?php echo html::hidden('case', $case->id);?>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
<?php printf('%03d', $case2Link->id);?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case2Link->pri, $case2Link->pri)?>'><?php echo zget($lang->testcase->priList, $case2Link->pri, $case2Link->pri)?></span></td>
|
||||
<td><?php echo html::a($this->createLink('product', 'browse', "productID={$case2Link->product}&branch={$case2Link->branch}"), $products[$case2Link->product], '_blank');?></td>
|
||||
<td class='text-left' title='<?php echo $case2Link->title;?>'><?php echo html::a($this->createLink('testcase', 'view', "caseID=$case2Link->id"), $case2Link->title, '_blank');?></td>
|
||||
<td class='c-name'><?php echo html::a($this->createLink('product', 'browse', "productID={$case2Link->product}&branch={$case2Link->branch}"), $products[$case2Link->product], '_blank');?></td>
|
||||
<td class='text-left c-name' title='<?php echo $case2Link->title;?>'><?php echo html::a($this->createLink('testcase', 'view', "caseID=$case2Link->id"), $case2Link->title, '_blank');?></td>
|
||||
<td><?php echo $lang->testcase->typeList[$case2Link->type];?></td>
|
||||
<td><?php echo zget($users, $case2Link->openedBy);?></td>
|
||||
<td class='case-<?php echo $case2Link->status?>'><?php echo $this->processStatus('testcase', $case2Link);?></td>
|
||||
@@ -66,6 +66,7 @@
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar"><?php if($caseCount) echo html::submitButton('', '', 'btn btn-default');?></div>
|
||||
<?php echo html::hidden('case', $case->id);?>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
|
||||
Reference in New Issue
Block a user