$params['sort'] = CRM_Utils_Array::value('sortBy', $params);
$params['caseId'] = NULL;
$context = CRM_Utils_Array::value('context', $params);
+ $showContactOverlay = !CRM_Utils_String::startsWith($context,"dashlet");
// Get contact activities.
$activities = CRM_Activity_BAO_Activity::getActivities($params);
$activity['source_contact_name'] = $values['source_contact_name'];
}
elseif ($values['source_contact_id']) {
- $srcTypeImage = CRM_Contact_BAO_Contact_Utils::getImage(
- CRM_Contact_BAO_Contact::getContactType($values['source_contact_id']),
- FALSE,
- $values['source_contact_id']
- );
+ $srcTypeImage = "";
+ if ($showContactOverlay) {
+ $srcTypeImage = CRM_Contact_BAO_Contact_Utils::getImage(
+ CRM_Contact_BAO_Contact::getContactType($values['source_contact_id']),
+ FALSE,
+ $values['source_contact_id']);
+ }
$activity['source_contact_name'] = $srcTypeImage . CRM_Utils_System::href($values['source_contact_name'],
'civicrm/contact/view', "reset=1&cid={$values['source_contact_id']}");
}
elseif (isset($values['target_contact_counter']) && $values['target_contact_counter']) {
$activity['target_contact_name'] = '';
foreach ($values['target_contact_name'] as $tcID => $tcName) {
- $targetTypeImage = CRM_Contact_BAO_Contact_Utils::getImage(
- CRM_Contact_BAO_Contact::getContactType($tcID),
- FALSE,
- $tcID
- );
+ $targetTypeImage = "";
+ if ($showContactOverlay) {
+ $targetTypeImage = CRM_Contact_BAO_Contact_Utils::getImage(
+ CRM_Contact_BAO_Contact::getContactType($tcID),
+ FALSE,
+ $tcID);
+ }
$targetLink = CRM_Utils_System::href($tcName, 'civicrm/contact/view', "reset=1&cid={$tcID}");
$activity['target_contact_name'] .= "<div>$targetTypeImage $targetLink</div>";
}
$activity['assignee_contact_name'] = '';
foreach ($values['assignee_contact_name'] as $acID => $acName) {
if ($acID && $count < 5) {
- $assigneeTypeImage = CRM_Contact_BAO_Contact_Utils::getImage(
- CRM_Contact_BAO_Contact::getContactType($acID),
- FALSE,
- $acID
- );
+ $assigneeTypeImage = "";
+ if ($showContactOverlay) {
+ $assigneeTypeImage = CRM_Contact_BAO_Contact_Utils::getImage(
+ CRM_Contact_BAO_Contact::getContactType($acID),
+ FALSE,
+ $acID);
+ }
$assigneeLink = CRM_Utils_System::href($acName, 'civicrm/contact/view', "reset=1&cid={$acID}");
$activity['assignee_contact_name'] .= "<div>$assigneeTypeImage $assigneeLink";
$count++;