NEW Install module to the vendor folder

This commit is contained in:
Robbie Averill 2017-10-11 09:42:28 +13:00
parent 5877247972
commit b720acb705
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);