/** * @return mixed */ public function getBetterButtonsActions() { $f = parent::getBetterButtonsActions(); if (!$this->Featured) { $f->push(BetterButtonCustomAction::create('setasfeatured', 'Set as the featured video')->setRedirectType(BetterButtonCustomAction::REFRESH)); } else { $f->push(BetterButtonCustomAction::create('unsetasfeatured', 'Unmark as featured video')->setRedirectType(BetterButtonCustomAction::REFRESH)); } return $f; }
public function getBetterButtonsActions() { $fields = parent::getBetterButtonsActions(); if ($this->SourceID || $this->MP3ID || $this->OGGID) { $fields->push($bbact = BetterButtonCustomAction::create('transcode', _t('Transcodable.TranscodeSource', 'Transcode (missing) formats'))); // $bbact->setRedirectType(BetterButtonCustomAction::REFRESH) // ->setSuccessMessage('Denied for publication'); } return $fields; }
public function updateBetterButtonsActions($fields) { if ($this->owner->UserSubmissionHolder() && $this->owner->ID) { $page = $this->owner->UserSubmissionPage(); if ((!$page || !$page->exists()) && $this->owner->canApprove()) { $approveText = $this->owner->config()->make_approve_action_publish ? 'Approve and Publish Page' : 'Approve and Create Draft Page'; $fields->push(BetterButtonCustomAction::create('approve', $approveText)); } } }
/** * @return FieldList */ public function getBetterButtonsActions() { $fields = parent::getBetterButtonsActions(); $fields->push(BetterButtonCustomAction::create('sendPreview', 'Send Preview to Me')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Sent to ' . Member::currentUser()->Email)); if (!$this->SentAt) { $fields->push(BetterButtonCustomAction::create('send', 'Send to List')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Sent to mailing list.')); } else { $fields->push(BetterButtonCustomAction::create('duplicateEmail', 'Duplicate')->setRedirectType(BetterButtonCustomAction::GOBACK)->setSuccessMessage('Mailing was duplicated.')); } return $fields; }
public function getBetterButtonsActions() { $fields = parent::getBetterButtonsActions(); if (!$this->getRecord()) { return $fields; } if ($this->getRecord()->ContentNotifierApproved) { $fields->push(BetterButtonCustomAction::create('deny', 'Deny')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Denied for publication')); } else { $fields->push(BetterButtonCustomAction::create('approve', 'Approve')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Approved for publication')); } $fields->push(new BetterButtonLink('Edit this ' . $this->RecordClass, $this->getRecord()->getContentNotifierLink())); return $fields; }
public function getBetterButtonsActions() { $fields = parent::getBetterButtonsActions(); if ($this->IsApproved) { $fields->push(BetterButtonCustomAction::create('deny', 'Deny')->setRedirectType(BetterButtonCustomAction::REFRESH)); } else { $fields->push(BetterButtonCustomAction::create('approve', 'Approve')->setRedirectType(BetterButtonCustomAction::REFRESH)); } if ($this->IsApproved && $this->IsApproved) { $fields->push(new BetterButtonLink_TargetWindow('View Post on site', $this->getPublishedBlogLink())); $fields->push(new BetterButtonLink('View In CMS', $this->getCMSEditLink())); } return $fields; }
public function getBetterButtonsActions() { $f = parent::getBetterButtonsActions(); if (Director::isDev() && Permission::check('ADMIN')) { $f->push(new DropdownFormAction('Dev tools', [new BetterButtonNestedForm('forcephase', 'Force phase...', FieldList::create(DropdownField::create('Phase', 'Choose a phase', [0 => 'ACCEPTING SUBMISSIONS', 1 => 'COMMUNITY VOTING', 2 => 'TRACK CHAIR SELECTION', 3 => 'REGISTRATION', 4 => 'SUMMIT IS ON']))), BetterButtonCustomAction::create('resetvotes', 'Reset presentation votes')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('All votes have been reset'), BetterButtonCustomAction::create('setasactive', 'Set as active')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Summit is now active')])); } return $f; }
public function getBetterButtonsActions() { $extension = $this->owner->getExtensionInstance("BetterButtonDataObject"); if (is_null($extension)) { return; } $extension->owner = $this->owner; $f = $extension->getBetterButtonsActions(); if (Director::isDev() && Permission::check('ADMIN')) { $f->push(new DropdownFormAction('Dev tools', [new BetterButtonNestedForm('forcephase', 'Force phase...', FieldList::create(DropdownField::create('Phase', 'Choose a phase', [0 => 'ACCEPTING SUBMISSIONS', 1 => 'COMMUNITY VOTING', 2 => 'TRACK CHAIR SELECTION', 3 => 'REGISTRATION', 4 => 'SUMMIT IS ON']))), BetterButtonCustomAction::create('resetvotes', 'Reset presentation votes')->setRedirectType(BetterButtonCustomAction::REFRESH), BetterButtonCustomAction::create('setasactive', 'Set as active')->setRedirectType(BetterButtonCustomAction::REFRESH)])); } $text = $this->owner->RandomVotingLists()->exists() ? "Regenerate random voting order" : "Generate random voting order"; $f->push($random = BetterButtonCustomAction::create('handlevotinglists', $text)->setRedirectType(BetterButtonCustomAction::REFRESH)); if (!$this->owner->checkRange("Voting")) { $random->setConfirmation('You are randomising the presentations outside of the voting phase. If there are more presentations coming, this could cause errors. Are you sure you want to do this?'); } return $f; }
public function getBetterButtonsActions() { $f = parent::getBetterButtonsActions(); $f->push(BetterButtonCustomAction::create('testemail', 'Send a test')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Test email sent to ' . $this->TestEmailAddress)); return $f; }
/** * Gets a list of actions for the ModelAdmin interface * @return FieldList */ public function getBetterButtonsActions() { $fields = parent::getBetterButtonsActions(); $fields->push(BetterButtonCustomAction::create('resend', 'Resend')->setRedirectType(BetterButtonCustomAction::REFRESH)); return $fields; }
public function getBetterButtonsActions() { $f = parent::getBetterButtonsActions(); $f->push(BetterButtonCustomAction::create('testemail', 'Send a test')->setRedirectType(BetterButtonCustomAction::REFRESH)); return $f; }
public function getBetterButtonsUtils() { $fields = parent::getBetterButtonsUtils(); $fields->push(BetterButtonCustomAction::create('getTags', 'Get ID3 Tags')->setRedirectType(BetterButtonCustomAction::REFRESH)); return $fields; }