$contactActivities[$activityId]['source_contact'] = $values['source_contact_name'];
}
elseif ($values['source_contact_id']) {
- $contactActivities[$activityId]['source_contact'] = CRM_Utils_System::href($values['source_contact_name'], 'civicrm/contact/view', "reset=1&cid={$values['source_contact_id']}");
+ $contactActivities[$activityId]['source_contact'] = CRM_Utils_System::href($values['source_contact_name'],
+ 'civicrm/contact/view', "reset=1&cid={$values['source_contact_id']}");
}
else {
$contactActivities[$activityId]['source_contact'] = '<em>n/a</em>';
}
if (isset($values['mailingId']) && !empty($values['mailingId'])) {
- $contactActivities[$activityId]['target_contact'] = CRM_Utils_System::href($values['recipients'], 'civicrm/mailing/report', "mid={$values['source_record_id']}&reset=1&cid={$params['contact_id']}&context=activitySelector");
+ $contactActivities[$activityId]['target_contact'] = CRM_Utils_System::href($values['recipients'],
+ 'civicrm/mailing/report/event',
+ "mid={$values['source_record_id']}&reset=1&event=queue&cid={$params['contact_id']}&context=activitySelector");
}
elseif (CRM_Utils_Array::value('recipients', $values)) {
$contactActivities[$activityId]['target_contact'] = $values['recipients'];
$contactActivities[$activityId]['target_contact'] = '';
foreach ($values['target_contact_name'] as $tcID => $tcName) {
if ($tcID && $count < 5) {
- $contactActivities[$activityId]['target_contact'] .= CRM_Utils_System::href($tcName, 'civicrm/contact/view', "reset=1&cid={$tcID}");
+ $contactActivities[$activityId]['target_contact'] .= CRM_Utils_System::href($tcName,
+ 'civicrm/contact/view', "reset=1&cid={$tcID}");
$count++;
if ($count) {
$contactActivities[$activityId]['target_contact'] .= "; ";
$contactMailings[$mailingId]['subject'] = $values['subject'];
$contactMailings[$mailingId]['start_date'] = CRM_Utils_Date::customFormat($values['start_date']);
$contactMailings[$mailingId]['recipients'] = CRM_Utils_System::href(ts('(recipients)'), 'civicrm/mailing/report/event',
- "mid={$values['mailing_id']}&reset=1&cid={$params['contact_id']}&event=delivered&context=mailing");
+ "mid={$values['mailing_id']}&reset=1&cid={$params['contact_id']}&event=queue&context=mailing");
$contactMailings[$mailingId]['mailing_creator'] = CRM_Utils_System::href(
$values['creator_name'],
'civicrm/contact/view',
//assign backurl
$context = CRM_Utils_Request::retrieve('context', 'String', $this);
- if ($context == 'mailing') {
+ if ($context == 'activitySelector') {
+ $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
+ $backUrl = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$cid}&selectedChild=activity");
+ $backUrlTitle = ts('Back to Activities');
+ }
+ elseif ($context == 'mailing') {
$cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
$backUrl = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$cid}&selectedChild=mailing");
$backUrlTitle = ts('Back to Mailing');
buildMailingContact();
function buildMailingContact() {
- var columns = '';
var sourceUrl = {/literal}'{crmURL p="civicrm/ajax/contactmailing" h=0 q="contact_id=$contactId"}'{literal};
var ZeroRecordText = {/literal}'{ts escape="js"}No mailings found{/ts}.'{literal};
"aoColumns": [
{sClass: 'crm-mailing-contact-subject'},
{sClass: 'crm-mailing-contact_created'},
- {sClass: 'crm-contact-activity_contact'},
+ {sClass: 'crm-contact-activity_contact', bSortable:false},
{sClass: 'crm-mailing-contact-date'},
{sClass: 'crm-mailing_openstats', bSortable:false},
{sClass: 'crm-mailing-contact-links', bSortable: false}
CRM.confirm( ''
,{
- title: ts('Change Activity Status'),
+ title: ts('Email Message'),
message: o,
width : "680px", // don't remove px
height: "560"