From f1f2780003aa5b20e9fcd3fbd836e042bd2eb23d Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Fri, 11 Jul 2014 15:49:00 -0700 Subject: [PATCH] CRM-14961 - Fix (mostly) for display on Merge screen. Still need to fix postProcess and convert contact_type.name to label. ---------------------------------------- * CRM-14961: https://issues.civicrm.org/jira/browse/CRM-14961 --- CRM/Contact/Form/Merge.php | 4 ++-- templates/CRM/Contact/Form/Merge.tpl | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php index d818628bc1..75ae4ef10a 100644 --- a/CRM/Contact/Form/Merge.php +++ b/CRM/Contact/Form/Merge.php @@ -199,12 +199,12 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { $this->assign('contact_type', $main['contact_type']); if (!empty($main['contact_sub_type'])) { $this->assign('main_contact_subtype', - CRM_Utils_Array::value('contact_sub_type', $subtypes[$main['contact_sub_type'][0]]) + CRM_Utils_Array::value($main['contact_sub_type'][0], $subtypes) ); } if (!empty($other['contact_sub_type'])) { $this->assign('other_contact_subtype', - CRM_Utils_Array::value('contact_sub_type', $subtypes[$other['contact_sub_type'][0]]) + CRM_Utils_Array::value($other['contact_sub_type'][0], $subtypes) ); } $this->assign('main_name', $main['display_name']); diff --git a/templates/CRM/Contact/Form/Merge.tpl b/templates/CRM/Contact/Form/Merge.tpl index e5fd182fb9..2858410663 100644 --- a/templates/CRM/Contact/Form/Merge.tpl +++ b/templates/CRM/Contact/Form/Merge.tpl @@ -41,19 +41,21 @@ - + - + {foreach from=$rows item=row key=field} -- 2.25.1
 {$other_name} {$other_contact_subtype} ({ts}duplicate{/ts}){$other_name} ({ts}duplicate{/ts}) {ts}Mark All{/ts}
=={$form.toggleSelect.html} ==>
{$main_name} {$main_contact_subtype}{$main_name}
{$row.title} - {if !is_array($row.other)} - {$row.other} - {else} - {$row.other.fileName} - {/if} + {if !is_array($row.other)} + {$row.other} + {elseif $row.other.fileName} + {$row.other.fileName} + {else} + {', '|implode:$row.other} + {/if} {if $form.$field}=={$form.$field.html}==>{/if} @@ -100,8 +102,10 @@ {if !is_array($row.main)} {$row.main} - {else} + {elseif $row.main.fileName} {$row.main.fileName} + {else} + {', '|implode:$row.main} {/if}