Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
fee14197 | 4 | | CiviCRM version 5 | |
6a488035 | 5 | +--------------------------------------------------------------------+ |
8c9251b3 | 6 | | Copyright CiviCRM LLC (c) 2004-2018 | |
6a488035 TO |
7 | +--------------------------------------------------------------------+ |
8 | | This file is a part of CiviCRM. | | |
9 | | | | |
10 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
11 | | under the terms of the GNU Affero General Public License | | |
12 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
13 | | | | |
14 | | CiviCRM is distributed in the hope that it will be useful, but | | |
15 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
16 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
17 | | See the GNU Affero General Public License for more details. | | |
18 | | | | |
19 | | You should have received a copy of the GNU Affero General Public | | |
20 | | License and the CiviCRM Licensing Exception along | | |
21 | | with this program; if not, contact CiviCRM LLC | | |
22 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
23 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
24 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
25 | +--------------------------------------------------------------------+ | |
d25dd0ee | 26 | */ |
6a488035 TO |
27 | |
28 | /** | |
29 | * | |
30 | * @package CRM | |
8c9251b3 | 31 | * @copyright CiviCRM LLC (c) 2004-2018 |
6a488035 TO |
32 | */ |
33 | ||
34 | /** | |
3819f101 | 35 | * This class is used to retrieve and display activities for a contact. |
6a488035 TO |
36 | */ |
37 | class CRM_Activity_Selector_Activity extends CRM_Core_Selector_Base implements CRM_Core_Selector_API { | |
38 | ||
39 | /** | |
100fef9d | 40 | * We use desc to remind us what that column is, name is used in the tpl |
6a488035 TO |
41 | * |
42 | * @var array | |
6a488035 TO |
43 | */ |
44 | static $_columnHeaders; | |
45 | ||
46 | /** | |
100fef9d | 47 | * ContactId - contact id of contact whose activies are displayed |
6a488035 TO |
48 | * |
49 | * @var int | |
6a488035 TO |
50 | */ |
51 | protected $_contactId; | |
52 | ||
53 | protected $_admin; | |
54 | ||
55 | protected $_context; | |
56 | ||
57 | protected $_activityTypeIDs; | |
58 | ||
59 | protected $_viewOptions; | |
60 | ||
61 | /** | |
fe482240 | 62 | * Class constructor. |
6a488035 | 63 | * |
041ab3d1 TO |
64 | * @param int $contactId |
65 | * Contact whose activities we want to display. | |
66 | * @param int $permission | |
67 | * The permission we have for this contact. | |
6a488035 | 68 | * |
dd244018 EM |
69 | * @param bool $admin |
70 | * @param string $context | |
71 | * @param null $activityTypeIDs | |
72 | * | |
73 | * @return \CRM_Activity_Selector_Activity | |
6a488035 | 74 | */ |
8d7a9d07 | 75 | public function __construct( |
9d5494f7 TO |
76 | $contactId, |
77 | $permission, | |
78 | $admin = FALSE, | |
79 | $context = 'activity', | |
80 | $activityTypeIDs = NULL) { | |
6a488035 TO |
81 | $this->_contactId = $contactId; |
82 | $this->_permission = $permission; | |
83 | $this->_admin = $admin; | |
84 | $this->_context = $context; | |
85 | $this->_activityTypeIDs = $activityTypeIDs; | |
86 | ||
87 | // get all enabled view componentc (check if case is enabled) | |
88 | $this->_viewOptions = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, | |
89 | 'contact_view_options', TRUE, NULL, TRUE | |
90 | ); | |
91 | } | |
92 | ||
93 | /** | |
94 | * This method returns the action links that are given for each search row. | |
95 | * currently the action links added for each row are | |
96 | * | |
97 | * - View | |
98 | * | |
c490a46a | 99 | * @param int $activityTypeId |
100fef9d | 100 | * @param int $sourceRecordId |
77b97be7 | 101 | * @param bool $accessMailingReport |
100fef9d | 102 | * @param int $activityId |
77b97be7 EM |
103 | * @param null $key |
104 | * @param null $compContext | |
105 | * | |
6a488035 | 106 | * @return array |
6a488035 | 107 | */ |
9d5494f7 TO |
108 | public static function actionLinks( |
109 | $activityTypeId, | |
110 | $sourceRecordId = NULL, | |
111 | $accessMailingReport = FALSE, | |
112 | $activityId = NULL, | |
113 | $key = NULL, | |
114 | $compContext = NULL) { | |
6a488035 | 115 | static $activityActTypes = NULL; |
29571f63 AS |
116 | //CRM-14277 added addtitional param to handle activity search |
117 | $extraParams = "&searchContext=activity"; | |
6a488035 | 118 | |
29571f63 | 119 | $extraParams .= ($key) ? "&key={$key}" : NULL; |
6a488035 TO |
120 | if ($compContext) { |
121 | $extraParams .= "&compContext={$compContext}"; | |
122 | } | |
123 | ||
353ffa53 | 124 | $showView = TRUE; |
6a488035 TO |
125 | $showUpdate = $showDelete = FALSE; |
126 | $qsUpdate = NULL; | |
127 | ||
128 | if (!$activityActTypes) { | |
129 | $activeActTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'name', TRUE); | |
130 | } | |
131 | $activityTypeName = CRM_Utils_Array::value($activityTypeId, $activeActTypes); | |
132 | ||
7808aae6 SB |
133 | // CRM-7607 |
134 | // Lets allow to have normal operation for only activity types. | |
135 | // When activity type is disabled or no more exists give only delete. | |
6a488035 TO |
136 | switch ($activityTypeName) { |
137 | case 'Event Registration': | |
66526669 | 138 | case 'Change Registration': |
6a488035 TO |
139 | $url = 'civicrm/contact/view/participant'; |
140 | $qsView = "action=view&reset=1&id={$sourceRecordId}&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
141 | break; | |
142 | ||
143 | case 'Contribution': | |
144 | $url = 'civicrm/contact/view/contribution'; | |
145 | $qsView = "action=view&reset=1&id={$sourceRecordId}&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
146 | break; | |
147 | ||
66526669 PJ |
148 | case 'Payment': |
149 | case 'Refund': | |
150 | $participantId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_ParticipantPayment', $sourceRecordId, 'participant_id', 'contribution_id'); | |
151 | if (!empty($participantId)) { | |
152 | $url = 'civicrm/contact/view/participant'; | |
153 | $qsView = "action=view&reset=1&id={$participantId}&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
154 | } | |
155 | break; | |
156 | ||
6a488035 TO |
157 | case 'Membership Signup': |
158 | case 'Membership Renewal': | |
159 | case 'Change Membership Status': | |
160 | case 'Change Membership Type': | |
161 | $url = 'civicrm/contact/view/membership'; | |
162 | $qsView = "action=view&reset=1&id={$sourceRecordId}&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
163 | break; | |
164 | ||
165 | case 'Pledge Reminder': | |
166 | case 'Pledge Acknowledgment': | |
167 | $url = 'civicrm/contact/view/activity'; | |
168 | $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
169 | break; | |
170 | ||
171 | case 'Email': | |
172 | case 'Bulk Email': | |
353ffa53 | 173 | $url = 'civicrm/activity/view'; |
6a488035 TO |
174 | $delUrl = 'civicrm/activity'; |
175 | $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
176 | if ($activityTypeName == 'Email') { | |
177 | $showDelete = TRUE; | |
178 | } | |
179 | break; | |
180 | ||
181 | case 'Inbound Email': | |
182 | $url = 'civicrm/contact/view/activity'; | |
183 | $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
ee90a98c CR |
184 | |
185 | if (CRM_Core_Permission::check('edit inbound email basic information') | |
186 | || CRM_Core_Permission::check('edit inbound email basic information and content') | |
187 | ) { | |
188 | $showDelete = $showUpdate = TRUE; | |
189 | $qsUpdate = "atype={$activityTypeId}&action=update&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
190 | } | |
6a488035 TO |
191 | break; |
192 | ||
193 | case 'Open Case': | |
194 | case 'Change Case Type': | |
195 | case 'Change Case Status': | |
196 | case 'Change Case Start Date': | |
197 | $showUpdate = $showDelete = FALSE; | |
353ffa53 TO |
198 | $url = 'civicrm/activity'; |
199 | $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
200 | $qsUpdate = "atype={$activityTypeId}&action=update&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
6a488035 TO |
201 | break; |
202 | ||
203 | default: | |
353ffa53 | 204 | $url = 'civicrm/activity'; |
6a488035 | 205 | $showView = $showDelete = $showUpdate = TRUE; |
353ffa53 | 206 | $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; |
6a488035 TO |
207 | $qsUpdate = "atype={$activityTypeId}&action=update&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; |
208 | ||
7808aae6 | 209 | // When type is not available lets hide view and update. |
6a488035 TO |
210 | if (empty($activityTypeName)) { |
211 | $showView = $showUpdate = FALSE; | |
212 | } | |
213 | break; | |
214 | } | |
215 | ||
216 | $qsDelete = "atype={$activityTypeId}&action=delete&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
217 | ||
218 | $actionLinks = array(); | |
219 | ||
220 | if ($showView) { | |
353ffa53 TO |
221 | $actionLinks += array( |
222 | CRM_Core_Action:: | |
223 | VIEW => array( | |
224 | 'name' => ts('View'), | |
225 | 'url' => $url, | |
226 | 'qs' => $qsView, | |
227 | 'title' => ts('View Activity'), | |
8d7a9d07 | 228 | ), |
353ffa53 | 229 | ); |
6a488035 TO |
230 | } |
231 | ||
232 | if ($showUpdate) { | |
233 | $updateUrl = 'civicrm/activity/add'; | |
234 | if ($activityTypeName == 'Email') { | |
235 | $updateUrl = 'civicrm/activity/email/add'; | |
236 | } | |
237 | elseif ($activityTypeName == 'Print PDF Letter') { | |
238 | $updateUrl = 'civicrm/activity/pdf/add'; | |
239 | } | |
481a74f4 | 240 | if (CRM_Activity_BAO_Activity::checkPermission($activityId, CRM_Core_Action::UPDATE)) { |
353ffa53 TO |
241 | $actionLinks += array( |
242 | CRM_Core_Action:: | |
243 | UPDATE => array( | |
244 | 'name' => ts('Edit'), | |
245 | 'url' => $updateUrl, | |
246 | 'qs' => $qsUpdate, | |
247 | 'title' => ts('Update Activity'), | |
8d7a9d07 | 248 | ), |
353ffa53 | 249 | ); |
bbfeec41 | 250 | } |
6a488035 TO |
251 | } |
252 | ||
253 | if ( | |
254 | $activityTypeName && | |
255 | CRM_Case_BAO_Case::checkPermission($activityId, 'File On Case', $activityTypeId) | |
256 | ) { | |
353ffa53 TO |
257 | $actionLinks += array( |
258 | CRM_Core_Action:: | |
259 | ADD => array( | |
260 | 'name' => ts('File on Case'), | |
261 | 'url' => '#', | |
262 | 'extra' => 'onclick="javascript:fileOnCase( \'file\', \'%%id%%\', null, this ); return false;"', | |
263 | 'title' => ts('File on Case'), | |
8d7a9d07 | 264 | ), |
353ffa53 | 265 | ); |
6a488035 TO |
266 | } |
267 | ||
268 | if ($showDelete) { | |
269 | if (!isset($delUrl) || !$delUrl) { | |
270 | $delUrl = $url; | |
271 | } | |
353ffa53 TO |
272 | $actionLinks += array( |
273 | CRM_Core_Action:: | |
274 | DELETE => array( | |
275 | 'name' => ts('Delete'), | |
276 | 'url' => $delUrl, | |
277 | 'qs' => $qsDelete, | |
278 | 'title' => ts('Delete Activity'), | |
8d7a9d07 | 279 | ), |
353ffa53 | 280 | ); |
6a488035 TO |
281 | } |
282 | ||
283 | if ($accessMailingReport) { | |
353ffa53 TO |
284 | $actionLinks += array( |
285 | CRM_Core_Action:: | |
286 | BROWSE => array( | |
287 | 'name' => ts('Mailing Report'), | |
288 | 'url' => 'civicrm/mailing/report', | |
289 | 'qs' => "mid={$sourceRecordId}&reset=1&cid=%%cid%%&context=activitySelector", | |
290 | 'title' => ts('View Mailing Report'), | |
8d7a9d07 | 291 | ), |
353ffa53 | 292 | ); |
6a488035 TO |
293 | } |
294 | ||
295 | return $actionLinks; | |
296 | } | |
297 | ||
298 | /** | |
100fef9d | 299 | * Getter for array of the parameters required for creating pager. |
6a488035 | 300 | * |
da6b46f4 | 301 | * @param $action |
c490a46a | 302 | * @param array $params |
6a488035 | 303 | */ |
00be9182 | 304 | public function getPagerParams($action, &$params) { |
353ffa53 | 305 | $params['status'] = ts('Activities %%StatusMessage%%'); |
6a488035 | 306 | $params['csvString'] = NULL; |
353ffa53 | 307 | $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT; |
6a488035 TO |
308 | |
309 | $params['buttonTop'] = 'PagerTopButton'; | |
310 | $params['buttonBottom'] = 'PagerBottomButton'; | |
311 | } | |
312 | ||
313 | /** | |
100fef9d | 314 | * Returns the column headers as an array of tuples: |
6a488035 TO |
315 | * (name, sortName (key to the sort array)) |
316 | * | |
041ab3d1 TO |
317 | * @param string $action |
318 | * The action being performed. | |
3f8d2862 | 319 | * @param string $output |
041ab3d1 | 320 | * What should the result set include (web/email/csv). |
6a488035 | 321 | * |
a6c01b45 CW |
322 | * @return array |
323 | * the column headers that need to be displayed | |
6a488035 | 324 | */ |
00be9182 | 325 | public function &getColumnHeaders($action = NULL, $output = NULL) { |
6a488035 TO |
326 | if ($output == CRM_Core_Selector_Controller::EXPORT || $output == CRM_Core_Selector_Controller::SCREEN) { |
327 | $csvHeaders = array(ts('Activity Type'), ts('Description'), ts('Activity Date')); | |
328 | foreach (self::_getColumnHeaders() as $column) { | |
329 | if (array_key_exists('name', $column)) { | |
330 | $csvHeaders[] = $column['name']; | |
331 | } | |
332 | } | |
333 | return $csvHeaders; | |
334 | } | |
335 | else { | |
336 | return self::_getColumnHeaders(); | |
337 | } | |
338 | } | |
339 | ||
340 | /** | |
341 | * Returns total number of rows for the query. | |
342 | * | |
041ab3d1 TO |
343 | * @param string $action |
344 | * Action being performed. | |
6a488035 | 345 | * |
fd31fa4c EM |
346 | * @param null $case |
347 | * | |
a6c01b45 CW |
348 | * @return int |
349 | * Total number of rows | |
6a488035 | 350 | */ |
00be9182 | 351 | public function getTotalCount($action, $case = NULL) { |
6a488035 TO |
352 | $params = array( |
353 | 'contact_id' => $this->_contactId, | |
354 | 'admin' => $this->_admin, | |
355 | 'caseId' => $case, | |
356 | 'context' => $this->_context, | |
357 | 'activity_type_id' => $this->_activityTypeIDs, | |
358 | 'offset' => 0, | |
359 | 'rowCount' => 0, | |
360 | 'sort' => NULL, | |
361 | ); | |
6ab43e1b | 362 | return CRM_Activity_BAO_Activity::deprecatedGetActivitiesCount($params); |
6a488035 TO |
363 | } |
364 | ||
365 | /** | |
fe482240 | 366 | * Returns all the rows in the given offset and rowCount. |
6a488035 | 367 | * |
3f8d2862 | 368 | * @param string $action |
041ab3d1 TO |
369 | * The action being performed. |
370 | * @param int $offset | |
371 | * The row number to start from. | |
372 | * @param int $rowCount | |
373 | * The number of rows to return. | |
374 | * @param string $sort | |
375 | * The sql string that describes the sort order. | |
3f8d2862 | 376 | * @param string $output |
041ab3d1 | 377 | * What should the result set include (web/email/csv). |
2a6da8d7 EM |
378 | * |
379 | * @param null $case | |
6a488035 | 380 | * |
a6c01b45 CW |
381 | * @return int |
382 | * the total number of rows for this action | |
6a488035 | 383 | */ |
00be9182 | 384 | public function &getRows($action, $offset, $rowCount, $sort, $output = NULL, $case = NULL) { |
6a488035 TO |
385 | $params = array( |
386 | 'contact_id' => $this->_contactId, | |
387 | 'admin' => $this->_admin, | |
388 | 'caseId' => $case, | |
389 | 'context' => $this->_context, | |
390 | 'activity_type_id' => $this->_activityTypeIDs, | |
391 | 'offset' => $offset, | |
392 | 'rowCount' => $rowCount, | |
393 | 'sort' => $sort, | |
394 | ); | |
395 | $config = CRM_Core_Config::singleton(); | |
550e5b1a | 396 | $rows = CRM_Activity_BAO_Activity::deprecatedGetActivities($params); |
6a488035 TO |
397 | |
398 | if (empty($rows)) { | |
399 | return $rows; | |
400 | } | |
401 | ||
402 | $activityStatus = CRM_Core_PseudoConstant::activityStatus(); | |
403 | ||
404 | $engagementLevels = CRM_Campaign_PseudoConstant::engagementLevel(); | |
405 | ||
7808aae6 | 406 | // CRM-4418 |
6a488035 TO |
407 | $permissions = array($this->_permission); |
408 | if (CRM_Core_Permission::check('delete activities')) { | |
409 | $permissions[] = CRM_Core_Permission::DELETE; | |
410 | } | |
411 | $mask = CRM_Core_Action::mask($permissions); | |
412 | ||
413 | foreach ($rows as $k => $row) { | |
414 | $row = &$rows[$k]; | |
415 | ||
416 | // DRAFTING: provide a facility for db-stored strings | |
417 | // localize the built-in activity names for display | |
418 | // (these are not enums, so we can't use any automagic here) | |
419 | switch ($row['activity_type']) { | |
420 | case 'Meeting': | |
421 | $row['activity_type'] = ts('Meeting'); | |
422 | break; | |
423 | ||
424 | case 'Phone Call': | |
425 | $row['activity_type'] = ts('Phone Call'); | |
426 | break; | |
427 | ||
428 | case 'Email': | |
429 | $row['activity_type'] = ts('Email'); | |
430 | break; | |
431 | ||
432 | case 'SMS': | |
433 | $row['activity_type'] = ts('SMS'); | |
434 | break; | |
435 | ||
436 | case 'Event': | |
437 | $row['activity_type'] = ts('Event'); | |
438 | break; | |
439 | } | |
440 | ||
441 | // add class to this row if overdue | |
442 | if (CRM_Utils_Date::overdue(CRM_Utils_Array::value('activity_date_time', $row)) | |
443 | && CRM_Utils_Array::value('status_id', $row) == 1 | |
444 | ) { | |
445 | $row['overdue'] = 1; | |
446 | $row['class'] = 'status-overdue'; | |
447 | } | |
448 | else { | |
449 | $row['overdue'] = 0; | |
450 | $row['class'] = 'status-ontime'; | |
451 | } | |
452 | ||
453 | $row['status'] = $row['status_id'] ? $activityStatus[$row['status_id']] : NULL; | |
454 | ||
455 | if ($engagementLevel = CRM_Utils_Array::value('engagement_level', $row)) { | |
456 | $row['engagement_level'] = CRM_Utils_Array::value($engagementLevel, $engagementLevels, $engagementLevel); | |
457 | } | |
458 | ||
7808aae6 | 459 | // CRM-3553 |
6a488035 | 460 | $accessMailingReport = FALSE; |
a7488080 | 461 | if (!empty($row['mailingId'])) { |
6a488035 TO |
462 | $accessMailingReport = TRUE; |
463 | } | |
464 | ||
465 | $actionLinks = $this->actionLinks(CRM_Utils_Array::value('activity_type_id', $row), | |
466 | CRM_Utils_Array::value('source_record_id', $row), | |
467 | $accessMailingReport, | |
468 | CRM_Utils_Array::value('activity_id', $row), | |
469 | $this->_key | |
470 | ); | |
471 | ||
472 | $actionMask = array_sum(array_keys($actionLinks)) & $mask; | |
473 | ||
474 | if ($output != CRM_Core_Selector_Controller::EXPORT && $output != CRM_Core_Selector_Controller::SCREEN) { | |
475 | $row['action'] = CRM_Core_Action::formLink($actionLinks, | |
476 | $actionMask, | |
477 | array( | |
478 | 'id' => $row['activity_id'], | |
479 | 'cid' => $this->_contactId, | |
480 | 'cxt' => $this->_context, | |
481 | 'caseid' => CRM_Utils_Array::value('case_id', $row), | |
87dab4a4 AH |
482 | ), |
483 | ts('more'), | |
484 | FALSE, | |
485 | 'activity.selector.action', | |
486 | 'Activity', | |
487 | $row['activity_id'] | |
6a488035 TO |
488 | ); |
489 | } | |
490 | ||
491 | unset($row); | |
492 | } | |
493 | ||
494 | return $rows; | |
495 | } | |
496 | ||
497 | /** | |
100fef9d | 498 | * Name of export file. |
6a488035 | 499 | * |
041ab3d1 TO |
500 | * @param string $output |
501 | * Type of output. | |
6a488035 | 502 | * |
a6c01b45 CW |
503 | * @return string |
504 | * name of the file | |
6a488035 | 505 | */ |
00be9182 | 506 | public function getExportFileName($output = 'csv') { |
6a488035 TO |
507 | return ts('CiviCRM Activity'); |
508 | } | |
509 | ||
510 | /** | |
fe482240 | 511 | * Get colunmn headers for search selector. |
6a488035 TO |
512 | * |
513 | * | |
a6c01b45 | 514 | * @return array |
6a488035 TO |
515 | */ |
516 | private static function &_getColumnHeaders() { | |
517 | if (!isset(self::$_columnHeaders)) { | |
518 | self::$_columnHeaders = array( | |
32864ccf | 519 | array( |
353ffa53 | 520 | 'name' => ts('Type'), |
6a488035 TO |
521 | 'sort' => 'activity_type', |
522 | 'direction' => CRM_Utils_Sort::DONTCARE, | |
523 | ), | |
32864ccf | 524 | array( |
353ffa53 | 525 | 'name' => ts('Subject'), |
6a488035 TO |
526 | 'sort' => 'subject', |
527 | 'direction' => CRM_Utils_Sort::DONTCARE, | |
528 | ), | |
32864ccf | 529 | array( |
353ffa53 | 530 | 'name' => ts('Added By'), |
6a488035 TO |
531 | 'sort' => 'source_contact_name', |
532 | 'direction' => CRM_Utils_Sort::DONTCARE, | |
533 | ), | |
534 | array('name' => ts('With')), | |
535 | array('name' => ts('Assigned')), | |
536 | array( | |
537 | 'name' => ts('Date'), | |
538 | 'sort' => 'activity_date_time', | |
539 | 'direction' => CRM_Utils_Sort::DONTCARE, | |
540 | ), | |
541 | array( | |
542 | 'name' => ts('Status'), | |
543 | 'sort' => 'status_id', | |
544 | 'direction' => CRM_Utils_Sort::DONTCARE, | |
545 | ), | |
546 | array('desc' => ts('Actions')), | |
547 | ); | |
548 | } | |
549 | ||
550 | return self::$_columnHeaders; | |
551 | } | |
96025800 | 552 | |
6a488035 | 553 | } |