From d621a53d1a3273fccbdb4e2c542b5e2fab42f5af Mon Sep 17 00:00:00 2001 From: vitius1 <36272679+vitius1@users.noreply.github.com> Date: Thu, 28 Jul 2022 11:21:42 +0200 Subject: [PATCH] CustomDataView.tpl clickable contact reference In manage case if we have custom field as contact reference we cant click on this contact. I used same condition as CRM/Custom/Page/CustomDataView.tpl, which create clickable contact reference. --- templates/CRM/Case/Page/CustomDataView.tpl | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/templates/CRM/Case/Page/CustomDataView.tpl b/templates/CRM/Case/Page/CustomDataView.tpl index 2c45673ceb..d8a4e2ba97 100644 --- a/templates/CRM/Case/Page/CustomDataView.tpl +++ b/templates/CRM/Case/Page/CustomDataView.tpl @@ -23,13 +23,23 @@ <td class="label">{$element.field_title}</td> <td class="html-adjust"> {* sort by fails for option per line. Added a variable to iterate through the element array*} - {foreach from=$element.field_value item=val} - {$val}<br/> - {/foreach} + {if $element.field_data_type EQ 'ContactReference' && $element.contact_ref_links} + {', '|implode:$element.contact_ref_links} + {else} + {foreach from=$element.field_value item=val} + {$val}<br/> + {/foreach} + {/if} </td> {else} <td class="label">{$element.field_title}</td> - <td class="html-adjust">{$element.field_value}</td> + <td class="html-adjust"> + {if $element.field_data_type EQ 'ContactReference' && $element.contact_ref_links} + {', '|implode:$element.contact_ref_links} + {else} + {$element.field_value} + {/if} + </td> {/if} </tr> </table> -- 2.25.1