/** * Get action Links * * @return array (reference) of action links */ function &links() { if (!self::$_actionLinks) { // helper variable for nicer formatting $copyExtra = ts('Are you sure you want to make a copy of this Event?'); $deleteExtra = ts('Are you sure you want to delete this Event?'); self::$_actionLinks = array(CRM_Core_Action::UPDATE => array('name' => ts('Configure'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'action=update&id=%%id%%&reset=1', 'title' => ts('Configure Event')), CRM_Core_Action::PREVIEW => array('name' => ts('Test-drive'), 'url' => 'civicrm/event/info', 'qs' => 'reset=1&action=preview&id=%%id%%', 'title' => ts('Preview')), CRM_Core_Action::FOLLOWUP => array('name' => ts('Live Page'), 'url' => 'civicrm/event/info', 'qs' => 'reset=1&id=%%id%%', 'title' => ts('FollowUp')), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Event_BAO_Event' . '\',\'' . 'enable-disable' . '\' );"', 'ref' => 'disable-action', 'title' => ts('Disable Event')), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Event_BAO_Event' . '\',\'' . 'disable-enable' . '\' );"', 'ref' => 'enable-action', 'title' => ts('Enable Event')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'action=delete&id=%%id%%', 'extra' => 'onclick = "return confirm(\'' . $deleteExtra . '\');"', 'title' => ts('Delete Event')), CRM_Core_Action::COPY => array('name' => ts('Copy Event'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'reset=1&action=copy&id=%%id%%', 'extra' => 'onclick = "return confirm(\'' . $copyExtra . '\');"', 'title' => ts('Copy Event'))); } return self::$_actionLinks; }
/** * Get action Links. * * @return array * (reference) of action links */ public function &links() { if (!self::$_actionLinks) { // helper variable for nicer formatting $copyExtra = ts('Are you sure you want to make a copy of this Event?'); $deleteExtra = ts('Are you sure you want to delete this Event?'); self::$_actionLinks = array(CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'ref' => 'crm-enable-disable', 'title' => ts('Disable Event')), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'ref' => 'crm-enable-disable', 'title' => ts('Enable Event')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'action=delete&id=%%id%%', 'extra' => 'onclick = "return confirm(\'' . $deleteExtra . '\');"', 'title' => ts('Delete Event')), CRM_Core_Action::COPY => array('name' => ts('Copy'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'reset=1&action=copy&id=%%id%%', 'extra' => 'onclick = "return confirm(\'' . $copyExtra . '\');"', 'title' => ts('Copy Event'))); } return self::$_actionLinks; }