X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCase%2FBAO%2FCase.php;h=089a5ae665ed695781dc6eb3644e3f012b4a7167;hb=0558143313697ef74e71e517f4365026a9284082;hp=ae76dc5b8b9cd4db903a04ddb0440f164e7602da;hpb=992fa840d8ba027c64fc1a46c77d6b288337222b;p=civicrm-core.git
diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php
index ae76dc5b8b..089a5ae665 100644
--- a/CRM/Case/BAO/Case.php
+++ b/CRM/Case/BAO/Case.php
@@ -1244,7 +1244,8 @@ SELECT case_status.label AS case_status, status_id, case_type.label AS case_type
//check for view activity.
$subject = (empty($dao->subject)) ? '(' . ts('no subject') . ')' : $dao->subject;
if ($allowView) {
- $subject = '' . $subject . '';
+ $url = CRM_Utils_System::url('civicrm/case/activity/view', array('cid' => $contactID, 'aid' => $dao->id));
+ $subject = '';
}
$values[$dao->id]['subject'] = $subject;
@@ -1260,34 +1261,33 @@ SELECT case_status.label AS case_status, status_id, case_type.label AS case_type
$values[$dao->id]['reporter'] .= ' / ' . ts('(multiple)');
}
}
+ // FIXME: Why are we not using CRM_Core_Action for these links? This is too much manual work and likely to get out-of-sync with core markup.
$url = "";
+ $css = 'class="action-item crm-hover-button"';
$additionalUrl = "&id={$dao->id}";
if (!$dao->deleted) {
//hide edit link of activity type email.CRM-4530.
if (!in_array($dao->type, $emailActivityTypeIDs)) {
//hide Edit link if activity type is NOT editable (special case activities).CRM-5871
if ($allowEdit) {
- $url = '' . ts('Edit') . ' ';
+ $url = '' . ts('Edit') . ' ';
}
}
if ($allowDelete) {
- if (!empty($url)) {
- $url .= " | ";
- }
- $url .= '' . ts('Delete') . '';
+ $url .= ' ' . ts('Delete') . '';
}
}
elseif (!$caseDeleted) {
- $url = '' . ts('Restore') . '';
+ $url = ' ' . ts('Restore') . '';
$values[$dao->id]['status'] = $values[$dao->id]['status'] . '
(deleted)';
}
//check for operations.
if (self::checkPermission($dao->id, 'Move To Case', $dao->activity_type_id)) {
- $url .= " | " . '' . ts('Move To Case') . ' ';
+ $url .= ' ' . ts('Move To Case') . ' ';
}
if (self::checkPermission($dao->id, 'Copy To Case', $dao->activity_type_id)) {
- $url .= " | " . '' . ts('Copy To Case') . ' ';
+ $url .= ' ' . ts('Copy To Case') . ' ';
}
// if there are file attachments we will return how many and, if only one, add a link to it
if (!empty($dao->attachment_ids)) {
@@ -1302,7 +1302,7 @@ SELECT case_status.label AS case_status, status_id, case_type.label AS case_type
NULL,
FALSE
);
- $url .= " | " . "" . ts('View Attachment') . ' ';
+ $url .= " ";
}
}
@@ -1757,9 +1757,8 @@ SELECT case_status.label AS case_status, status_id, case_type.label AS case_type
$groupInfo['id'] = $results['id'];
$groupInfo['title'] = $results['title'];
$params = array(array('group', 'IN', array($groupInfo['id'] => 1), 0, 0));
- $return = array('sort_name' => 1, 'display_name' => 1, 'email' => 1, 'phone' => 1);
$return = array('contact_id' => 1, 'sort_name' => 1, 'display_name' => 1, 'email' => 1, 'phone' => 1);
- list($globalContacts, $_) = CRM_Contact_BAO_Query::apiQuery($params, $return, NULL, $sort, $offset, $rowCount, TRUE, $returnOnlyCount);
+ list($globalContacts) = CRM_Contact_BAO_Query::apiQuery($params, $return, NULL, $sort, $offset, $rowCount, TRUE, $returnOnlyCount);
if ($returnOnlyCount) {
return $globalContacts;
@@ -1767,7 +1766,7 @@ SELECT case_status.label AS case_status, status_id, case_type.label AS case_type
if ($showLinks) {
foreach ($globalContacts as $idx => $contact) {
- $globalContacts[$idx]['sort_name'] = '' . $contact['sort_name'] . '';
+ $globalContacts[$idx]['sort_name'] = '' . $contact['sort_name'] . '';
}
}
}
@@ -2231,7 +2230,7 @@ INNER JOIN civicrm_case_contact ON ( civicrm_case.id = civicrm_case_contact.cas
if (!$doFilterCases || array_key_exists($dao->id, $filterCases)) {
$caseViewStr = "reset=1&id={$dao->id}&cid={$dao->client_id}&action=view&context=case&selectedChild=case";
$caseViewUrl = CRM_Utils_System::url("civicrm/contact/view/case", $caseViewStr);
- $caseView = "" . ts('View Case') . "";
+ $caseView = "";
}
$clientView = $dao->client_name;
if ($hasViewContact) {