mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge commit '9feee011cf35edacba8198eec0e267d3552c1bab' into develop
Conflicts: composer.json
This commit is contained in:
commit
ab3b72e27b
@ -12,8 +12,8 @@ class GridFieldConfig_BlogPost extends GridFieldConfig_Lumberjack {
|
|||||||
|
|
||||||
public function __construct($itemsPerPage = null) {
|
public function __construct($itemsPerPage = null) {
|
||||||
parent::__construct($itemsPerPage);
|
parent::__construct($itemsPerPage);
|
||||||
$this->removeComponentsByType('SiteTreeEditButton');
|
$this->removeComponentsByType('GridFieldSiteTreeState');
|
||||||
$this->addComponent(new GridFieldSiteTreeEditButton());
|
$this->addComponent(new GridFieldBlogPostState());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -69,11 +69,6 @@ class Blog extends Page {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$fields = parent::getCMSFields();
|
$fields = parent::getCMSFields();
|
||||||
|
|
||||||
// Ensure we're using the BlogPost GridField config and not Lumberjack's
|
|
||||||
$gridField = $fields->dataFieldByName('ChildPages');
|
|
||||||
$gridField->setConfig(GridFieldConfig_BlogPost::create());
|
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,6 +126,7 @@ class Blog extends Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This sets the title for our gridfield
|
* This sets the title for our gridfield
|
||||||
*
|
*
|
||||||
@ -140,6 +136,17 @@ class Blog extends Page {
|
|||||||
return _t('Blog.LumberjackTitle', 'Blog Posts');
|
return _t('Blog.LumberjackTitle', 'Blog Posts');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This overwrites lumberjacks default gridfield config.
|
||||||
|
*
|
||||||
|
* @return GridFieldConfig
|
||||||
|
*/
|
||||||
|
public function getLumberjackGridFieldConfig() {
|
||||||
|
return GridFieldConfig_Blog::create();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"type": "silverstripe-module",
|
"type": "silverstripe-module",
|
||||||
"require": {
|
"require": {
|
||||||
"silverstripe/cms": "^3.1.0",
|
"silverstripe/cms": "^3.1.0",
|
||||||
"silverstripe/lumberjack": "^1.0.0"
|
"silverstripe/lumberjack": "~1.1"
|
||||||
},
|
},
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
Loading…
Reference in New Issue
Block a user