提交 8201ca85 编写于 作者: T Terry

apphtml5评论的toolbar分页

上级 c3ff6e87
...@@ -27,6 +27,7 @@ class CategoryController extends AppfrontController ...@@ -27,6 +27,7 @@ class CategoryController extends AppfrontController
// 分类页面。 // 分类页面。
public function actionIndex() public function actionIndex()
{ {
echo date('Y-m-d H:i:s');
$data = $this->getBlock()->getLastData(); $data = $this->getBlock()->getLastData();
if(is_array($data)){ if(is_array($data)){
return $this->render($this->action->id, $data); return $this->render($this->action->id, $data);
......
...@@ -23,7 +23,7 @@ class Lists ...@@ -23,7 +23,7 @@ class Lists
public $filterBySpu = true; public $filterBySpu = true;
public $filterOrderBy = 'review_date'; public $filterOrderBy = 'review_date';
public $_page = 'p'; public $_page = 'p';
public $numPerPage = 20; public $numPerPage = 10;
public $pageNum; public $pageNum;
/** /**
* 为了可以使用rewriteMap,use 引入的文件统一采用下面的方式,通过Yii::mapGet()得到className和Object * 为了可以使用rewriteMap,use 引入的文件统一采用下面的方式,通过Yii::mapGet()得到className和Object
...@@ -48,6 +48,7 @@ class Lists ...@@ -48,6 +48,7 @@ class Lists
protected function getProductPage($countTotal) protected function getProductPage($countTotal)
{ {
if ($countTotal <= $this->numPerPage) { if ($countTotal <= $this->numPerPage) {
echo "$countTotal <= $this->numPerPage";
return ''; return '';
} }
$config = [ $config = [
......
...@@ -1042,8 +1042,11 @@ ul#billing_address_list li input , ul#billing_address_list li select{ ...@@ -1042,8 +1042,11 @@ ul#billing_address_list li input , ul#billing_address_list li select{
text-decoration: line-through; text-decoration: line-through;
} }
.pageToolbar {margin: 10px auto;
width: 80%;}
.pageToolbar label{font-size:0.6rem;float:left;}
.pageToolbar .tb_rg{float:left;}
......
...@@ -117,8 +117,10 @@ ...@@ -117,8 +117,10 @@
<?php if($pageToolBar): ?> <?php if($pageToolBar): ?>
<div class="pageToolbar"> <div class="pageToolbar">
<label class="title"><?= Yii::$service->page->translate->__('Page:');?></label><?= $pageToolBar ?> <label class=""><?= Yii::$service->page->translate->__('Page:');?></label>
</div> <?= $pageToolBar ?>
<div class="clear"></div>
</div>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> </div>
......
...@@ -58,8 +58,10 @@ ...@@ -58,8 +58,10 @@
</tbody> </tbody>
</table> </table>
<?php if($pageToolBar): ?> <?php if($pageToolBar): ?>
<div class="pageToolbar"> <div class="pageToolbar customer_order">
<label class="title"><?= Yii::$service->page->translate->__('Page:');?></label><?= $pageToolBar ?> <label class=""><?= Yii::$service->page->translate->__('Page:');?></label>
<?= $pageToolBar ?>
<div class="clear"></div>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
......
...@@ -70,7 +70,9 @@ use fecshop\app\apphtml5\helper\Format; ...@@ -70,7 +70,9 @@ use fecshop\app\apphtml5\helper\Format;
</table> </table>
<?php if($pageToolBar): ?> <?php if($pageToolBar): ?>
<div class="pageToolbar"> <div class="pageToolbar">
<label class="title"><?= Yii::$service->page->translate->__('Page:');?></label><?= $pageToolBar ?> <label class=""><?= Yii::$service->page->translate->__('Page:');?></label>
<?= $pageToolBar ?>
<div class="clear"></div>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
......
...@@ -9,17 +9,17 @@ ...@@ -9,17 +9,17 @@
?> ?>
<div class="tb_rg"> <div class="tb_rg">
<?php if($prevPage): ?> <?php if($prevPage): ?>
<a href="<?= $prevPage['url']['url'] ?>"><</a> <a external href="<?= $prevPage['url']['url'] ?>"><</a>
<?php else: ?> <?php else: ?>
<span><</span> <span><</span>
<?php endif; ?> <?php endif; ?>
<?php if($firstSpaceShow): ?> <?php if($firstSpaceShow): ?>
<a href="<?= $firstSpaceShow['url']['url'] ?>"><?= $firstSpaceShow['p'] ?></a> <a external href="<?= $firstSpaceShow['url']['url'] ?>"><?= $firstSpaceShow['p'] ?></a>
<?php endif; ?> <?php endif; ?>
<?= $hiddenFrontStr ?> <?= $hiddenFrontStr ?>
<?php if(!empty($frontPage )): ?> <?php if(!empty($frontPage )): ?>
<?php foreach($frontPage as $page): ?> <?php foreach($frontPage as $page): ?>
<a href="<?= $page['url']['url'] ?>"><?= $page['p'] ?></a> <a external href="<?= $page['url']['url'] ?>"><?= $page['p'] ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>
...@@ -29,16 +29,16 @@ ...@@ -29,16 +29,16 @@
<?php if(!empty($behindPage )): ?> <?php if(!empty($behindPage )): ?>
<?php foreach($behindPage as $page): ?> <?php foreach($behindPage as $page): ?>
<a href="<?= $page['url']['url'] ?>"><?= $page['p'] ?></a> <a external href="<?= $page['url']['url'] ?>"><?= $page['p'] ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>
<?= $hiddenBehindStr ?> <?= $hiddenBehindStr ?>
<?php if($lastSpaceShow): ?> <?php if($lastSpaceShow): ?>
<a href="<?= $lastSpaceShow['url']['url'] ?>"><?= $lastSpaceShow['p'] ?></a> <a external href="<?= $lastSpaceShow['url']['url'] ?>"><?= $lastSpaceShow['p'] ?></a>
<?php endif; ?> <?php endif; ?>
<?php if($nextPage): ?> <?php if($nextPage): ?>
<a href="<?= $nextPage['url']['url'] ?>">></a> <a external href="<?= $nextPage['url']['url'] ?>">></a>
<?php else: ?> <?php else: ?>
<span>></span> <span>></span>
<?php endif; ?> <?php endif; ?>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册