From 183a0bfaef4cb48d70cfe9f9540c4aa0a58dc443 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Sun, 10 Nov 2013 21:20:15 -0500 Subject: [PATCH] hide summary when empty. --- framework/yii/widgets/BaseListView.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/yii/widgets/BaseListView.php b/framework/yii/widgets/BaseListView.php index ec9c1cb..4c4e5a4 100644 --- a/framework/yii/widgets/BaseListView.php +++ b/framework/yii/widgets/BaseListView.php @@ -147,6 +147,9 @@ abstract class BaseListView extends Widget public function renderSummary() { $count = $this->dataProvider->getCount(); + if ($count <= 0) { + return ''; + } if (($pagination = $this->dataProvider->getPagination()) !== false) { $totalCount = $this->dataProvider->getTotalCount(); $begin = $pagination->getPage() * $pagination->pageSize + 1;