<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
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),
);
}
}
$groupID = CRM_Utils_Array::key('1', $this->_formValues['group']);
$pseudoconstants = array();
- if (!empty($this->_fields)) {
- // get all the pseudoconstant values
- foreach ($this->_fields as $name => $values) {
- if (isset($this->_fields[$name]['pseudoconstant'])) {
- $pseudoconstants[$name] =
- array(
- 'dbName' => $this->_fields[$name]['name'],
- 'values' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', $name),
- );
- }
- }
- }
-
// for CRM-3157 purposes
- if (in_array('country', $names)) {
- $pseudoconstants['country'] = array(
- 'dbName' => 'country_id',
- 'values' => CRM_Core_PseudoConstant::country()
- );
- }
-
- if (in_array('state_province', $names)) {
- $pseudoconstants['state_province'] = array(
- 'dbName' => 'state_province_id',
- 'values' => CRM_Core_PseudoConstant::stateProvince()
- );
- }
-
if (in_array('world_region', $names)) {
$pseudoconstants['world_region'] = array(
'dbName' => 'world_region_id',
$seenIDs = array();
while ($result->fetch()) {
$row = array();
+ $this->_query->convertToPseudoNames($result);
// the columns we are interested in
foreach ($names as $property) {
$greeting = $property . '_display';
$row[$property] = $result->$greeting;
}
+ elseif ($property == 'state_province') {
+ $row[$property] = $result->state_province_name;
+ }
elseif (isset($pseudoconstants[$property])) {
$row[$property] = CRM_Utils_Array::value(
$result->{$pseudoconstants[$property]['dbName']},
'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('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
'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('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
$sql = str_replace($replaceSQL, $insertSQL, $sql);
-
CRM_Core_Error::ignoreException();
$result = CRM_Core_DAO::executeQuery($sql);
CRM_Core_Error::setCallback();