mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
FIX GridField state was being removed when the config was removed
This commit is contained in:
parent
c31a45497d
commit
0e408712a5
@ -8,21 +8,11 @@
|
||||
*
|
||||
* @author Michael Strong <github@michaelstrong.co.uk>
|
||||
**/
|
||||
class GridFieldConfig_BlogPost extends GridFieldConfig {
|
||||
class GridFieldConfig_BlogPost extends GridFieldConfig_Lumberjack {
|
||||
|
||||
public function __construct($itemsPerPage = null) {
|
||||
parent::__construct($itemsPerPage);
|
||||
$this->addComponent(new GridFieldButtonRow('before'));
|
||||
$this->addComponent(new GridFieldSiteTreeAddNewButton('buttons-before-left'));
|
||||
$this->addComponent(new GridFieldToolbarHeader());
|
||||
$this->addComponent(new GridFieldSortableHeader());
|
||||
$this->addComponent(new GridFieldFilterHeader());
|
||||
$this->addComponent(new GridFieldDataColumns());
|
||||
$this->removeComponentsByType('SiteTreeEditButton');
|
||||
$this->addComponent(new GridFieldSiteTreeEditButton());
|
||||
$this->addComponent(new GridFieldPageCount('toolbar-header-right'));
|
||||
$this->addComponent($pagination = new GridFieldPaginator($itemsPerPage));
|
||||
$this->addComponent(new GridFieldBlogPostState());
|
||||
|
||||
$pagination->setThrowExceptionOnBadDataType(true);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user