diff --git a/templates/CRM/Contact/Form/Relationship.tpl b/templates/CRM/Contact/Form/Relationship.tpl index 37f9a5a6271b..f1fc994faa89 100644 --- a/templates/CRM/Contact/Form/Relationship.tpl +++ b/templates/CRM/Contact/Form/Relationship.tpl @@ -9,65 +9,6 @@ *} {* this template is used for adding/editing/viewing relationships *} - {if $action eq 4 } {* action = view *} -
- - {foreach from=$viewRelationship item="row"} - - - - - {if $isCurrentEmployer} - - {/if} - {if $row.start_date} - - {/if} - {if $row.end_date} - - {/if} - {if $row.description} - - {/if} - {foreach from=$viewNote item="rec"} - {if $rec } - - {/if} - {/foreach} - - - - - - {/foreach} -
{$row.relation}{$row.name}
{ts}Current Employee?{/ts}{ts}Yes{/ts}
{ts}Start Date{/ts}{$row.start_date|crmDate}
{ts}End Date{/ts}{$row.end_date|crmDate}
{ts}Description{/ts}{$row.description}
{ts}Note{/ts}{$rec}
- {if $row.is_permission_a_b or $row.is_permission_b_a} - {if $row.is_permission_a_b} -
- {if $row.rtype EQ 'a_b' AND $is_contact_id_a} - {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_a_b permDisplayName=$displayName otherDisplayName=$row.display_name displayText=true} - {else} - {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_a_b otherDisplayName=$displayName permDisplayName=$row.display_name displayText=true} - {/if} -
- {/if} - {if $row.is_permission_b_a} -
- {if $row.rtype EQ 'a_b' AND $is_contact_id_a} - {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_b_a otherDisplayName=$displayName permDisplayName=$row.display_name displayText=true} - {else} - {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_b_a permDisplayName=$displayName otherDisplayName=$row.display_name displayText=true} - {/if} -
- {/if} - {else} - {ts}None{/ts} - {/if} -
{ts}Status{/ts}{if $row.is_active}{ts}Enabled{/ts}{else}{ts}Disabled{/ts}{/if}
- {include file="CRM/Custom/Page/CustomDataView.tpl"} -
- {/if} - {if $action eq 2 or $action eq 1} {* add and update actions *}
diff --git a/templates/CRM/Contact/Page/View/Relationship.tpl b/templates/CRM/Contact/Page/View/Relationship.tpl index 2cffd1e82f03..bdc7ac33cd91 100644 --- a/templates/CRM/Contact/Page/View/Relationship.tpl +++ b/templates/CRM/Contact/Page/View/Relationship.tpl @@ -8,7 +8,9 @@ +--------------------------------------------------------------------+ *} {* Relationship tab within View Contact - browse, and view relationships for a contact *} -{if $action neq 16} {* add, update or view *} +{if $action eq 4 } {* action = view *} + {include file="CRM/Contact/Page/View/ViewRelationship.tpl"} +{elseif $action neq 16} {* add, update *} {include file="CRM/Contact/Form/Relationship.tpl"} {else}
diff --git a/templates/CRM/Contact/Page/View/ViewRelationship.tpl b/templates/CRM/Contact/Page/View/ViewRelationship.tpl new file mode 100644 index 000000000000..1c675a13a19e --- /dev/null +++ b/templates/CRM/Contact/Page/View/ViewRelationship.tpl @@ -0,0 +1,58 @@ +
+
+ {foreach from=$viewRelationship item="row"} + + + + + {if $isCurrentEmployer} + + {/if} + {if $row.start_date} + + {/if} + {if $row.end_date} + + {/if} + {if $row.description} + + {/if} + {foreach from=$viewNote item="rec"} + {if $rec } + + {/if} + {/foreach} + + + + + + {/foreach} +
{$row.relation}{$row.name}
{ts}Current Employee?{/ts}{ts}Yes{/ts}
{ts}Start Date{/ts}{$row.start_date|crmDate}
{ts}End Date{/ts}{$row.end_date|crmDate}
{ts}Description{/ts}{$row.description}
{ts}Note{/ts}{$rec}
+ {if $row.is_permission_a_b or $row.is_permission_b_a} + {if $row.is_permission_a_b} +
+ {if $row.rtype EQ 'a_b' AND $is_contact_id_a} + {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_a_b permDisplayName=$displayName otherDisplayName=$row.display_name displayText=true} + {else} + {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_a_b otherDisplayName=$displayName permDisplayName=$row.display_name displayText=true} + {/if} +
+ {/if} + {if $row.is_permission_b_a} +
+ {if $row.rtype EQ 'a_b' AND $is_contact_id_a} + {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_b_a otherDisplayName=$displayName permDisplayName=$row.display_name displayText=true} + {else} + {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_b_a permDisplayName=$displayName otherDisplayName=$row.display_name displayText=true} + {/if} +
+ {/if} + {else} + {ts}None{/ts} + {/if} +
{ts}Status{/ts}{if $row.is_active}{ts}Enabled{/ts}{else}{ts}Disabled{/ts}{/if}
+ {include file="CRM/Custom/Page/CustomDataView.tpl"} +
+ +
{include file="CRM/common/formButtons.tpl" location="bottom"}