+ Add table sort to execution::all.

This commit is contained in:
tianshujie
2023-10-18 16:38:12 +08:00
parent ee9b14c387
commit 40bd0c2bbe
2 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -2655,8 +2655,12 @@ class execution extends control
$actionURL = $this->createLink('execution', 'all', "status=bySearch&orderBy=$orderBy&productID=$productID&param=myQueryID");
$this->execution->buildSearchForm($queryID, $actionURL);
$sort = $orderBy;
if(strpos($sort, 'rawID_') !== false) $sort = str_replace('rawID_', 'id_', $sort);
if(strpos($sort, 'nameCol_') !== false) $sort = str_replace('nameCol_', 'name_', $sort);
$this->view->title = $this->lang->execution->allExecutions;
$this->view->executionStats = $this->execution->getStatData(0, $status, $productID, 0, false, $queryID, $orderBy, $pager);
$this->view->executionStats = $this->execution->getStatData(0, $status, $productID, 0, false, $queryID, $sort, $pager);
$this->view->productList = $this->loadModel('product')->getProductPairsByProject(0);
$this->view->productID = $productID;
$this->view->pager = $pager;
+2
View File
@@ -91,6 +91,8 @@ dtable
set::customCols(true),
set::footToolbar($footToolbar),
set::onRenderCell(jsRaw('window.onRenderCell')),
set::orderBy($orderBy),
set::sortLink(createLink('execution', 'all', "status={$status}&orderBy={name}_{sortType}&productID={$productID}&param=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&page={$pager->pageID}")),
set::footPager(usePager(array
(
'linkCreator' => helper::createLink('execution', 'all', "status={$status}&orderBy={$orderBy}&productID={$productID}&param=$param&recTotal={recTotal}&recPerPage={recPerPage}&page={page}")