Merge commit '9feee011cf35edacba8198eec0e267d3552c1bab' into develop

Conflicts:
	composer.json
This commit is contained in:
Damian Mooyman 2015-02-07 12:38:29 +13:00
commit ab3b72e27b
3 changed files with 15 additions and 8 deletions

View File

@ -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());
} }
} }

View File

@ -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();
}
} }

View File

@ -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": [