This commit is contained in:
zhouxin
2022-05-11 08:13:06 +00:00
parent 5cd347ce80
commit 160c0fbcaa
2 changed files with 9 additions and 4 deletions
+6 -2
View File
@@ -1197,7 +1197,7 @@ class product extends control
* @access public
* @return void
*/
public function all($browseType = 'noclosed', $orderBy = 'order_asc', $param = 0)
public function all($browseType = 'noclosed', $orderBy = 'order_asc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Load module and set session. */
$this->loadModel('program');
@@ -1211,8 +1211,11 @@ class product extends control
$this->product->setMenu($productID);
}
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Process product structure. */
$productStats = $this->product->getStats($orderBy, '', $browseType, '', 'story', '', $queryID);
$productStats = $this->product->getStats($orderBy, $pager, $browseType, '', 'story', '', $queryID);
$productStructure = $this->product->statisticProgram($productStats);
$actionURL = $this->createLink('product', 'all', "browseType=bySearch&orderBy=order_asc&queryID=myQueryID");
@@ -1226,6 +1229,7 @@ class product extends control
$this->view->productStructure = $productStructure;
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->pager = $pager;
$this->display();
}
+3 -2
View File
@@ -222,17 +222,18 @@
<?php endforeach;?>
</tbody>
</table>
<?php if(!empty($product) and $canBatchEdit):?>
<div class='table-footer'>
<?php echo $pager->show('left', 'pagerjs');?>
<?php if(!empty($product) and $canBatchEdit):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php
$actionLink = $this->createLink('product', 'batchEdit');
echo html::commonButton($lang->edit, "data-form-action='$actionLink'");
?>
<?php endif;?>
</div>
</div>
<?php endif;?>
</form>
</div>
<?php endif;?>