From 3bb59daf6c873207854a8bc3e8176ad70da26931 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 3 Mar 2016 17:21:48 -0500 Subject: [PATCH] CRM-15789 - contact merge: restore that was accidentally deleted ---------------------------------------- * CRM-15789: Add icons to submit buttons https://issues.civicrm.org/jira/browse/CRM-15789 --- templates/CRM/Contact/Form/Merge.tpl | 313 ++++++++++++++------------- 1 file changed, 157 insertions(+), 156 deletions(-) diff --git a/templates/CRM/Contact/Form/Merge.tpl b/templates/CRM/Contact/Form/Merge.tpl index d55abc3946..4611605994 100644 --- a/templates/CRM/Contact/Form/Merge.tpl +++ b/templates/CRM/Contact/Form/Merge.tpl @@ -24,193 +24,194 @@ +--------------------------------------------------------------------+ *}
-
-{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"} -
- -
-
- {ts}WARNING: The duplicate contact record WILL BE DELETED after the merge is complete.{/ts} -
+
+ {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"} +
-{if $user}
- {ts 1=$config->userFramework}WARNING: There are %1 user accounts associated with both the original and duplicate contacts. Ensure that the %1 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 unlinked from the associated contact record (which will be deleted). -You will need to manually delete that user (click on the link to open the %1 user account in new screen). You may need to give thought to how you handle any content or contents associated with that user.{/ts} + {ts}WARNING: The duplicate contact record WILL BE DELETED after the merge is complete.{/ts}
-{/if} -
- {include file="CRM/common/formButtons.tpl" location="top"} -
+ {if $user} +
+
+ {ts 1=$config->userFramework}WARNING: There are %1 user accounts associated with both the original and duplicate contacts. Ensure that the %1 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 unlinked from the associated contact record (which will be deleted). + You will need to manually delete that user (click on the link to open the %1 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="top"} +
- + - + - + - - - - - - - - - - {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} +
 {$other_name} ({ts}duplicate{/ts}){ts}Mark All{/ts}
=={$form.toggleSelect.html} ==>
{$main_name}Add/overwrite?
Last modified{$other_result.values.0.modified_date|crmDate} {if $other_result.values.0.modified_date gt $main_result.values.0.modified_date} (Most recent) {/if}{$main_result.values.0.modified_date|crmDate} {if $main_result.values.0.modified_date gt $other_result.values.0.modified_date} (Most recent) {/if}
- {$row.title} -
- {$row.title} -
+ + + + + + + - {assign var=position value=$field|strrpos:'_'} - {assign var=blockId value=$field|substr:$position+1} - {assign var=blockName value=$field|substr:14:$position-14} + {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} - + + + + + + + - {* 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"} + {foreach from=$rows item=row key=field} + {if !isset($row.main) && !isset($row.other)} + - + {else} + {if $row.main eq $row.other} + + {else} + + {/if} + {/if} - {* For non-location blocks *} - {else} + {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} + {/if} - - {/foreach} + + {/foreach} - {foreach from=$rel_tables item=params key=paramName} - {if $paramName eq 'move_rel_table_users'} + {foreach from=$rel_tables item=params key=paramName} + {if $paramName eq 'move_rel_table_users'} + + {/if} + + + {else} - {/if} - - - {else} - - - - - {/if} - {/foreach} -
 {$other_name} ({ts}duplicate{/ts}){ts}Mark All{/ts}
=={$form.toggleSelect.html} ==>
{$main_name}Add/overwrite?
- {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} -
Last modified{$other_result.values.0.modified_date|crmDate} {if $other_result.values.0.modified_date gt $main_result.values.0.modified_date} (Most recent) {/if}{$main_result.values.0.modified_date|crmDate} {if $main_result.values.0.modified_date gt $other_result.values.0.modified_date} (Most recent) {/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} + {$row.title}
- {* Display location for fields with locations *} - {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.location.$blockName.$blockId.typeTypeId.html}  - {/if} - - {* Display the overwrite/add/add new label *} - - {if $row.main} - ({ts}overwrite{/ts})  - {if $blockName eq 'email' || $blockName eq 'phone' } - {$form.location.$blockName.$blockId.operation.html}  - {/if} -
- {else} - ({ts}add{/ts})  - {/if} -
+ {$row.title}
- - {if !is_array($row.main)} - {$row.main} - {elseif $row.main.fileName} - {$row.main.fileName} - {else} - {', '|implode:$row.main} - {/if} - + {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 isset($row.main) || isset($row.other)} + + {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} + + {* Display location for fields with locations *} + {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.location.$blockName.$blockId.typeTypeId.html}  + {/if} + + {* Display the overwrite/add/add new label *} + + {if $row.main} + ({ts}overwrite{/ts})  + {if $blockName eq 'email' || $blockName eq 'phone' } + {$form.location.$blockName.$blockId.operation.html}  + {/if} +
+ {else} + ({ts}add{/ts})  + {/if} +
+
- {if $row.main == $row.other} - ({ts}match{/ts})
- {elseif $row.main} - ({ts}overwrite{/ts})
- {else} - ({ts}add{/ts}) + {if !is_array($row.main)} + {$row.main} + {elseif $row.main.fileName} + {$row.main.fileName} + {else} + {', '|implode:$row.main} {/if}
- {/if} -
+ {if isset($row.main) || isset($row.other)} + + {if $row.main == $row.other} + ({ts}match{/ts})
+ {elseif $row.main} + ({ts}overwrite{/ts})
+ {else} + ({ts}add{/ts}) + {/if} +
+ {/if} +
{ts}Move related...{/ts}{if $otherUfId}{$otherUfName}=={$form.$paramName.html|crmAddClass:"select-row"}==>{else}{if $mainUfId}{$mainUfName}{/if}({ts}migrate{/ts})
{ts}Move related...{/ts}{if $otherUfId}{$otherUfName}=={$form.$paramName.html|crmAddClass:"select-row"}==>{else}{if $mainUfId}{$mainUfName}{/if}({ts}migrate{/ts})
{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}({ts}migrate{/ts})
-
- - -
+ {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} + ({ts}migrate{/ts}) + + {/if} + {/foreach} + +
+ + +
-
- {include file="CRM/common/formButtons.tpl" location="bottom"} +
+ {include file="CRM/common/formButtons.tpl" location="bottom"} +
{literal} -- 2.25.1