public static function campaignActionLinks() {
// check if variable _actionsLinks is populated
if (!isset(self::$_campaignActionLinks)) {
public static function campaignActionLinks() {
// check if variable _actionsLinks is populated
if (!isset(self::$_campaignActionLinks)) {
'name' => ts('Edit'),
'url' => 'civicrm/campaign/add',
'qs' => 'reset=1&action=update&id=%%id%%',
'title' => ts('Update Campaign'),
'name' => ts('Edit'),
'url' => 'civicrm/campaign/add',
'qs' => 'reset=1&action=update&id=%%id%%',
'title' => ts('Update Campaign'),
'name' => ts('Disable'),
'title' => ts('Disable Campaign'),
'ref' => 'crm-enable-disable',
'name' => ts('Disable'),
'title' => ts('Disable Campaign'),
'ref' => 'crm-enable-disable',
'name' => ts('Enable'),
'title' => ts('Enable Campaign'),
'ref' => 'crm-enable-disable',
'name' => ts('Enable'),
'title' => ts('Enable Campaign'),
'ref' => 'crm-enable-disable',
'name' => ts('Delete'),
'url' => 'civicrm/campaign/add',
'qs' => 'action=delete&reset=1&id=%%id%%',
'title' => ts('Delete Campaign'),
'name' => ts('Delete'),
'url' => 'civicrm/campaign/add',
'qs' => 'action=delete&reset=1&id=%%id%%',
'title' => ts('Delete Campaign'),
public static function surveyActionLinks() {
// check if variable _actionsLinks is populated
if (!isset(self::$_surveyActionLinks)) {
public static function surveyActionLinks() {
// check if variable _actionsLinks is populated
if (!isset(self::$_surveyActionLinks)) {
'name' => ts('Edit'),
'url' => 'civicrm/survey/configure/main',
'qs' => 'action=update&id=%%id%%&reset=1',
'title' => ts('Update Survey'),
'name' => ts('Edit'),
'url' => 'civicrm/survey/configure/main',
'qs' => 'action=update&id=%%id%%&reset=1',
'title' => ts('Update Survey'),
'name' => ts('Disable'),
'ref' => 'crm-enable-disable',
'title' => ts('Disable Survey'),
'name' => ts('Disable'),
'ref' => 'crm-enable-disable',
'title' => ts('Disable Survey'),
'name' => ts('Enable'),
'ref' => 'crm-enable-disable',
'title' => ts('Enable Survey'),
'name' => ts('Enable'),
'ref' => 'crm-enable-disable',
'title' => ts('Enable Survey'),
'name' => ts('Delete'),
'url' => 'civicrm/survey/delete',
'qs' => 'id=%%id%%&reset=1',
'title' => ts('Delete Survey'),
'name' => ts('Delete'),
'url' => 'civicrm/survey/delete',
'qs' => 'id=%%id%%&reset=1',
'title' => ts('Delete Survey'),
public static function petitionActionLinks() {
if (!isset(self::$_petitionActionLinks)) {
self::$_petitionActionLinks = self::surveyActionLinks();
public static function petitionActionLinks() {
if (!isset(self::$_petitionActionLinks)) {
self::$_petitionActionLinks = self::surveyActionLinks();
'name' => ts('Edit'),
'url' => 'civicrm/petition/add',
'qs' => 'action=update&id=%%id%%&reset=1',
'title' => ts('Update Petition'),
'name' => ts('Edit'),
'url' => 'civicrm/petition/add',
'qs' => 'action=update&id=%%id%%&reset=1',
'title' => ts('Update Petition'),
'name' => ts('Disable'),
'ref' => 'crm-enable-disable',
'title' => ts('Disable Petition'),
'name' => ts('Disable'),
'ref' => 'crm-enable-disable',
'title' => ts('Disable Petition'),
'name' => ts('Enable'),
'ref' => 'crm-enable-disable',
'title' => ts('Enable Petition'),
'name' => ts('Enable'),
'ref' => 'crm-enable-disable',
'title' => ts('Enable Petition'),
'name' => ts('Delete'),
'url' => 'civicrm/petition/add',
'qs' => 'action=delete&id=%%id%%&reset=1',
'title' => ts('Delete Petition'),
'name' => ts('Delete'),
'url' => 'civicrm/petition/add',
'qs' => 'action=delete&id=%%id%%&reset=1',
'title' => ts('Delete Petition'),
'name' => ts('Sign'),
'url' => 'civicrm/petition/sign',
'qs' => 'sid=%%id%%&reset=1',
'title' => ts('Sign Petition'),
'fe' => TRUE,
//CRM_Core_Action::PROFILE is used because there isn't a specific action for sign
'name' => ts('Sign'),
'url' => 'civicrm/petition/sign',
'qs' => 'sid=%%id%%&reset=1',
'title' => ts('Sign Petition'),
'fe' => TRUE,
//CRM_Core_Action::PROFILE is used because there isn't a specific action for sign
'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
'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
$config = CRM_Core_Config::singleton();
$campaignType = CRM_Campaign_PseudoConstant::campaignType();
$campaignStatus = CRM_Campaign_PseudoConstant::campaignStatus();
$config = CRM_Core_Config::singleton();
$campaignType = CRM_Campaign_PseudoConstant::campaignType();
$campaignStatus = CRM_Campaign_PseudoConstant::campaignStatus();
foreach ($campaigns as $cmpid => $campaign) {
foreach ($properties as $prop) {
$campaignsData[$cmpid][$prop] = CRM_Utils_Array::value($prop, $campaign);
foreach ($campaigns as $cmpid => $campaign) {
foreach ($properties as $prop) {
$campaignsData[$cmpid][$prop] = CRM_Utils_Array::value($prop, $campaign);
$surveysData[$sid]['campaign'] = CRM_Utils_Array::value($campaignId, $campaigns);
$surveysData[$sid]['activity_type'] = $surveyType[$survey['activity_type_id']];
if (!empty($survey['release_frequency'])) {
$surveysData[$sid]['campaign'] = CRM_Utils_Array::value($campaignId, $campaigns);
$surveysData[$sid]['activity_type'] = $surveyType[$survey['activity_type_id']];
if (!empty($survey['release_frequency'])) {
- $surveysData[$sid]['release_frequency'] = ts('1 Day', array('plural' => '%count Days', 'count' => $survey['release_frequency']));
+ $surveysData[$sid]['release_frequency'] = ts('1 Day', ['plural' => '%count Days', 'count' => $survey['release_frequency']]);
'campaign' => ts('Campaigns'),
'survey' => ts('Surveys'),
'petition' => ts('Petitions'),
'campaign' => ts('Campaigns'),
'survey' => ts('Surveys'),
'petition' => ts('Petitions'),
}
CRM_Core_Resources::singleton()
->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js', 1, 'html-header')
}
CRM_Core_Resources::singleton()
->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js', 1, 'html-header')
'active' => strtolower(CRM_Utils_Array::value('subPage', $_GET, 'campaign')),
'active' => strtolower(CRM_Utils_Array::value('subPage', $_GET, 'campaign')),
}
$allTabs['campaign']['class'] = 'livePage';
$this->assign('tabHeader', $allTabs);
}
$allTabs['campaign']['class'] = 'livePage';
$this->assign('tabHeader', $allTabs);