From 18868771966dee4c97530a482ac2599ce6916feb Mon Sep 17 00:00:00 2001 From: ElisDN Date: Tue, 18 Mar 2014 23:06:51 +0400 Subject: [PATCH 1/3] Render gridview table footer after table body --- framework/grid/GridView.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/grid/GridView.php b/framework/grid/GridView.php index c923fef184..1639ca07a1 100644 --- a/framework/grid/GridView.php +++ b/framework/grid/GridView.php @@ -241,8 +241,8 @@ class GridView extends BaseListView $this->renderCaption(), $this->renderColumnGroup(), $this->showHeader ? $this->renderTableHeader() : false, - $this->showFooter ? $this->renderTableFooter() : false, $this->renderTableBody(), + $this->showFooter ? $this->renderTableFooter() : false, ]); return Html::tag('table', implode("\n", $content), $this->tableOptions); From a615ef944a036c159ea3346592479a4c002b2181 Mon Sep 17 00:00:00 2001 From: ElisDN Date: Sat, 19 Apr 2014 12:24:51 +0400 Subject: [PATCH 2/3] Fixed GridView cells calling order --- framework/grid/GridView.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/framework/grid/GridView.php b/framework/grid/GridView.php index 1639ca07a1..e0ab90e0ac 100644 --- a/framework/grid/GridView.php +++ b/framework/grid/GridView.php @@ -237,12 +237,17 @@ class GridView extends BaseListView */ public function renderItems() { + $caption = $this->renderCaption(); + $columnGroup = $this->renderColumnGroup(); + $tableHeader = $this->showHeader ? $this->renderTableHeader() : false; + $tableBody = $this->renderTableBody(); + $tableFooter = $this->showFooter ? $this->renderTableFooter() : false; $content = array_filter([ - $this->renderCaption(), - $this->renderColumnGroup(), - $this->showHeader ? $this->renderTableHeader() : false, - $this->renderTableBody(), - $this->showFooter ? $this->renderTableFooter() : false, + $caption, + $columnGroup, + $tableHeader, + $tableFooter, + $tableBody, ]); return Html::tag('table', implode("\n", $content), $this->tableOptions); From 8e48dcaa4e2a948f73c4aef4d9ef21d58379a0c8 Mon Sep 17 00:00:00 2001 From: ElisDN Date: Sat, 19 Apr 2014 14:43:16 +0400 Subject: [PATCH 3/3] Updated CHANGELOG --- framework/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 536a9e5054..6f54eacaf3 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -5,6 +5,7 @@ Yii Framework 2 Change Log -------------------------- - Bug #2563: Theming is not working if the path map of the theme contains ".." or "." in the paths (qiangxue) +- Bug #2801: Fixed the issue that GridView gets footer content before data cells content (ElisDN) - Bug #3042: `yii\widgets\Pjax` should end application right after it finishes responding to a pjax request (qiangxue) - Bug #3066: `yii\db\mssql\Schema::getTableSchema()` should return null when the table does not exist (qiangxue) - Bug #3091: Fixed inconsistent treatment of `Widget::run()` when a widget is used as a container and as a self-contained object (qiangxue)