mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
Add 'Add to campaign' button to pages
This commit is contained in:
parent
830a97a9fc
commit
69d7a3ae7d
@ -1191,6 +1191,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
return $this->getResponseNegotiator()->respond($this->getRequest());
|
return $this->getResponseNegotiator()->respond($this->getRequest());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addtocampaign($data, $form) {
|
||||||
|
$handler = new AddToCampaignHandler($form, $data);
|
||||||
|
return $handler->handle();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Batch Actions Handler
|
* Batch Actions Handler
|
||||||
*/
|
*/
|
||||||
|
@ -2075,6 +2075,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$moreOptions->push(AddToCampaignHandler_FormAction::create());
|
||||||
|
|
||||||
// "readonly"/viewing version that isn't the current version of the record
|
// "readonly"/viewing version that isn't the current version of the record
|
||||||
$stageOrLiveRecord = Versioned::get_one_by_stage($this->class, Versioned::get_stage(), array(
|
$stageOrLiveRecord = Versioned::get_one_by_stage($this->class, Versioned::get_stage(), array(
|
||||||
'"SiteTree"."ID"' => $this->ID
|
'"SiteTree"."ID"' => $this->ID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user