'url' => 'civicrm/mailing/approve',
'qs' => 'mid=%%mid%%&reset=1',
'title' => ts('Approve/Reject Mailing'),
+ 'weight' => -50,
],
CRM_Core_Action::VIEW => [
'name' => ts('Report'),
'url' => 'civicrm/mailing/report',
'qs' => 'mid=%%mid%%&reset=1',
'title' => ts('View Mailing Report'),
+ 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::VIEW),
],
CRM_Core_Action::DISABLE => [
'name' => ts('Cancel'),
'qs' => 'action=disable&mid=%%mid%%&reset=1',
'extra' => 'onclick="if (confirm(\'' . $cancelExtra . '\')) this.href+=\'&confirmed=1\'; else return false;"',
'title' => ts('Cancel Mailing'),
+ 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DISABLE),
],
CRM_Core_Action::PREVIEW => [
'name' => ts('Continue'),
'url' => 'civicrm/mailing/send',
'qs' => 'mid=%%mid%%&continue=true&reset=1',
'title' => ts('Continue Mailing'),
+ 'weight' => 50,
],
CRM_Core_Action::UPDATE => [
'name' => ts('Copy'),
'url' => 'civicrm/mailing/send',
'qs' => 'mid=%%mid%%&reset=1',
'title' => ts('Copy Mailing'),
+ 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::UPDATE),
],
CRM_Core_Action::DELETE => [
'name' => ts('Delete'),
'qs' => 'action=delete&mid=%%mid%%&reset=1',
'extra' => 'onclick="if (confirm(\'' . $deleteExtra . '\')) this.href+=\'&confirmed=1\'; else return false;"',
'title' => ts('Delete Mailing'),
+ 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::DELETE),
],
CRM_Core_Action::RENEW => [
'name' => ts('Archive'),
'qs' => 'action=renew&mid=%%mid%%&reset=1',
'extra' => 'onclick="if (confirm(\'' . $archiveExtra . '\')) this.href+=\'&confirmed=1\'; else return false;"',
'title' => ts('Archive Mailing'),
+ 'weight' => 110,
],
CRM_Core_Action::REOPEN => [
'name' => ts('Resume'),
'url' => 'civicrm/mailing/browse',
'qs' => 'action=reopen&mid=%%mid%%&reset=1',
'title' => ts('Resume mailing'),
+ 'weight' => 120,
],
CRM_Core_Action::CLOSE => [
'name' => ts('Pause'),
'url' => 'civicrm/mailing/browse',
'qs' => 'action=close&mid=%%mid%%&reset=1',
'title' => ts('Pause mailing'),
+ 'weight' => CRM_Core_Action::getWeight(CRM_Core_Action::BROWSE),
],
];
}
$actionLinks[CRM_Core_Action::PREVIEW]['url'] = 'civicrm/sms/send';
}
- if (!($row['status'] == 'Not scheduled') && !$row['sms_provider_id']) {
+ if (!($row['status'] === 'Not scheduled') && !$row['sms_provider_id']) {
if ($allAccess || $showCreateLinks) {
$actionMask = CRM_Core_Action::VIEW;
}
) {
$actionMask |= CRM_Core_Action::DISABLE;
- if ($row['status'] == "Paused") {
+ if ($row['status'] === "Paused") {
$actionMask |= CRM_Core_Action::REOPEN;
}
else {
$actionMask |= CRM_Core_Action::CLOSE;
}
}
- if ($row['status'] == 'Scheduled' &&
+ if ($row['status'] === 'Scheduled' &&
empty($row['approval_status_id'])
) {
if ($workFlow && ($allAccess || $showApprovalLinks)) {
'qs' => 'id=%%hashOrMid%%&reset=1',
'title' => ts('Public View'),
'fe' => TRUE,
+ 'weight' => 150,
];
$actionMask |= CRM_Core_Action::BROWSE;
}
'mid' => $row['id'],
'hashOrMid' => $hash ?: $row['id'],
],
- "more",
+ 'more',
FALSE,
$opString,
"Mailing",