worked on CRM-12357
authorKurund Jalmi <kurund@civicrm.org>
Thu, 2 May 2013 05:24:49 +0000 (22:24 -0700)
committerKurund Jalmi <kurund@civicrm.org>
Thu, 2 May 2013 05:24:49 +0000 (22:24 -0700)
CRM/Activity/BAO/Activity.php
CRM/Mailing/BAO/Mailing.php
CRM/Mailing/Page/Event.php
templates/CRM/Mailing/Page/Tab.tpl

index b77628b9efe67fc2391ae6365f68383f138c4d48..26174f8b6d897d2faf278e965d16ecd04f49c975 100644 (file)
@@ -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'] = '<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'];
@@ -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'] .= ";&nbsp;";
index 86ffa343ce2995736212d1ad3383f703a018aba4..4adf608537d2147292ea43f18e7f989d4ad775bc 100644 (file)
@@ -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',
index 201924a3a4bee8923224ab7078e1648fdf8caa8d..7630e8067aa82fd2cb21271b2ec1c1b7130168fa 100644 (file)
@@ -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');
index ecc040c23cca1ebeebbd48c6fe61e7d9018ef71f..1807a0e569858ee8200cb75e6d5ebe60bf362e85 100644 (file)
@@ -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}
 
         CRM.confirm( ''
           ,{
-            title: ts('Change Activity Status'),
+            title: ts('Email Message'),
             message: o,
             width : "680px", // don't remove px
             height: "560"