$extraParams .= "&compContext={$compContext}";
}
- $showView = TRUE;
+ $showView = TRUE;
$showUpdate = $showDelete = FALSE;
$qsUpdate = NULL;
case 'Email':
case 'Bulk Email':
- $url = 'civicrm/activity/view';
+ $url = 'civicrm/activity/view';
$delUrl = 'civicrm/activity';
$qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}";
if ($activityTypeName == 'Email') {
case 'Change Case Status':
case 'Change Case Start Date':
$showUpdate = $showDelete = FALSE;
- $url = 'civicrm/activity';
- $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}";
- $qsUpdate = "atype={$activityTypeId}&action=update&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}";
+ $url = 'civicrm/activity';
+ $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}";
+ $qsUpdate = "atype={$activityTypeId}&action=update&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}";
break;
default:
- $url = 'civicrm/activity';
+ $url = 'civicrm/activity';
$showView = $showDelete = $showUpdate = TRUE;
- $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}";
+ $qsView = "atype={$activityTypeId}&action=view&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}";
$qsUpdate = "atype={$activityTypeId}&action=update&reset=1&id=%%id%%&cid=%%cid%%&context=%%cxt%%{$extraParams}";
//when type is not available lets hide view and update.
$actionLinks = array();
if ($showView) {
- $actionLinks += array(CRM_Core_Action::
- VIEW => array(
- 'name' => ts('View'),
- 'url' => $url,
- 'qs' => $qsView,
- 'title' => ts('View Activity'),
- ));
+ $actionLinks += array(
+ CRM_Core_Action::
+ VIEW => array(
+ 'name' => ts('View'),
+ 'url' => $url,
+ 'qs' => $qsView,
+ 'title' => ts('View Activity'),
+ )
+ );
}
if ($showUpdate) {
$updateUrl = 'civicrm/activity/pdf/add';
}
if (CRM_Activity_BAO_Activity::checkPermission($activityId, CRM_Core_Action::UPDATE)) {
- $actionLinks += array(CRM_Core_Action::
- UPDATE => array(
- 'name' => ts('Edit'),
- 'url' => $updateUrl,
- 'qs' => $qsUpdate,
- 'title' => ts('Update Activity'),
- ));
+ $actionLinks += array(
+ CRM_Core_Action::
+ UPDATE => array(
+ 'name' => ts('Edit'),
+ 'url' => $updateUrl,
+ 'qs' => $qsUpdate,
+ 'title' => ts('Update Activity'),
+ )
+ );
}
}
$activityTypeName &&
CRM_Case_BAO_Case::checkPermission($activityId, 'File On Case', $activityTypeId)
) {
- $actionLinks += array(CRM_Core_Action::
- ADD => array(
- 'name' => ts('File on Case'),
- 'url' => '#',
- 'extra' => 'onclick="javascript:fileOnCase( \'file\', \'%%id%%\', null, this ); return false;"',
- 'title' => ts('File on Case'),
- ));
+ $actionLinks += array(
+ CRM_Core_Action::
+ ADD => array(
+ 'name' => ts('File on Case'),
+ 'url' => '#',
+ 'extra' => 'onclick="javascript:fileOnCase( \'file\', \'%%id%%\', null, this ); return false;"',
+ 'title' => ts('File on Case'),
+ )
+ );
}
if ($showDelete) {
if (!isset($delUrl) || !$delUrl) {
$delUrl = $url;
}
- $actionLinks += array(CRM_Core_Action::
- DELETE => array(
- 'name' => ts('Delete'),
- 'url' => $delUrl,
- 'qs' => $qsDelete,
- 'title' => ts('Delete Activity'),
- ));
+ $actionLinks += array(
+ CRM_Core_Action::
+ DELETE => array(
+ 'name' => ts('Delete'),
+ 'url' => $delUrl,
+ 'qs' => $qsDelete,
+ 'title' => ts('Delete Activity'),
+ )
+ );
}
if ($accessMailingReport) {
- $actionLinks += array(CRM_Core_Action::
- BROWSE => array(
- 'name' => ts('Mailing Report'),
- 'url' => 'civicrm/mailing/report',
- 'qs' => "mid={$sourceRecordId}&reset=1&cid=%%cid%%&context=activitySelector",
- 'title' => ts('View Mailing Report'),
- ));
+ $actionLinks += array(
+ CRM_Core_Action::
+ BROWSE => array(
+ 'name' => ts('Mailing Report'),
+ 'url' => 'civicrm/mailing/report',
+ 'qs' => "mid={$sourceRecordId}&reset=1&cid=%%cid%%&context=activitySelector",
+ 'title' => ts('View Mailing Report'),
+ )
+ );
}
return $actionLinks;
* @param array $params
*/
public function getPagerParams($action, &$params) {
- $params['status'] = ts('Activities %%StatusMessage%%');
+ $params['status'] = ts('Activities %%StatusMessage%%');
$params['csvString'] = NULL;
- $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT;
+ $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT;
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
*
* @param string $action
* The action being performed.
- * @param enum $output
+ * @param string $output
* What should the result set include (web/email/csv).
*
* @return array
/**
* Returns all the rows in the given offset and rowCount
*
- * @param enum $action
+ * @param string $action
* The action being performed.
* @param int $offset
* The row number to start from.
* The number of rows to return.
* @param string $sort
* The sql string that describes the sort order.
- * @param enum $output
+ * @param string $output
* What should the result set include (web/email/csv).
*
* @param null $case
if (!isset(self::$_columnHeaders)) {
self::$_columnHeaders = array(
array(
- 'name' => ts('Type'),
+ 'name' => ts('Type'),
'sort' => 'activity_type',
'direction' => CRM_Utils_Sort::DONTCARE,
),
array(
- 'name' => ts('Subject'),
+ 'name' => ts('Subject'),
'sort' => 'subject',
'direction' => CRM_Utils_Sort::DONTCARE,
),
array(
- 'name' => ts('Added By'),
+ 'name' => ts('Added By'),
'sort' => 'source_contact_name',
'direction' => CRM_Utils_Sort::DONTCARE,
),