CRM_Core_Action::VIEW => array(
'name' => ts('View'),
'url' => 'civicrm/contact/view',
+ 'class' => 'no-popup',
'qs' => "reset=1&cid=%%id%%{$searchContext}{$extraParams}",
'title' => ts('View Contact Details'),
'ref' => 'view-contact',
CRM_Core_Action::UPDATE => array(
'name' => ts('Edit'),
'url' => 'civicrm/contact/add',
+ 'class' => 'no-popup',
'qs' => "reset=1&action=update&cid=%%id%%{$searchContext}{$extraParams}",
'title' => ts('Edit Contact Details'),
'ref' => 'edit-contact',
if ($value['key'] == 'delete') {
$contextVal = $searchContext;
}
-
$url = "civicrm/contact/view/{$value['key']}";
$qs = "reset=1&action=add&cid=%%id%%{$contextVal}{$extraParams}";
if ($value['key'] == 'activity') {
'qs' => $qs,
'title' => $value['title'],
'ref' => $value['ref'],
+ 'class' => CRM_Utils_Array::value('class', $value),
);
}
}
*/
function &getColumnHeaders($action = NULL, $output = NULL) {
$headers = NULL;
+
+ // unset return property elements that we don't care
+ if (!empty($this->_returnProperties)) {
+ $doNotCareElements = array(
+ 'contact_type',
+ 'contact_sub_type',
+ 'sort_name',
+ );
+ foreach ( $doNotCareElements as $value) {
+ unset($this->_returnProperties[$value]);
+ }
+ }
+
if ($output == CRM_Core_Selector_Controller::EXPORT) {
$csvHeaders = array(ts('Contact Id'), ts('Contact Type'));
foreach ($this->getColHeads($action, $output) as $column) {
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
foreach ($this->_fields as $name => $field) {
- if (CRM_Utils_Array::value('in_selector', $field) &&
+ if (!empty($field['in_selector']) &&
!in_array($name, $skipFields)
) {
if (strpos($name, '-') !== FALSE) {
$properties = self::makeProperties($this->_returnProperties);
foreach ($properties as $prop) {
- if ($prop == 'contact_type' || $prop == 'contact_sub_type' || $prop == 'sort_name') {
- continue;
- }
-
if (strpos($prop, '-')) {
list($loc, $fld, $phoneType) = CRM_Utils_System::explode('-', $prop, 3);
$title = $this->_query->_fields[$fld]['title'];
}
elseif (isset($this->_query->_fields[$prop]) && isset($this->_query->_fields[$prop]['title'])) {
$title = $this->_query->_fields[$prop]['title'];
- } else {
+ }
+ else {
$title = '';
}
$names = array();
static $skipFields = array('group', 'tag');
foreach ($this->_fields as $key => $field) {
- if (
- CRM_Utils_Array::value('in_selector', $field) &&
+ if (!empty($field['in_selector']) &&
!in_array($key, $skipFields)
) {
if (strpos($key, '-') !== FALSE) {
if ($output != CRM_Core_Selector_Controller::EXPORT) {
$row['checkbox'] = CRM_Core_Form::CB_PREFIX . $result->contact_id;
- if (CRM_Utils_Array::value('deleted_contacts', $this->_formValues)
- && CRM_Core_Permission::check('access deleted contacts')
+ if (!empty($this->_formValues['deleted_contacts']) && CRM_Core_Permission::check('access deleted contacts')
) {
$links = array(
array(
'name' => ts('View'),
'url' => 'civicrm/contact/view',
'qs' => 'reset=1&cid=%%id%%',
+ 'class' => 'no-popup',
'title' => ts('View Contact Details'),
),
array(
'title' => ts('Permanently Delete Contact'),
);
}
- $row['action'] = CRM_Core_Action::formLink($links, NULL, array('id' => $result->contact_id));
+ $row['action'] = CRM_Core_Action::formLink(
+ $links,
+ NULL,
+ array('id' => $result->contact_id),
+ ts('more'),
+ FALSE,
+ 'contact.selector.row',
+ 'Contact',
+ $result->contact_id
+ );
}
elseif ((is_numeric(CRM_Utils_Array::value('geo_code_1', $row))) ||
- ($config->mapGeoCoding &&
- CRM_Utils_Array::value('city', $row) &&
+ ($config->mapGeoCoding && !empty($row['city']) &&
CRM_Utils_Array::value('state_province', $row)
)
) {
- $row['action'] = CRM_Core_Action::formLink($links, $mask, array('id' => $result->contact_id));
+ $row['action'] = CRM_Core_Action::formLink(
+ $links,
+ $mask,
+ array('id' => $result->contact_id),
+ ts('more'),
+ FALSE,
+ 'contact.selector.row',
+ 'Contact',
+ $result->contact_id
+ );
}
else {
- $row['action'] = CRM_Core_Action::formLink($links, $mapMask, array('id' => $result->contact_id));
+ $row['action'] = CRM_Core_Action::formLink(
+ $links,
+ $mapMask,
+ array('id' => $result->contact_id),
+ ts('more'),
+ FALSE,
+ 'contact.selector.row',
+ 'Contact',
+ $result->contact_id
+ );
}
// allow components to add more actions
foreach ($rows as $id => & $row) {
- if (CRM_Utils_Array::value('deleted_contacts', $this->_formValues)
- && CRM_Core_Permission::check('access deleted contacts')
+ if (!empty($this->_formValues['deleted_contacts']) && CRM_Core_Permission::check('access deleted contacts')
) {
$links = array(
array(
'title' => ts('Permanently Delete Contact'),
);
}
- $row['action'] = CRM_Core_Action::formLink($links, NULL, array('id' => $row['contact_id']));
+ $row['action'] = CRM_Core_Action::formLink(
+ $links,
+ null,
+ array('id' => $row['contact_id']),
+ ts('more'),
+ FALSE,
+ 'contact.selector.actions',
+ 'Contact',
+ $row['contact_id']
+ );
}
elseif ((is_numeric(CRM_Utils_Array::value('geo_code_1', $row))) ||
- ($config->mapGeoCoding &&
- CRM_Utils_Array::value('city', $row) &&
+ ($config->mapGeoCoding && !empty($row['city']) &&
CRM_Utils_Array::value('state_province', $row)
)
) {
- $row['action'] = CRM_Core_Action::formLink($links, $mask, array('id' => $row['contact_id']));
+ $row['action'] = CRM_Core_Action::formLink(
+ $links,
+ $mask,
+ array('id' => $row['contact_id']),
+ ts('more'),
+ FALSE,
+ 'contact.selector.actions',
+ 'Contact',
+ $row['contact_id']
+ );
}
else {
- $row['action'] = CRM_Core_Action::formLink($links, $mapMask, array('id' => $row['contact_id']));
+ $row['action'] = CRM_Core_Action::formLink(
+ $links,
+ $mapMask,
+ array('id' => $row['contact_id']),
+ ts('more'),
+ FALSE,
+ 'contact.selector.actions',
+ 'Contact',
+ $row['contact_id']
+ );
}
// allow components to add more actions
);
foreach ($defaultAddress as $columnName => $column) {
- if (CRM_Utils_Array::value($columnName, $addressOptions)) {
+ if (!empty($addressOptions[$columnName])) {
self::$_columnHeaders[$columnName] = $column;
}
}