$page->set('multiRecordFieldListing', $multiRecordFieldListing);
$page->set('pageViewType', 'customDataView');
$page->set('contactType', $ctype);
+ $page->_headersOnly = TRUE;
$page->assign('viewCustomData', array(
$this->_groupId => array(
$this->_groupId => $groupTree[$this->_groupId],
public function browse() {
$dateFields = NULL;
$cgcount = 0;
- $attributes = $headerAttr = array();
+ $attributes = $result = $headerAttr = array();
$dateFieldsVals = NULL;
if ($this->_pageViewType == 'profileDataView' && $this->_profileId) {
$fields = CRM_Core_BAO_UFGroup::getFields($this->_profileId, FALSE, NULL,
// from the above customGroupInfo we can get $this->_customGroupTitle
$this->_customGroupTitle = $groupDetail[$customGroupId]['title'];
}
- if ($fieldIDs && !empty($fieldIDs) && $this->_contactId) {
+ if ($fieldIDs && !empty($fieldIDs) && $this->_contactId && empty($this->_headersOnly)) {
$options = array();
$returnProperities = array(
'html_type',
$headers = array();
if (!empty($fieldIDs)) {
foreach ($fieldIDs as $fieldID) {
- $headers[$fieldID] = ($this->_pageViewType == 'profileDataView') ? $customGroupInfo[$fieldID]['fieldLabel'] : $fieldLabels[$fieldID]['label'];
- $headerAttr[$fieldID]['columnName'] = $fieldLabels[$fieldID]['column_name'];
+ if ($this->_pageViewType == 'profileDataView') {
+ $headers[$fieldID] = $customGroupInfo[$fieldID]['fieldLabel'];
+ }
+ else {
+ $headers[$fieldID] = $fieldLabels[$fieldID]['label'];
+ $headerAttr[$fieldID]['columnName'] = $fieldLabels[$fieldID]['column_name'];
+ }
}
}
$this->assign('dateFields', $dateFields);
{strip}
<table id="records-{$customGroupId}" class={if $pageViewType eq 'customDataView'}"crm-multifield-selector crm-ajax-table"{else}'display'{/if}>
<thead>
- <tr>
{if $pageViewType eq 'customDataView'}
{foreach from=$headers key=recId item=head}
<th data-data={ts}'{$headerAttr.$recId.columnName}'{/ts}
</th>
{/foreach}
<th data-data="action" data-orderable="false"> </th>
- </tr>
</thead>
{literal}
<script type="text/javascript">
{foreach from=$headers key=recId item=head}
<th>{ts}{$head}{/ts}</th>
{/foreach}
-
+
{foreach from=$dateFields key=fieldId item=v}
<th class='hiddenElement'></th>
{/foreach}
<th> </th>
- </tr>
</thead>
{foreach from=$records key=recId item=rows}
<tr class="{cycle values="odd-row,even-row"}">