* finish the task #615.
This commit is contained in:
@@ -255,7 +255,7 @@ class testtask extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkCase($taskID)
|
||||
public function linkCase($taskID, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
@@ -270,6 +270,10 @@ class testtask extends control
|
||||
$task = $this->testtask->getById($taskID);
|
||||
$productID = $this->product->saveState($task->product, $this->products);
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Build the search form. */
|
||||
$this->loadModel('testcase');
|
||||
$this->config->testcase->search['params']['product']['values']= array($productID => $this->products[$productID], 'all' => $this->lang->testcase->allProduct);
|
||||
@@ -292,8 +296,11 @@ class testtask extends control
|
||||
->andWhere('product')->eq($productID)
|
||||
->andWhere('id')->notIN($linkedCases)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('id desc')->fetchAll();
|
||||
->orderBy('id desc')
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->pager = $pager;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
</tbody>
|
||||
<?php endforeach;?>
|
||||
<tfoot>
|
||||
<tr><td colspan='7' class='a-right'><?php $pager->show();?></td></tr>
|
||||
<tr>
|
||||
<td colspan='6' class='a-center'><?php echo html::submitButton();?></td>
|
||||
<td class='a-left'><input type='checkbox' onclick='checkall(this);'><?php echo $lang->selectAll;?></td>
|
||||
<td colspan='7' class='a-center'><input type='checkbox' onclick='checkall(this);'><?php echo $lang->selectAll; echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user