Skip to content

Commit

Permalink
Merge pull request yiisoft#2801 from ElisDN/gridview-footer
Browse files Browse the repository at this point in the history
Get gridview footer content after cells content
  • Loading branch information
samdark committed Apr 19, 2014
2 parents 29b9a92 + 8e48dca commit 86d747d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 10 additions & 5 deletions framework/grid/GridView.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,17 @@ protected function getClientOptions()
*/
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->showFooter ? $this->renderTableFooter() : false,
$this->renderTableBody(),
$caption,
$columnGroup,
$tableHeader,
$tableFooter,
$tableBody,
]);

return Html::tag('table', implode("\n", $content), $this->tableOptions);
Expand Down

0 comments on commit 86d747d

Please sign in to comment.