{* +--------------------------------------------------------------------+ | CiviCRM version 4.7 | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2015 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | | CiviCRM is free software; you can copy, modify, and distribute it | | under the terms of the GNU Affero General Public License | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | | | CiviCRM is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | See the GNU Affero General Public License for more details. | | | | You should have received a copy of the GNU Affero General Public | | License and the CiviCRM Licensing Exception along | | with this program; if not, contact CiviCRM LLC | | at info[AT]civicrm[DOT]org. If you have questions about the | | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *}
{ts}Click Merge to move data from the Duplicate Contact on the left into the Main Contact. In addition to the contact data (address, phone, email...), you may choose to move all or some of the related activity records (groups, contributions, memberships, etc.).{/ts} {help id="intro"}
{include file="CRM/common/formButtons.tpl" location="top"} {if $prev} {ts}Previous{/ts}{/if} {if $next}{ts}Next{/ts} {/if}
{crmAPI var='other_result' entity='Contact' action='get' return="modified_date" id=$other_cid} {crmAPI var='main_result' entity='Contact' action='get' return="modified_date" id=$main_cid} {foreach from=$rows item=row key=field} {if !isset($row.main) && !isset($row.other)} {else} {if $row.main eq $row.other} {else} {/if} {/if} {assign var=position value=$field|strrpos:'_'} {assign var=blockId value=$field|substr:$position+1} {assign var=blockName value=$field|substr:14:$position-14} {* For location blocks *} {if $row.title|substr:0:5 == "Email" OR $row.title|substr:0:7 == "Address" OR $row.title|substr:0:2 == "IM" OR $row.title|substr:0:7 == "Website" OR $row.title|substr:0:5 == "Phone"} {* For non-location blocks *} {else} {/if} {/foreach} {foreach from=$rel_tables item=params key=paramName} {if $paramName eq 'move_rel_table_users'} {/if} {else} {/if} {/foreach}
  {$other_name} ({ts}duplicate{/ts}) {ts}Mark All{/ts}
=={$form.toggleSelect.html} ==>
{$main_name} Add/overwrite?
Last modified {$other_result.values.0.modified_date|date_format:"%d/%m/%y %H:%M:%S"} {if $other_result.values.0.modified_date gt $main_result.values.0.modified_date} (Most recent) {/if} {$main_result.values.0.modified_date|date_format:"%d/%m/%y %H:%M:%S"} {if $main_result.values.0.modified_date gt $other_result.values.0.modified_date} (Most recent) {/if}
{$row.title}
{$row.title} {if $row.title|substr:0:7 == "Address"}{else}{/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|crmAddClass:"select-row"}==>{/if} {if $row.title|substr:0:7 == "Address"}{else}{/if}{if !is_array($row.main)}{$row.main}{elseif $row.main.fileName}{$row.main.fileName}{else}{', '|implode:$row.main}{/if} {if $blockName eq 'email' || $blockName eq 'phone' || $blockName eq 'address' || $blockName eq 'im' } {$form.location.$blockName.$blockId.locTypeId.html}  {/if} {* Display other_type_id for websites, ims and phones *} {if $blockName eq 'website' || $blockName eq 'im' || $blockName eq 'phone' } {$form.type.$blockName.$blockId.typeTypeId.html}  {/if} {if $blockName eq 'email' || $blockName eq 'phone' || $blockName eq 'website' || $blockName eq 'im' } {if $row.main} (overwrite){$form.location.$blockName.$blockId.html} 
{else} (add) {/if}
{/if} {literal} {/literal}
{if !is_array($row.main)} {$row.main} {elseif $row.main.fileName} {$row.main.fileName} {else} {', '|implode:$row.main} {/if} {if isset($row.main) || isset($row.other)} {if $row.main} (overwrite)
{else} (add) {/if}
{/if}
{ts}Move related...{/ts}{if $otherUfId}{$otherUfName}=={$form.$paramName.html|crmAddClass:"select-row"}==>{else}{if $mainUfId}{$mainUfName}{/if} (migrate)
{ts}Move related...{/ts}{$params.title}=={$form.$paramName.html|crmAddClass:"select-row"}==>{$params.title}{if $form.operation.$paramName.add.html} {$form.operation.$paramName.add.html}{/if} (migrate)

{ts}WARNING: The duplicate contact record WILL BE DELETED after the merge is complete.{/ts}

{if $user}

{ts 1=$config->userFramework}There are %1 user accounts associated with both the original and duplicate contacts. Ensure that the Drupal User you want to retain is on the right - if necessary use the 'Flip between original and duplicate contacts.' option at top to swap the positions of the two records before doing the merge. The user record associated with the duplicate contact will not be deleted, but will be un-linked from the associated contact record (which will be deleted). You will need to manually delete that user (click on the link to open Drupal User account in new screen). You may need to give thought to how you handle any content or contents associated with that user.{/ts}

{/if}
{include file="CRM/common/formButtons.tpl" location="bottom"}
{literal} {/literal} {* process the dupe contacts *} {include file="CRM/common/dedupe.tpl"}