mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
FIX Remove coupling from SiteTree to campaign admin module
Add to Campaign button is now in an extension in the campaign-admin module
This commit is contained in:
parent
2533e729fc
commit
f9aeeb1d6c
@ -5,7 +5,6 @@ namespace SilverStripe\CMS\Model;
|
||||
use Page;
|
||||
use Psr\SimpleCache\CacheInterface;
|
||||
use SilverStripe\Assets\Shortcodes\FileLinkTracking;
|
||||
use SilverStripe\CampaignAdmin\AddToCampaignHandler_FormAction;
|
||||
use SilverStripe\CMS\Controllers\CMSPageEditController;
|
||||
use SilverStripe\CMS\Controllers\ContentController;
|
||||
use SilverStripe\CMS\Controllers\ModelAsController;
|
||||
@ -33,7 +32,6 @@ use SilverStripe\Forms\FormAction;
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\Forms\GridField\GridFieldDataColumns;
|
||||
use SilverStripe\Forms\GridField\GridFieldLazyLoader;
|
||||
use SilverStripe\Forms\GridField\GridFieldSortableHeader;
|
||||
use SilverStripe\Forms\HTMLEditor\HTMLEditorField;
|
||||
use SilverStripe\Forms\LiteralField;
|
||||
use SilverStripe\Forms\OptionsetField;
|
||||
@ -2278,15 +2276,6 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
||||
)
|
||||
);
|
||||
|
||||
// Add to campaign option if not-archived and has publish permission
|
||||
if (($isPublished || $isOnDraft) && $canPublish) {
|
||||
$moreOptions->push(
|
||||
AddToCampaignHandler_FormAction::create()
|
||||
->removeExtraClass('btn-primary')
|
||||
->addExtraClass('btn-secondary')
|
||||
);
|
||||
}
|
||||
|
||||
// "readonly"/viewing version that isn't the current version of the record
|
||||
/** @var SiteTree $stageRecord */
|
||||
$stageRecord = Versioned::get_by_stage(static::class, Versioned::DRAFT)->byID($this->ID);
|
||||
|
Loading…
x
Reference in New Issue
Block a user