Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
fee14197 | 4 | | CiviCRM version 5 | |
6a488035 | 5 | +--------------------------------------------------------------------+ |
6b83d5bd | 6 | | Copyright CiviCRM LLC (c) 2004-2019 | |
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 | |
6b83d5bd | 31 | * @copyright CiviCRM LLC (c) 2004-2019 |
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) { | |
b864360d MWMC |
115 | |
116 | //CRM-14277 added additional param to handle activity search | |
29571f63 | 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; | |
b864360d MWMC |
127 | $url = NULL; |
128 | $qsView = NULL; | |
6a488035 | 129 | |
b864360d | 130 | $activityTypeName = CRM_Core_PseudoConstant::getName('CRM_Activity_BAO_Activity', 'activity_type_id', $activityTypeId); |
6a488035 | 131 | |
7808aae6 SB |
132 | // CRM-7607 |
133 | // Lets allow to have normal operation for only activity types. | |
134 | // When activity type is disabled or no more exists give only delete. | |
6a488035 TO |
135 | switch ($activityTypeName) { |
136 | case 'Event Registration': | |
66526669 | 137 | case 'Change Registration': |
6a488035 TO |
138 | $url = 'civicrm/contact/view/participant'; |
139 | $qsView = "action=view&reset=1&id={$sourceRecordId}&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
140 | break; | |
141 | ||
142 | case 'Contribution': | |
143 | $url = 'civicrm/contact/view/contribution'; | |
144 | $qsView = "action=view&reset=1&id={$sourceRecordId}&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
145 | break; | |
146 | ||
66526669 PJ |
147 | case 'Payment': |
148 | case 'Refund': | |
149 | $participantId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_ParticipantPayment', $sourceRecordId, 'participant_id', 'contribution_id'); | |
150 | if (!empty($participantId)) { | |
151 | $url = 'civicrm/contact/view/participant'; | |
152 | $qsView = "action=view&reset=1&id={$participantId}&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
153 | } | |
154 | break; | |
155 | ||
6a488035 TO |
156 | case 'Membership Signup': |
157 | case 'Membership Renewal': | |
158 | case 'Change Membership Status': | |
159 | case 'Change Membership Type': | |
160 | $url = 'civicrm/contact/view/membership'; | |
161 | $qsView = "action=view&reset=1&id={$sourceRecordId}&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
162 | break; | |
163 | ||
164 | case 'Pledge Reminder': | |
165 | case 'Pledge Acknowledgment': | |
166 | $url = 'civicrm/contact/view/activity'; | |
167 | $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
168 | break; | |
169 | ||
170 | case 'Email': | |
171 | case 'Bulk Email': | |
353ffa53 | 172 | $url = 'civicrm/activity/view'; |
6a488035 TO |
173 | $delUrl = 'civicrm/activity'; |
174 | $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
175 | if ($activityTypeName == 'Email') { | |
176 | $showDelete = TRUE; | |
177 | } | |
178 | break; | |
179 | ||
180 | case 'Inbound Email': | |
181 | $url = 'civicrm/contact/view/activity'; | |
182 | $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
ee90a98c CR |
183 | |
184 | if (CRM_Core_Permission::check('edit inbound email basic information') | |
185 | || CRM_Core_Permission::check('edit inbound email basic information and content') | |
186 | ) { | |
187 | $showDelete = $showUpdate = TRUE; | |
188 | $qsUpdate = "atype={$activityTypeId}&action=update&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
189 | } | |
6a488035 TO |
190 | break; |
191 | ||
192 | case 'Open Case': | |
193 | case 'Change Case Type': | |
194 | case 'Change Case Status': | |
195 | case 'Change Case Start Date': | |
196 | $showUpdate = $showDelete = FALSE; | |
353ffa53 TO |
197 | $url = 'civicrm/activity'; |
198 | $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
199 | $qsUpdate = "atype={$activityTypeId}&action=update&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
6a488035 TO |
200 | break; |
201 | ||
202 | default: | |
353ffa53 | 203 | $url = 'civicrm/activity'; |
6a488035 | 204 | $showView = $showDelete = $showUpdate = TRUE; |
353ffa53 | 205 | $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; |
6a488035 TO |
206 | $qsUpdate = "atype={$activityTypeId}&action=update&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; |
207 | ||
7808aae6 | 208 | // When type is not available lets hide view and update. |
6a488035 TO |
209 | if (empty($activityTypeName)) { |
210 | $showView = $showUpdate = FALSE; | |
211 | } | |
212 | break; | |
213 | } | |
214 | ||
215 | $qsDelete = "atype={$activityTypeId}&action=delete&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}"; | |
216 | ||
217 | $actionLinks = array(); | |
218 | ||
219 | if ($showView) { | |
353ffa53 TO |
220 | $actionLinks += array( |
221 | CRM_Core_Action:: | |
222 | VIEW => array( | |
223 | 'name' => ts('View'), | |
224 | 'url' => $url, | |
225 | 'qs' => $qsView, | |
226 | 'title' => ts('View Activity'), | |
8d7a9d07 | 227 | ), |
353ffa53 | 228 | ); |
6a488035 TO |
229 | } |
230 | ||
231 | if ($showUpdate) { | |
232 | $updateUrl = 'civicrm/activity/add'; | |
233 | if ($activityTypeName == 'Email') { | |
234 | $updateUrl = 'civicrm/activity/email/add'; | |
235 | } | |
236 | elseif ($activityTypeName == 'Print PDF Letter') { | |
237 | $updateUrl = 'civicrm/activity/pdf/add'; | |
238 | } | |
481a74f4 | 239 | if (CRM_Activity_BAO_Activity::checkPermission($activityId, CRM_Core_Action::UPDATE)) { |
353ffa53 TO |
240 | $actionLinks += array( |
241 | CRM_Core_Action:: | |
242 | UPDATE => array( | |
243 | 'name' => ts('Edit'), | |
244 | 'url' => $updateUrl, | |
245 | 'qs' => $qsUpdate, | |
246 | 'title' => ts('Update Activity'), | |
8d7a9d07 | 247 | ), |
353ffa53 | 248 | ); |
bbfeec41 | 249 | } |
6a488035 TO |
250 | } |
251 | ||
252 | if ( | |
253 | $activityTypeName && | |
254 | CRM_Case_BAO_Case::checkPermission($activityId, 'File On Case', $activityTypeId) | |
255 | ) { | |
353ffa53 TO |
256 | $actionLinks += array( |
257 | CRM_Core_Action:: | |
258 | ADD => array( | |
259 | 'name' => ts('File on Case'), | |
260 | 'url' => '#', | |
261 | 'extra' => 'onclick="javascript:fileOnCase( \'file\', \'%%id%%\', null, this ); return false;"', | |
262 | 'title' => ts('File on Case'), | |
8d7a9d07 | 263 | ), |
353ffa53 | 264 | ); |
6a488035 TO |
265 | } |
266 | ||
267 | if ($showDelete) { | |
268 | if (!isset($delUrl) || !$delUrl) { | |
269 | $delUrl = $url; | |
270 | } | |
353ffa53 TO |
271 | $actionLinks += array( |
272 | CRM_Core_Action:: | |
273 | DELETE => array( | |
274 | 'name' => ts('Delete'), | |
275 | 'url' => $delUrl, | |
276 | 'qs' => $qsDelete, | |
277 | 'title' => ts('Delete Activity'), | |
8d7a9d07 | 278 | ), |
353ffa53 | 279 | ); |
6a488035 TO |
280 | } |
281 | ||
282 | if ($accessMailingReport) { | |
353ffa53 TO |
283 | $actionLinks += array( |
284 | CRM_Core_Action:: | |
285 | BROWSE => array( | |
286 | 'name' => ts('Mailing Report'), | |
287 | 'url' => 'civicrm/mailing/report', | |
288 | 'qs' => "mid={$sourceRecordId}&reset=1&cid=%%cid%%&context=activitySelector", | |
289 | 'title' => ts('View Mailing Report'), | |
8d7a9d07 | 290 | ), |
353ffa53 | 291 | ); |
6a488035 TO |
292 | } |
293 | ||
294 | return $actionLinks; | |
295 | } | |
296 | ||
297 | /** | |
100fef9d | 298 | * Getter for array of the parameters required for creating pager. |
6a488035 | 299 | * |
da6b46f4 | 300 | * @param $action |
c490a46a | 301 | * @param array $params |
6a488035 | 302 | */ |
00be9182 | 303 | public function getPagerParams($action, &$params) { |
353ffa53 | 304 | $params['status'] = ts('Activities %%StatusMessage%%'); |
6a488035 | 305 | $params['csvString'] = NULL; |
353ffa53 | 306 | $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT; |
6a488035 TO |
307 | |
308 | $params['buttonTop'] = 'PagerTopButton'; | |
309 | $params['buttonBottom'] = 'PagerBottomButton'; | |
310 | } | |
311 | ||
312 | /** | |
100fef9d | 313 | * Returns the column headers as an array of tuples: |
6a488035 TO |
314 | * (name, sortName (key to the sort array)) |
315 | * | |
041ab3d1 TO |
316 | * @param string $action |
317 | * The action being performed. | |
3f8d2862 | 318 | * @param string $output |
041ab3d1 | 319 | * What should the result set include (web/email/csv). |
6a488035 | 320 | * |
a6c01b45 CW |
321 | * @return array |
322 | * the column headers that need to be displayed | |
6a488035 | 323 | */ |
00be9182 | 324 | public function &getColumnHeaders($action = NULL, $output = NULL) { |
6a488035 TO |
325 | if ($output == CRM_Core_Selector_Controller::EXPORT || $output == CRM_Core_Selector_Controller::SCREEN) { |
326 | $csvHeaders = array(ts('Activity Type'), ts('Description'), ts('Activity Date')); | |
327 | foreach (self::_getColumnHeaders() as $column) { | |
328 | if (array_key_exists('name', $column)) { | |
329 | $csvHeaders[] = $column['name']; | |
330 | } | |
331 | } | |
332 | return $csvHeaders; | |
333 | } | |
334 | else { | |
335 | return self::_getColumnHeaders(); | |
336 | } | |
337 | } | |
338 | ||
339 | /** | |
340 | * Returns total number of rows for the query. | |
341 | * | |
041ab3d1 TO |
342 | * @param string $action |
343 | * Action being performed. | |
6a488035 | 344 | * |
fd31fa4c EM |
345 | * @param null $case |
346 | * | |
a6c01b45 CW |
347 | * @return int |
348 | * Total number of rows | |
6a488035 | 349 | */ |
00be9182 | 350 | public function getTotalCount($action, $case = NULL) { |
6a488035 TO |
351 | $params = array( |
352 | 'contact_id' => $this->_contactId, | |
353 | 'admin' => $this->_admin, | |
354 | 'caseId' => $case, | |
355 | 'context' => $this->_context, | |
356 | 'activity_type_id' => $this->_activityTypeIDs, | |
357 | 'offset' => 0, | |
358 | 'rowCount' => 0, | |
359 | 'sort' => NULL, | |
360 | ); | |
6ab43e1b | 361 | return CRM_Activity_BAO_Activity::deprecatedGetActivitiesCount($params); |
6a488035 TO |
362 | } |
363 | ||
364 | /** | |
fe482240 | 365 | * Returns all the rows in the given offset and rowCount. |
6a488035 | 366 | * |
3f8d2862 | 367 | * @param string $action |
041ab3d1 TO |
368 | * The action being performed. |
369 | * @param int $offset | |
370 | * The row number to start from. | |
371 | * @param int $rowCount | |
372 | * The number of rows to return. | |
373 | * @param string $sort | |
374 | * The sql string that describes the sort order. | |
3f8d2862 | 375 | * @param string $output |
041ab3d1 | 376 | * What should the result set include (web/email/csv). |
2a6da8d7 EM |
377 | * |
378 | * @param null $case | |
6a488035 | 379 | * |
a6c01b45 CW |
380 | * @return int |
381 | * the total number of rows for this action | |
6a488035 | 382 | */ |
00be9182 | 383 | public function &getRows($action, $offset, $rowCount, $sort, $output = NULL, $case = NULL) { |
6a488035 TO |
384 | $params = array( |
385 | 'contact_id' => $this->_contactId, | |
386 | 'admin' => $this->_admin, | |
387 | 'caseId' => $case, | |
388 | 'context' => $this->_context, | |
389 | 'activity_type_id' => $this->_activityTypeIDs, | |
390 | 'offset' => $offset, | |
391 | 'rowCount' => $rowCount, | |
392 | 'sort' => $sort, | |
393 | ); | |
394 | $config = CRM_Core_Config::singleton(); | |
550e5b1a | 395 | $rows = CRM_Activity_BAO_Activity::deprecatedGetActivities($params); |
6a488035 TO |
396 | |
397 | if (empty($rows)) { | |
398 | return $rows; | |
399 | } | |
400 | ||
401 | $activityStatus = CRM_Core_PseudoConstant::activityStatus(); | |
402 | ||
403 | $engagementLevels = CRM_Campaign_PseudoConstant::engagementLevel(); | |
404 | ||
7808aae6 | 405 | // CRM-4418 |
6a488035 TO |
406 | $permissions = array($this->_permission); |
407 | if (CRM_Core_Permission::check('delete activities')) { | |
408 | $permissions[] = CRM_Core_Permission::DELETE; | |
409 | } | |
410 | $mask = CRM_Core_Action::mask($permissions); | |
411 | ||
412 | foreach ($rows as $k => $row) { | |
413 | $row = &$rows[$k]; | |
414 | ||
415 | // DRAFTING: provide a facility for db-stored strings | |
416 | // localize the built-in activity names for display | |
417 | // (these are not enums, so we can't use any automagic here) | |
418 | switch ($row['activity_type']) { | |
419 | case 'Meeting': | |
420 | $row['activity_type'] = ts('Meeting'); | |
421 | break; | |
422 | ||
423 | case 'Phone Call': | |
424 | $row['activity_type'] = ts('Phone Call'); | |
425 | break; | |
426 | ||
427 | case 'Email': | |
428 | $row['activity_type'] = ts('Email'); | |
429 | break; | |
430 | ||
431 | case 'SMS': | |
432 | $row['activity_type'] = ts('SMS'); | |
433 | break; | |
434 | ||
435 | case 'Event': | |
436 | $row['activity_type'] = ts('Event'); | |
437 | break; | |
438 | } | |
439 | ||
440 | // add class to this row if overdue | |
441 | if (CRM_Utils_Date::overdue(CRM_Utils_Array::value('activity_date_time', $row)) | |
442 | && CRM_Utils_Array::value('status_id', $row) == 1 | |
443 | ) { | |
444 | $row['overdue'] = 1; | |
445 | $row['class'] = 'status-overdue'; | |
446 | } | |
447 | else { | |
448 | $row['overdue'] = 0; | |
449 | $row['class'] = 'status-ontime'; | |
450 | } | |
451 | ||
452 | $row['status'] = $row['status_id'] ? $activityStatus[$row['status_id']] : NULL; | |
453 | ||
454 | if ($engagementLevel = CRM_Utils_Array::value('engagement_level', $row)) { | |
455 | $row['engagement_level'] = CRM_Utils_Array::value($engagementLevel, $engagementLevels, $engagementLevel); | |
456 | } | |
457 | ||
7808aae6 | 458 | // CRM-3553 |
6a488035 | 459 | $accessMailingReport = FALSE; |
a7488080 | 460 | if (!empty($row['mailingId'])) { |
6a488035 TO |
461 | $accessMailingReport = TRUE; |
462 | } | |
463 | ||
464 | $actionLinks = $this->actionLinks(CRM_Utils_Array::value('activity_type_id', $row), | |
465 | CRM_Utils_Array::value('source_record_id', $row), | |
466 | $accessMailingReport, | |
467 | CRM_Utils_Array::value('activity_id', $row), | |
468 | $this->_key | |
469 | ); | |
470 | ||
471 | $actionMask = array_sum(array_keys($actionLinks)) & $mask; | |
472 | ||
473 | if ($output != CRM_Core_Selector_Controller::EXPORT && $output != CRM_Core_Selector_Controller::SCREEN) { | |
474 | $row['action'] = CRM_Core_Action::formLink($actionLinks, | |
475 | $actionMask, | |
476 | array( | |
477 | 'id' => $row['activity_id'], | |
478 | 'cid' => $this->_contactId, | |
479 | 'cxt' => $this->_context, | |
480 | 'caseid' => CRM_Utils_Array::value('case_id', $row), | |
87dab4a4 AH |
481 | ), |
482 | ts('more'), | |
483 | FALSE, | |
484 | 'activity.selector.action', | |
485 | 'Activity', | |
486 | $row['activity_id'] | |
6a488035 TO |
487 | ); |
488 | } | |
489 | ||
490 | unset($row); | |
491 | } | |
492 | ||
493 | return $rows; | |
494 | } | |
495 | ||
496 | /** | |
100fef9d | 497 | * Name of export file. |
6a488035 | 498 | * |
041ab3d1 TO |
499 | * @param string $output |
500 | * Type of output. | |
6a488035 | 501 | * |
a6c01b45 CW |
502 | * @return string |
503 | * name of the file | |
6a488035 | 504 | */ |
00be9182 | 505 | public function getExportFileName($output = 'csv') { |
6a488035 TO |
506 | return ts('CiviCRM Activity'); |
507 | } | |
508 | ||
509 | /** | |
fe482240 | 510 | * Get colunmn headers for search selector. |
6a488035 TO |
511 | * |
512 | * | |
a6c01b45 | 513 | * @return array |
6a488035 TO |
514 | */ |
515 | private static function &_getColumnHeaders() { | |
516 | if (!isset(self::$_columnHeaders)) { | |
517 | self::$_columnHeaders = array( | |
32864ccf | 518 | array( |
353ffa53 | 519 | 'name' => ts('Type'), |
6a488035 TO |
520 | 'sort' => 'activity_type', |
521 | 'direction' => CRM_Utils_Sort::DONTCARE, | |
522 | ), | |
32864ccf | 523 | array( |
353ffa53 | 524 | 'name' => ts('Subject'), |
6a488035 TO |
525 | 'sort' => 'subject', |
526 | 'direction' => CRM_Utils_Sort::DONTCARE, | |
527 | ), | |
32864ccf | 528 | array( |
353ffa53 | 529 | 'name' => ts('Added By'), |
6a488035 TO |
530 | 'sort' => 'source_contact_name', |
531 | 'direction' => CRM_Utils_Sort::DONTCARE, | |
532 | ), | |
533 | array('name' => ts('With')), | |
534 | array('name' => ts('Assigned')), | |
535 | array( | |
536 | 'name' => ts('Date'), | |
537 | 'sort' => 'activity_date_time', | |
538 | 'direction' => CRM_Utils_Sort::DONTCARE, | |
539 | ), | |
540 | array( | |
541 | 'name' => ts('Status'), | |
542 | 'sort' => 'status_id', | |
543 | 'direction' => CRM_Utils_Sort::DONTCARE, | |
544 | ), | |
545 | array('desc' => ts('Actions')), | |
546 | ); | |
547 | } | |
548 | ||
549 | return self::$_columnHeaders; | |
550 | } | |
96025800 | 551 | |
6a488035 | 552 | } |