From 5ac3b6dbd4b2ee1280b18b26b85b552504b09827 Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Sat, 6 Jun 2026 10:42:26 +0100 Subject: address/phone item templates: replace $source with $isHistory Co-Authored-By: Claude Sonnet 4.6 --- templates/view_xref_address_item.tpl | 6 +++--- templates/view_xref_phone_item.tpl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/view_xref_address_item.tpl b/templates/view_xref_address_item.tpl index 368aef6..fc351c7 100755 --- a/templates/view_xref_address_item.tpl +++ b/templates/view_xref_address_item.tpl @@ -10,7 +10,7 @@ {if $xrefAllowEdit} -{if $source ne 'history' } +{if !$isHistory } {$xrefInfo.start_date|bit_short_date} {else} {$xrefInfo.end_date|bit_short_date} @@ -26,11 +26,11 @@ {if $gBitUser->hasPermission( 'p_contact_view_detail' )} {smartlink ititle="View" ifile="view_xref.php" biticon="view-fullscreen" content_id=$gContent->mInfo.content_id xref_id=$xrefInfo.xref_id} {/if} - {if $gBitUser->hasPermission( 'p_contact_update' ) && $source ne 'history' } + {if $gBitUser->hasPermission( 'p_contact_update' ) && !$isHistory } {smartlink ititle="Edit" ifile="edit_xref.php" biticon="edit" content_id=$gContent->mInfo.content_id xref_id=$xrefInfo.xref_id} {/if} {if $gBitUser->hasPermission( 'p_contact_expunge' ) && $xrefInfo.item ne 'KEY_B' } - {if $source eq 'history' } + {if $isHistory } {smartlink ititle="Restore" ifile="edit_xref.php" biticon="edit" content_id=$gContent->mInfo.content_id xref_id=$xrefInfo.xref_id expunge=-1} {else} {smartlink ititle="Delete" ifile="edit_xref.php" biticon="user-trash" content_id=$gContent->mInfo.content_id xref_id=$xrefInfo.xref_id expunge=1} diff --git a/templates/view_xref_phone_item.tpl b/templates/view_xref_phone_item.tpl index 751948f..e24decc 100755 --- a/templates/view_xref_phone_item.tpl +++ b/templates/view_xref_phone_item.tpl @@ -10,7 +10,7 @@ {if $xrefAllowEdit} -{if $source ne 'history' } +{if !$isHistory } {$xrefInfo.start_date|bit_short_date} {else} {$xrefInfo.end_date|bit_short_date} @@ -23,11 +23,11 @@ {/if} - {if $gBitUser->hasPermission( 'p_contact_update' ) && $source ne 'history' } + {if $gBitUser->hasPermission( 'p_contact_update' ) && !$isHistory } {smartlink ititle="Edit" ifile="edit_xref.php" biticon="edit" content_id=$gContent->mInfo.content_id xref_id=$xrefInfo.xref_id} {/if} {if $gBitUser->hasPermission( 'p_contact_expunge' ) } - {if $source eq 'history' } + {if $isHistory } {smartlink ititle="Restore" ifile="edit_xref.php" biticon="edit" content_id=$gContent->mInfo.content_id xref_id=$xrefInfo.xref_id expunge=-1} {else} {smartlink ititle="Delete" ifile="edit_xref.php" biticon="user-trash" content_id=$gContent->mInfo.content_id xref_id=$xrefInfo.xref_id expunge=1} -- cgit v1.3