CRM-14961 - Fix (mostly) for display on Merge screen. Still need to fix postProcess...
authorDave Greenberg <dave@civicrm.org>
Fri, 11 Jul 2014 22:49:00 +0000 (15:49 -0700)
committerDave Greenberg <dave@civicrm.org>
Fri, 11 Jul 2014 22:49:00 +0000 (15:49 -0700)
----------------------------------------
* CRM-14961:
  https://issues.civicrm.org/jira/browse/CRM-14961

CRM/Contact/Form/Merge.php
templates/CRM/Contact/Form/Merge.tpl

index d818628bc16b01f8cf337d8b9b88677b43d25d0a..75ae4ef10a8076f96d298a6925eca2a8f5aa0eab 100644 (file)
@@ -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']);
index e5fd182fb9fc203cff7797e2ae3bf1778986ae70..2858410663bee38222990b9816158512c4bceac6 100644 (file)
 <table>
   <tr class="columnheader">
     <th>&nbsp;</th>
-    <th><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$other_cid"}">{$other_name}&nbsp;<em>{$other_contact_subtype}</em></a> ({ts}duplicate{/ts})</th>
+    <th><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$other_cid"}">{$other_name}</a> ({ts}duplicate{/ts})</th>
     <th>{ts}Mark All{/ts}<br />=={$form.toggleSelect.html} ==&gt;</th>
-    <th><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$main_cid"}">{$main_name}&nbsp;<em>{$main_contact_subtype}</em></a></th>
+    <th><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$main_cid"}">{$main_name}</a></th>
   </tr>
   {foreach from=$rows item=row key=field}
      <tr class="{cycle values="odd-row,even-row"}">
         <td>{$row.title}</td>
         <td>
-           {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}
         </td>
         <td style='white-space: nowrap'>{if $form.$field}=={$form.$field.html}==&gt;{/if}</td>
         <td>
             <span id="main_{$blockName}_{$blockId}">
               {if !is_array($row.main)}
                 {$row.main}
-              {else}
+              {elseif $row.main.fileName}
                 {$row.main.fileName}
+              {else}
+                {', '|implode:$row.main}
               {/if}
             </span>
         </td>