$activity['target_contact_name'] = '';
foreach ($values['target_contact_name'] as $tcID => $tcName) {
$targetTypeImage = "";
+ $targetLink = CRM_Utils_System::href($tcName, 'civicrm/contact/view', "reset=1&cid={$tcID}");
if ($showContactOverlay) {
$targetTypeImage = CRM_Contact_BAO_Contact_Utils::getImage(
CRM_Contact_BAO_Contact::getContactType($tcID),
FALSE,
$tcID);
+ $activity['target_contact_name'] .= "<div>$targetTypeImage $targetLink";
+ }
+ else {
+ $activity['target_contact_name'] .= $targetLink;
}
- $targetLink = CRM_Utils_System::href($tcName, 'civicrm/contact/view', "reset=1&cid={$tcID}");
- $activity['target_contact_name'] .= "<div>$targetTypeImage $targetLink</div>";
}
if ($extraCount = $values['target_contact_counter'] - 1) {
- $activity['target_contact_name'] .= "<div>" . "(" . ts('%1 more', array(1 => $extraCount)) . ")</div>";
+ $activity['target_contact_name'] .= ";<br />" . "(" . ts('%1 more', array(1 => $extraCount)) . ")";
+ }
+ if ($showContactOverlay) {
+ $activity['target_contact_name'] .= "</div> ";
}
}
elseif (!$values['target_contact_name']) {
foreach ($values['assignee_contact_name'] as $acID => $acName) {
if ($acID && $count < 5) {
$assigneeTypeImage = "";
+ $assigneeLink = CRM_Utils_System::href($acName, 'civicrm/contact/view', "reset=1&cid={$acID}");
if ($showContactOverlay) {
$assigneeTypeImage = CRM_Contact_BAO_Contact_Utils::getImage(
CRM_Contact_BAO_Contact::getContactType($acID),
FALSE,
$acID);
+ $activity['assignee_contact_name'] .= "<div>$assigneeTypeImage $assigneeLink";
}
- $assigneeLink = CRM_Utils_System::href($acName, 'civicrm/contact/view', "reset=1&cid={$acID}");
- $activity['assignee_contact_name'] .= "<div>$assigneeTypeImage $assigneeLink";
+ else {
+ $activity['assignee_contact_name'] .= $assigneeLink;
+ }
+
$count++;
if ($count) {
- $activity['assignee_contact_name'] .= ";";
+ $activity['assignee_contact_name'] .= "; ";
+ }
+ if ($showContactOverlay) {
+ $activity['assignee_contact_name'] .= "</div> ";
}
- $activity['assignee_contact_name'] .= "</div> ";
if ($count == 4) {
$activity['assignee_contact_name'] .= "(" . ts('more') . ")";