From: Kurund Jalmi Date: Thu, 2 May 2013 05:24:49 +0000 (-0700) Subject: worked on CRM-12357 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5a99d2405a538038daaece345a21672146cf2784;p=civicrm-core.git worked on CRM-12357 --- diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index b77628b9ef..26174f8b6d 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -2401,14 +2401,17 @@ INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id AND grp.n $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'] = 'n/a'; } 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']; @@ -2421,7 +2424,8 @@ INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id AND grp.n $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'] .= "; "; diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 86ffa343ce..4adf608537 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -2767,7 +2767,7 @@ AND m.id = %1 $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', diff --git a/CRM/Mailing/Page/Event.php b/CRM/Mailing/Page/Event.php index 201924a3a4..7630e8067a 100644 --- a/CRM/Mailing/Page/Event.php +++ b/CRM/Mailing/Page/Event.php @@ -68,7 +68,12 @@ class CRM_Mailing_Page_Event extends CRM_Core_Page { //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'); diff --git a/templates/CRM/Mailing/Page/Tab.tpl b/templates/CRM/Mailing/Page/Tab.tpl index ecc040c23c..1807a0e569 100644 --- a/templates/CRM/Mailing/Page/Tab.tpl +++ b/templates/CRM/Mailing/Page/Tab.tpl @@ -46,7 +46,6 @@ 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}; @@ -58,7 +57,7 @@ "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} @@ -101,7 +100,7 @@ CRM.confirm( '' ,{ - title: ts('Change Activity Status'), + title: ts('Email Message'), message: o, width : "680px", // don't remove px height: "560"