gridview header/footer fix

This commit is contained in:
Aleksandr Zelenin
2014-02-09 21:14:33 +04:00
parent 67b8d6cd66
commit 4583c17923

View File

@ -279,13 +279,14 @@ class GridView extends BaseListView
/** @var Column $column */
$cells[] = $column->renderHeaderCell();
}
$content = implode('', $cells);
$content = Html::tag('tr', implode('', $cells), $this->headerRowOptions);
if ($this->filterPosition == self::FILTER_POS_HEADER) {
$content = $this->renderFilters() . $content;
} elseif ($this->filterPosition == self::FILTER_POS_BODY) {
$content .= $this->renderFilters();
}
return "<thead>\n" . Html::tag('tr', $content, $this->headerRowOptions) . "\n</thead>";
return "<thead>\n" . $content . "\n</thead>";
}
/**
@ -299,11 +300,11 @@ class GridView extends BaseListView
/** @var Column $column */
$cells[] = $column->renderFooterCell();
}
$content = implode('', $cells);
$content = Html::tag('tr', implode('', $cells), $this->footerRowOptions);
if ($this->filterPosition == self::FILTER_POS_FOOTER) {
$content .= $this->renderFilters();
}
return "<tfoot>\n" . Html::tag('tr', $content, $this->footerRowOptions) . "\n</tfoot>";
return "<tfoot>\n" . $content . "\n</tfoot>";
}
/**