foreach ($mailings as $mailingId => $values) {
$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',
+ "mid={$values['mailing_id']}&reset=1&cid={$values['creator_id']}&context=mailing");
$contactMailings[$mailingId]['mailing_creator'] = CRM_Utils_System::href(
$values['creator_name'],
'civicrm/contact/view',
"reset=1&cid={$values['creator_id']}");
- $contactMailings[$mailingId]['links'] = CRM_Utils_System::href(
- ts('View Mailing'),
- 'civicrm/mailing/view',
- "reset=1&id={$values['mailing_id']}");
+ $actionLinks = array(
+ CRM_Core_Action::VIEW => array(
+ 'name' => ts('View'),
+ 'url' => 'civicrm/mailing/view',
+ 'qs' => "reset=1&id={$values['mailing_id']}",
+ 'title' => ts('View Mailing'),
+ 'class' => 'crm-mailing-view',
+ ),
+ CRM_Core_Action::BROWSE => array(
+ 'name' => ts('Mailing Report'),
+ 'url' => 'civicrm/mailing/report',
+ 'qs' => "mid={$values['mailing_id']}&reset=1&cid={$values['creator_id']}&context=mailing",
+ 'title' => ts('View Mailing Report'),
+ )
+ );
+
+ $contactMailings[$mailingId]['links'] = CRM_Core_Action::formLink($actionLinks);
}
return $contactMailings;
//$context = CRM_Utils_Type::escape(CRM_Utils_Array::value('context', $_GET), 'String');
$sortMapper = array(
- 0 => 'subject', 1 => 'creator_name', 2 => 'start_date', 3 => 'links',
+ 0 => 'subject', 1 => 'creator_name', 2 => 'recipients', 3 => 'start_date', 4 => 'links',
);
$sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
$iFilteredTotal = $iTotal = $params['total'];
$selectorElements = array(
- 'subject', 'mailing_creator',
+ 'subject', 'mailing_creator', 'recipients',
'start_date', 'links',
);
<thead>
<tr>
<th class='crm-mailing-contact-subject'>{ts}Subject{/ts}</th>
- <th class='crm-mailing-contact_created'>{ts}Created By{/ts}</th>
+ <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-contact-links nosort'> </th>
</tr>
"aoColumns" : [
{sClass:'crm-mailing-contact-subject'},
{sClass:'crm-mailing-contact_created'},
- {sClass:'crm-mailing-contact-date'},
+ {sClass: 'crm-contact-activity_contact'},
+ {sClass: 'crm-mailing-contact-date'},
{sClass:'crm-mailing-contact-links', bSortable:false}
],
"bProcessing": true,