NULL,
$entitySubType
);
- CRM_Core_BAO_CustomGroup::buildCustomDataView($this,
- $groupTree
- );
+ CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $this->_caseID);
}
/**
$this->assign('viewNote', $viewNote);
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Relationship', $this, $this->_id, 0, $relType);
- CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree);
+ CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $this->_id);
$rType = CRM_Utils_Array::value('rtype', $viewRelationship[$this->_id]);
// add viewed contribution to recent items list
}
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Contribution', $this, $id, 0, CRM_Utils_Array::value('financial_type_id', $values));
- CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree);
+ CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $id);
$premiumId = NULL;
if ($id) {
case 'File':
// In the context of displaying a profile, show file/image
- if ($entityId) {
- $url = self::getFileURL($entityId, $field['id']);
- if ($url) {
- $display = $url['file_url'];
+ if ($value) {
+ if ($entityId) {
+ $url = self::getFileURL($entityId, $field['id']);
+ if ($url) {
+ $display = $url['file_url'];
+ }
+ }
+ else {
+ // In other contexts show a paperclip icon
+ $icons = CRM_Core_BAO_File::paperIconAttachment('*', $value);
+ $display = $icons[$value];
}
- }
- elseif ($value) {
- // In other contexts show a paperclip icon
- $icons = CRM_Core_BAO_File::paperIconAttachment('*', $value);
- $display = $icons[$value];
}
break;
$finalTree[$treeId] = $trees;
}
}
- CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $finalTree);
+ CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $finalTree, FALSE, NULL, NULL, NULL, $participantID);
$eventTitle = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $values[$participantID]['event_id'], 'title');
//CRM-7150, show event name on participant view even if the event is disabled
if (empty($values[$participantID]['event'])) {
//retrieve custom field information
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Event', $this, $this->_id, 0, $values['event']['event_type_id']);
- CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree);
+ CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $this->_id);
$this->assign('action', CRM_Core_Action::VIEW);
//To show the event location on maps directly on event info page
$locations = CRM_Event_BAO_Event::getMapInfo($this->_id);
// handle custom data.
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Pledge', $this, $params['id']);
- CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree);
+ CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $params['id']);
if (!empty($values['contribution_page_id'])) {
$values['contribution_page'] = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $values['contribution_page_id'], 'title');
</div>
{else}
<div class="crm-label">{$element.field_title}</div>
- {if $element.field_type == 'File' && !empty($element.field_value.displayURL)}
- <div class="crm-content crm-custom_data crm-displayURL">
- <a href="{$element.field_value.displayURL}" class='crm-image-popup'>
- <img src="{$element.field_value.displayURL}" height = "{$element.field_value.imageThumbHeight}"
- width="{$element.field_value.imageThumbWidth}">
- </a>
- </div>
- {elseif $element.field_data_type EQ 'ContactReference' && $element.contact_ref_id}
+ {if $element.field_data_type EQ 'ContactReference' && $element.contact_ref_id}
{*Contact ref id passed if user has sufficient permissions - so make a link.*}
<div class="crm-content crm-custom-data crm-contact-reference">
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$element.contact_ref_id`"}" title="view contact">{$element.field_value}</a>
</td>
{else}
<td class="label">{$element.field_title}</td>
- {if $element.field_type == 'File'}
- {if !empty($element.field_value.displayURL)}
- <td class="html-adjust">
- <a href="{$element.field_value.displayURL}" class='crm-image-popup'>
- <img src="{$element.field_value.displayURL}" height="100" width="100">
- </a>
- </td>
+ {if $element.field_data_type == 'Money'}
+ {if $element.field_type == 'Text'}
+ <td class="html-adjust">{$element.field_value|crmMoney}</td>
{else}
- <td class="html-adjust">
- {$element.field_value}
- </td>
+ <td class="html-adjust">{$element.field_value}</td>
{/if}
{else}
- {if $element.field_data_type == 'Money'}
- {if $element.field_type == 'Text'}
- <td class="html-adjust">{$element.field_value|crmMoney}</td>
+ <td class="html-adjust">
+ {if $element.contact_ref_id}
+ <a href='{crmURL p="civicrm/contact/view" q="reset=1&cid=`$element.contact_ref_id`"}'>
+ {/if}
+ {if $element.field_data_type == 'Memo'}
+ {$element.field_value|nl2br}
{else}
- <td class="html-adjust">{$element.field_value}</td>
+ {$element.field_value}
{/if}
- {else}
- <td class="html-adjust">
- {if $element.contact_ref_id}
- <a href='{crmURL p="civicrm/contact/view" q="reset=1&cid=`$element.contact_ref_id`"}'>
- {/if}
- {if $element.field_data_type == 'Memo'}
- {$element.field_value|nl2br}
- {else}
- {$element.field_value}
- {/if}
- {if $element.contact_ref_id}
+ {if $element.contact_ref_id}
</a>
- {/if}
- </td>
- {/if}
+ {/if}
+ </td>
{/if}
{/if}
</tr>