}
}
}
- if ( $values['activity_type'] == 'Bulk Email'){
- $contactActivities[$activityId]['openstats'] = "Opens: ".
- count(CRM_Mailing_Event_BAO_Opened::getRows(
- CRM_Utils_Array::value('source_record_id', $values), NULL, FALSE, NULL, NULL, NULL, $params['contact_id']
- )
- )."<br />Clicks:" .
- count(CRM_Mailing_Event_BAO_TrackableURLOpen::getRows(
- CRM_Utils_Array::value('source_record_id', $values), NULL, FALSE, NULL, NULL, NULL, NULL, $params['contact_id']
- ) );
- }else {
- $contactActivities[$activityId]['openstats'] = '';
- }
$contactActivities[$activityId]['activity_date'] = CRM_Utils_Date::customFormat($values['activity_date_time']);
$contactActivities[$activityId]['status'] = $activityStatus[$values['status_id']];
$sortMapper = array(
0 => 'activity_type', 1 => 'subject', 2 => 'source_contact_name',
- 3 => '', 4 => '', 5 => 'activity_date_time', 6 => 'status_id',
+ 3 => '', 4 => 'activity_date_time', 5 => 'status_id',
);
$sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
$selectorElements = array(
'activity_type', 'subject', 'source_contact',
'target_contact', 'assignee_contact',
- 'activity_date', 'status', 'openstats','links', 'class',
+ 'activity_date', 'status','links', 'class',
);
echo CRM_Utils_JSON::encodeDataTableSelector($activities, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
'civicrm/contact/view',
"reset=1&cid={$values['creator_id']}");
+ $contactMailings[$mailingId]['openstats'] = "Opens: ".
+ count(CRM_Mailing_Event_BAO_Opened::getRows(
+ $values['mailing_id'], NULL, FALSE, NULL, NULL, NULL, $values['creator_id']
+ )
+ )."<br />Clicks:" .
+ count(CRM_Mailing_Event_BAO_TrackableURLOpen::getRows(
+ $values['mailing_id'], NULL, FALSE, NULL, NULL, NULL, NULL, $values['creator_id']
+ ) );
+
$actionLinks = array(
CRM_Core_Action::VIEW => array(
'name' => ts('View'),
//$context = CRM_Utils_Type::escape(CRM_Utils_Array::value('context', $_GET), 'String');
$sortMapper = array(
- 0 => 'subject', 1 => 'creator_name', 2 => 'recipients', 3 => 'start_date', 4 => 'links',
+ 0 => 'subject', 1 => 'creator_name', 2 => '', 3 => 'start_date', 4 => '', 5 => 'links',
);
$sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
$iFilteredTotal = $iTotal = $params['total'];
$selectorElements = array(
'subject', 'mailing_creator', 'recipients',
- 'start_date', 'links',
+ 'start_date', 'openstats', 'links',
);
echo CRM_Utils_JSON::encodeDataTableSelector($mailings, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
<th class='crm-contact-activity-assignee_contact nosort'>{ts}Assigned{/ts}</th>
<th class='crm-contact-activity-activity_date'>{ts}Date{/ts}</th>
<th class='crm-contact-activity-activity_status'>{ts}Status{/ts}</th>
- <th class='crm-contact-activity-activity_openstats'>{ts}Opens/ Clicks{/ts}</th>
<th class='crm-contact-activity-links nosort'> </th>
<th class='hiddenElement'> </th>
</tr>
{sClass:'crm-contact-activity-assignee_contact', bSortable:false},
{sClass:'crm-contact-activity-activity_date'},
{sClass:'crm-contact-activity-activity_status'},
- {sClass:'crm-contact-activity-activity_openstats', bSortable:false},
{sClass:'crm-contact-activity-links', bSortable:false},
{sClass:'hiddenElement', bSortable:false}
],
<th class='crm-mailing-contact_created'>{ts}Added By{/ts}</th>
<th class='crm-contact-activity_contact nosort'>{ts}With{/ts}</th>
<th class='crm-mailing-contact-date'>{ts}Date{/ts}</th>
+ <th class='crm-mailing_openstats'>{ts}Opens/ Clicks{/ts}</th>
<th class='crm-mailing-contact-links nosort'> </th>
</tr>
</thead>
{sClass: 'crm-mailing-contact_created'},
{sClass: 'crm-contact-activity_contact'},
{sClass: 'crm-mailing-contact-date'},
+ {sClass: 'crm-mailing_openstats', bSortable:false},
{sClass: 'crm-mailing-contact-links', bSortable: false}
],
"bProcessing": true,