X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FActivity%2FPage%2FAJAX.php;h=67c5b3442bd4e89c4855562eee52d1923619efad;hb=3b1c37fee769397d127804668dd03d03e3e8ce06;hp=f8ab3517b774866a4e315e25303f61b2bffb710b;hpb=eb13603069edaafc80571879417d376f81f84c5a;p=civicrm-core.git
diff --git a/CRM/Activity/Page/AJAX.php b/CRM/Activity/Page/AJAX.php
index f8ab3517b7..67c5b3442b 100644
--- a/CRM/Activity/Page/AJAX.php
+++ b/CRM/Activity/Page/AJAX.php
@@ -201,19 +201,10 @@ class CRM_Activity_Page_AJAX {
$hasAccessToAllCases = CRM_Core_Permission::check('access all cases and activities');
$managerRoleId = $xmlProcessor->getCaseManagerRoleId($caseTypeName);
- if (!empty($managerRoleId)) {
- $caseRoles[$managerRoleId] = $caseRoles[$managerRoleId] . '
' . '(' . ts('Case Manager') . ')';
- }
-
- $relationships = array();
foreach ($caseRelationships as $key => $value) {
- //calculate roles that don't have relationships
- if (!empty($caseRoles[$value['relation_type']])) {
- //keep naming from careRoles array
- $caseRelationships[$key]['relation'] = $caseRoles[$value['relation_type']];
- unset($caseRoles[$value['relation_type']]);
- }
+ // This role has been filled
+ unset($caseRoles[$value['relation_type']]);
// mark original case relationships record to use on setting edit links below
$caseRelationships[$key]['source'] = 'caseRel';
}
@@ -259,8 +250,11 @@ class CRM_Activity_Page_AJAX {
// set user name, email and edit columns links
foreach ($caseRelationships as $key => &$row) {
- // Get rid of the "
(Case Manager)" from label
- list($typeLabel) = explode('<', $row['relation']);
+ $typeLabel = $row['relation'];
+ // Add "
(Case Manager)" to label
+ if ($row['relation_type'] == $managerRoleId) {
+ $row['relation'] .= '
' . '(' . ts('Case Manager') . ')';
+ }
// view user links
if (!empty($row['cid'])) {
$row['name'] = '' .
+ $row['actions'] = '' .
'' .
'' .
- '' .
+ '' .
'' .
'';
break;
case 'caseRoles':
- $row['actions'] = '' .
+ $row['actions'] = '' .
'' .
'';
break;