$selectorName = $this->controller->selectorName();
require_once str_replace('_', DIRECTORY_SEPARATOR, $selectorName) . '.php';
- $returnP = isset($returnPropeties) ? $returnPropeties : "";
+ $returnP = isset($returnProperties) ? $returnProperties : "";
$customSearchClass = $this->get('customSearchClass');
+ $this->assign('customSearchID', $this->get('customSearchID'));
$selector = new $selectorName($customSearchClass,
$fv,
$params,
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
$columns = $this->_search->columns();
- if ($output == CRM_Core_Selector_Controller::EXPORT) {
- return array_keys($columns);
+ $headers = array();
+ if ($output == CRM_Core_Selector_Controller::EXPORT || $output == CRM_Core_Selector_Controller::SCREEN) {
+ foreach ($columns as $name => $key) {
+ $headers[$key] = $name;
+ }
+ return $headers;
}
else {
- $headers = array();
foreach ($columns as $name => $key) {
if (!empty($name)) {
$headers[] = array(
<br />
<table>
<tr class="columnheader">
-{if $id}
+{if $id OR $customSearchID}
{foreach from=$columnHeaders item=header}
<th>{$header}</th>
{/foreach}
{foreach from=$rows item=row}
<tr class="{cycle values="odd-row,even-row"}">
{if $id}
- <td>{$row.sort_name}</td>
- {foreach from=$row item=value key=key}
- {if ($key neq "checkbox") and ($key neq "action") and ($key neq "contact_type") and ($key neq "status") and ($key neq "contact_id") and ($key neq "sort_name")}
- <td>{$value}</td>
- {/if}
- {/foreach}
-
+ <td>{$row.sort_name}</td>
+ {foreach from=$row item=value key=key}
+ {if ($key neq "checkbox") and ($key neq "action") and ($key neq "contact_type") and ($key neq "status") and ($key neq "contact_id") and ($key neq "sort_name")}
+ <td>{$value}</td>
+ {/if}
+ {/foreach}
+{elseif $customSearchID}
+ {foreach from=$columnHeaders item=header key=name}
+ <td>{$row.$name}</td>
+ {/foreach}
{else}
<td>{$row.sort_name}</td>
{if !empty($columnHeaders.street_address)}