Esempio n. 1
0
 /**
  * Get action Links
  *
  * @return array (reference) of action links
  */
 function &links()
 {
     if (!self::$_links) {
         self::$_links = array(CRM_Core_Action::UPDATE => array('name' => ts('Edit'), 'url' => 'civicrm/admin/options/' . self::$_gName, 'qs' => 'group=' . self::$_gName . '&action=update&id=%%id%%&reset=1', 'title' => ts('Edit %1', array(1 => self::$_gName))), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_OptionValue' . '\',\'' . 'enable-disable' . '\' );"', 'ref' => 'disable-action', 'title' => ts('Disable %1', array(1 => self::$_gName))), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_OptionValue' . '\',\'' . 'disable-enable' . '\' );"', 'ref' => 'enable-action', 'title' => ts('Enable %1', array(1 => self::$_gName))), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/admin/options/' . self::$_gName, 'qs' => 'group=' . self::$_gName . '&action=delete&id=%%id%%', 'title' => ts('Delete %1 Type', array(1 => self::$_gName))));
         if (self::$_gName == 'custom_search') {
             $runLink = array(CRM_Core_Action::FOLLOWUP => array('name' => ts('Run'), 'url' => 'civicrm/contact/search/custom', 'qs' => 'reset=1&csid=%%value%%', 'title' => ts('Run %1', array(1 => self::$_gName))));
             self::$_links = $runLink + self::$_links;
         }
     }
     return self::$_links;
 }
Esempio n. 2
0
 /**
  * Get action Links.
  *
  * @return array
  *   (reference) of action links
  */
 public function &links()
 {
     if (!self::$_links) {
         self::$_links = array(CRM_Core_Action::UPDATE => array('name' => ts('Edit'), 'url' => 'civicrm/admin/options/' . self::$_gName, 'qs' => 'action=update&id=%%id%%&reset=1', 'title' => ts('Edit %1', array(1 => self::$_gName))), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'ref' => 'crm-enable-disable', 'title' => ts('Disable %1', array(1 => self::$_gName))), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'ref' => 'crm-enable-disable', 'title' => ts('Enable %1', array(1 => self::$_gName))), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/admin/options/' . self::$_gName, 'qs' => 'action=delete&id=%%id%%', 'title' => ts('Delete %1 Type', array(1 => self::$_gName))));
         if (self::$_gName == 'custom_search') {
             $runLink = array(CRM_Core_Action::FOLLOWUP => array('name' => ts('Run'), 'url' => 'civicrm/contact/search/custom', 'qs' => 'reset=1&csid=%%value%%', 'title' => ts('Run %1', array(1 => self::$_gName)), 'class' => 'no-popup'));
             self::$_links = $runLink + self::$_links;
         }
     }
     return self::$_links;
 }