Esempio n. 1
0
 /**
  * Get the action links for this page.
  *
  * @return array
  */
 public function &actionLinks()
 {
     // check if variable _actionsLinks is populated
     if (!isset(self::$_actionLinks)) {
         // helper variable for nicer formatting
         $deleteExtra = ts('Are you sure you want to delete this Contribution page?');
         $copyExtra = ts('Are you sure you want to make a copy of this Contribution page?');
         self::$_actionLinks = array(CRM_Core_Action::COPY => array('name' => ts('Make a Copy'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'action=copy&gid=%%id%%', 'title' => ts('Make a Copy of CiviCRM Contribution Page'), 'extra' => 'onclick = "return confirm(\'' . $copyExtra . '\');"'), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'title' => ts('Disable'), 'ref' => 'crm-enable-disable'), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'ref' => 'crm-enable-disable', 'title' => ts('Enable')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'action=delete&reset=1&id=%%id%%', 'title' => ts('Delete Custom Field'), 'extra' => 'onclick = "return confirm(\'' . $deleteExtra . '\');"'));
     }
     return self::$_actionLinks;
 }
Esempio n. 2
0
 /**
  * Get the action links for this page.
  *
  * @return array $_actionLinks
  *
  */
 function &actionLinks()
 {
     // check if variable _actionsLinks is populated
     if (!isset(self::$_actionLinks)) {
         // helper variable for nicer formatting
         $deleteExtra = ts('Are you sure you want to delete this Contribution page?');
         $copyExtra = ts('Are you sure you want to make a copy of this Contribution page?');
         self::$_actionLinks = array(CRM_Core_Action::UPDATE => array('name' => ts('Configure'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'reset=1&action=update&id=%%id%%', 'title' => ts('Configure')), CRM_Core_Action::PREVIEW => array('name' => ts('Test-drive'), 'url' => 'civicrm/contribute/transact', 'qs' => 'reset=1&action=preview&id=%%id%%', 'title' => ts('Preview')), CRM_Core_Action::FOLLOWUP => array('name' => ts('Live Page'), 'url' => 'civicrm/contribute/transact', 'qs' => 'reset=1&id=%%id%%', 'title' => ts('FollowUp')), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'title' => ts('Disable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contribute_BAO_ContributionPage' . '\',\'' . 'enable-disable' . '\' );"', 'ref' => 'disable-action'), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Contribute_BAO_ContributionPage' . '\',\'' . 'disable-enable' . '\' );"', 'ref' => 'enable-action', 'title' => ts('Enable')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'action=delete&reset=1&id=%%id%%', 'title' => ts('Delete Custom Field'), 'extra' => 'onclick = "return confirm(\'' . $deleteExtra . '\');"'), CRM_Core_Action::COPY => array('name' => ts('Copy Contribution Page'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'action=copy&gid=%%id%%', 'title' => ts('Make a Copy of CiviCRM Contribution Page'), 'extra' => 'onclick = "return confirm(\'' . $copyExtra . '\');"'));
     }
     return self::$_actionLinks;
 }