mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-19 07:50:39 +08:00
hide summary when empty.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user