Merge pull request #70 from creative-commoners/pulls/4.0/vendorise

NEW Install module to the vendor folder
This commit is contained in:
Daniel Hensby 2017-10-12 11:27:00 +01:00 committed by GitHub
commit c15b550b2f
2 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "silverstripe/contentreview",
"type": "silverstripe-module",
"type": "silverstripe-vendormodule",
"description": "Flags pages for periodical author review (incl. reporting)",
"homepage": "http://silverstripe.org",
"license": "BSD-3-Clause",
@ -20,6 +20,7 @@
}
],
"require": {
"silverstripe/vendor-plugin": "^1.0",
"silverstripe/framework": "^4@dev",
"silverstripe/cms": "^4@dev",
"silverstripe/reports": "^4@dev",
@ -38,7 +39,10 @@
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
}
},
"expose": [
"client/dist"
]
},
"autoload": {
"psr-4": {

View File

@ -166,9 +166,8 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
return;
}
$module = ModuleLoader::getModule('silverstripe/contentreview');
Requirements::css($module->getRelativeResourcePath('client/dist/styles/contentreview.css'));
Requirements::javascript($module->getRelativeResourcePath('client/dist/js/contentreview.js'));
Requirements::css('silverstripe/contentreview:client/dist/styles/contentreview.css');
Requirements::javascript('silverstripe/contentreview:client/dist/js/contentreview.js');
$reviewTab = LiteralField::create('ContentReviewButton', $this->owner->renderWith(__CLASS__ . '_button'));
$actions->insertAfter('MajorActions', $reviewTab);