{if $row.is_permission_a_b}
<div>
{if $row.rtype EQ 'a_b' AND $is_contact_id_a}
- {if $row.is_permission_a_b == 1}
- {ts 1=$displayName 2=$row.display_name}<strong>%1</strong> can view and update information about <strong>%2</strong>{/ts} {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=1 permDisplayName=$displayName otherDisplayName=$row.display_name}
- {else}
- {ts 1=$displayName 2=$row.display_name}<strong>%1</strong> can view information about <strong>%2</strong>{/ts} {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=2 permDisplayName=$displayName otherDisplayName=$row.display_name}
- {/if}
+ {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_a_b permDisplayName=$displayName otherDisplayName=$row.display_name displayText=true}
{else}
- {if $row.is_permission_a_b == 1}
- {ts 1=$row.display_name 2=$displayName}<strong>%1</strong> can view and update information about <strong>%2</strong>{/ts} {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=1 otherDisplayName=$displayName permDisplayName=$row.display_name}
- {else}
- {ts 1=$row.display_name 2=$displayName}<strong>%1</strong> can view information about <strong>%2</strong>{/ts} {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=2 otherDisplayName=$displayName permDisplayName=$row.display_name}
- {/if}
+ {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_a_b otherDisplayName=$displayName permDisplayName=$row.display_name displayText=true}
{/if}
</div>
{/if}
{if $row.is_permission_b_a}
<div>
{if $row.rtype EQ 'a_b' AND $is_contact_id_a}
- {if $row.is_permission_b_a == 1}
- {ts 1=$row.display_name 2=$displayName}<strong>%1</strong> can view and update information about <strong>%2</strong>{/ts} {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=1 otherDisplayName=$displayName permDisplayName=$row.display_name}
- {else}
- {ts 1=$row.display_name 2=$displayName}<strong>%1</strong> can view information about <strong>%2</strong>{/ts} {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=2 otherDisplayName=$displayName permDisplayName=$row.display_name}
- {/if}
+ {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_b_a otherDisplayName=$displayName permDisplayName=$row.display_name displayText=true}
{else}
- {if $row.is_permission_b_a == 1}
- {ts 1=$displayName 2=$row.display_name}<strong>%1</strong> can view and update information about <strong>%2</strong>{/ts} {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=1 permDisplayName=$displayName otherDisplayName=$row.display_name}
- {else}
- {ts 1=$displayName 2=$row.display_name}<strong>%1</strong> can view information about <strong>%2</strong>{/ts} {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=2 permDisplayName=$displayName otherDisplayName=$row.display_name}
- {/if}
+ {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=$row.is_permission_b_a permDisplayName=$displayName otherDisplayName=$row.display_name displayText=true}
{/if}
</div>
{/if}
<h3>{ts}Current Relationships{/ts}</h3>
{include file="CRM/Contact/Page/View/RelationshipSelector.tpl" context="current"}
<div id="permission-legend" class="crm-content-block">
- <span class="label">Permissioned Relationships: </span>
- <i class="crm-i fa-eye"></i>
- {ts}This contact can be viewed by the other.{/ts}
- <i class="crm-i fa-asterisk"></i>
- {ts}This contact can be viewed and updated by the other.{/ts}
+ <span class="label">Permissioned Relationships: </span>
+ {include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=1 afterText=true}
</div>
<div class="spacer"></div>
*}
{* Partial for displaying permissions associated with a relationship *}
+{if $displayText}
{if $permType eq 1}
-{include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=2}
+{ts 1=$permDisplayName 2=$otherDisplayName}<strong>%1</strong> can view and update information about <strong>%2</strong>.{/ts}
+{else}
+{ts 1=$permDisplayName 2=$otherDisplayName}<strong>%1</strong> can view information about <strong>%2</strong>.{/ts}
+{/if}
+{/if}
+
+{if $permType eq 1}
+{include file="CRM/Contact/Page/View/RelationshipPerm.tpl" permType=2 displayText=false}
{/if}
+{if $permDisplayName and $otherDisplayName}
{capture assign="permText"}
{if $permType eq 1}
-{ts 1=$permDisplayName 2=$otherDisplayName}%2 can be edited by %1{/ts}
+{ts 1=$permDisplayName 2=$otherDisplayName}%2 can be edited by %1.{/ts}
{else}
-{ts 1=$permDisplayName 2=$otherDisplayName}%2 can be viewed by %1{/ts}
+{ts 1=$permDisplayName 2=$otherDisplayName}%2 can be viewed by %1.{/ts}
{/if}
{/capture}
+{/if}
<span class="fa-stack" title="{$permText}">
<i class="crm-i fa-square fa-stack-2x {if $permType eq 1}crm-i-blue{else}crm-i-green{/if}"></i>
<i class="crm-i {if $permType eq 1}fa-pencil{else}fa-eye{/if} fa-inverse fa-stack-1x"></i>
</span>
+
+{if $afterText}
+{if $permType eq 1}
+{ts}This contact can be edited by the other.{/ts}
+{else}
+{ts}This contact can be viewed by the other.{/ts}
+{/if}
+{/if}