예제 #1
0
파일: DashBoard.php 프로젝트: hguru/224Civi
 function &petitionActionLinks()
 {
     if (!isset(self::$_petitionActionLinks)) {
         self::$_petitionActionLinks = self::surveyActionLinks();
         self::$_petitionActionLinks[CRM_Core_Action::UPDATE] = array('name' => ts('Edit'), 'url' => 'civicrm/petition/add', 'qs' => 'action=update&id=%%id%%&reset=1', 'title' => ts('Update Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::DISABLE] = array('name' => ts('Disable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'enable-disable' . '\',\'' . NULL . '\',\'' . 'petition_row' . '\' );"', 'ref' => 'disable-action', 'title' => ts('Disable Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::ENABLE] = array('name' => ts('Enable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'disable-enable' . '\',\'' . NULL . '\',\'' . 'petition_row' . '\' );"', 'ref' => 'enable-action', 'title' => ts('Enable Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::DELETE] = array('name' => ts('Delete'), 'url' => 'civicrm/petition/add', 'qs' => 'action=delete&id=%%id%%&reset=1', 'title' => ts('Delete Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::PROFILE] = array('name' => ts('Sign'), 'url' => 'civicrm/petition/sign', 'qs' => 'sid=%%id%%&reset=1', 'title' => ts('Sign Petition'), 'fe' => TRUE);
         self::$_petitionActionLinks[CRM_Core_Action::BROWSE] = array('name' => ts('Signatures'), 'url' => 'civicrm/activity/search', 'qs' => 'survey=%%id%%&force=1', 'title' => ts('List the signatures'));
     }
     return self::$_petitionActionLinks;
 }
예제 #2
0
 /**
  * @return array
  */
 public static function petitionActionLinks()
 {
     if (!isset(self::$_petitionActionLinks)) {
         self::$_petitionActionLinks = self::surveyActionLinks();
         self::$_petitionActionLinks[CRM_Core_Action::UPDATE] = array('name' => ts('Edit'), 'url' => 'civicrm/petition/add', 'qs' => 'action=update&id=%%id%%&reset=1', 'title' => ts('Update Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::DISABLE] = array('name' => ts('Disable'), 'ref' => 'crm-enable-disable', 'title' => ts('Disable Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::ENABLE] = array('name' => ts('Enable'), 'ref' => 'crm-enable-disable', 'title' => ts('Enable Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::DELETE] = array('name' => ts('Delete'), 'url' => 'civicrm/petition/add', 'qs' => 'action=delete&id=%%id%%&reset=1', 'title' => ts('Delete Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::PROFILE] = array('name' => ts('Sign'), 'url' => 'civicrm/petition/sign', 'qs' => 'sid=%%id%%&reset=1', 'title' => ts('Sign Petition'), 'fe' => TRUE);
         self::$_petitionActionLinks[CRM_Core_Action::BROWSE] = array('name' => ts('Signatures'), 'url' => 'civicrm/activity/search', 'qs' => 'survey=%%id%%&force=1', 'title' => ts('List the signatures'));
     }
     return self::$_petitionActionLinks;
 }
예제 #3
0
 function &surveyActionLinks($activityType = null)
 {
     // check if variable _actionsLinks is populated
     if (!isset(self::$_surveyActionLinks)) {
         self::$_surveyActionLinks = array(CRM_Core_Action::UPDATE => array('name' => ts('Edit'), 'url' => 'civicrm/survey/add', 'qs' => 'action=update&id=%%id%%&reset=1', 'title' => ts('Update Survey')), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'enable-disable' . '\' );"', 'ref' => 'disable-action', 'title' => ts('Disable Survey')), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'disable-enable' . '\' );"', 'ref' => 'enable-action', 'title' => ts('Enable Survey')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/survey/add', 'qs' => 'action=delete&id=%%id%%&reset=1', 'title' => ts('Delete Survey')));
         self::$_petitionActionLinks = self::$_surveyActionLinks;
         self::$_petitionActionLinks[CRM_Core_Action::UPDATE] = array('name' => ts('Edit'), 'url' => 'civicrm/petition/add', 'qs' => 'action=update&id=%%id%%&reset=1', 'title' => ts('Update Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::DISABLE] = array('name' => ts('Disable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'enable-disable' . '\' );"', 'ref' => 'disable-action', 'title' => ts('Disable Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::ENABLE] = array('name' => ts('Enable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Campaign_BAO_Survey' . '\',\'' . 'disable-enable' . '\' );"', 'ref' => 'enable-action', 'title' => ts('Enable Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::DELETE] = array('name' => ts('Delete'), 'url' => 'civicrm/petition/add', 'qs' => 'action=delete&id=%%id%%&reset=1', 'title' => ts('Delete Petition'));
         self::$_petitionActionLinks[CRM_Core_Action::PROFILE] = array('name' => ts('Sign'), 'url' => 'civicrm/petition/sign', 'qs' => 'sid=%%id%%&reset=1', 'title' => ts('Sign Petition'));
         //CRM_Core_Action::PROFILE is used because there isn't a specific action for sign
         self::$_petitionActionLinks[CRM_Core_Action::BROWSE] = array('name' => ts('Signatures'), 'url' => 'civicrm/activity/search', 'qs' => 'survey=%%id%%&force=1', 'title' => ts('List the signatures'));
         //CRM_Core_Action::PROFILE is used because there isn't a specific action for sign
     }
     if ($activityType == "Petition") {
         return self::$_petitionActionLinks;
     }
     return self::$_surveyActionLinks;
 }