From 4425c6b4acd016085c537631c4738ca2fca90eaf Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Sat, 6 Jun 2026 15:55:45 +0100 Subject: display_contact: migrate to loadXrefInfo/gXrefInfo path display_contact.php: replace getXrefGroupList() with loadXrefInfo() and assign gXrefInfo to Smarty. display_contact.tpl: replace old $source loop with xrefGroup foreach. view_xref_contact_group.tpl: remove fixed column widths. Co-Authored-By: Claude Sonnet 4.6 --- display_contact.php | 2 +- templates/display_contact.tpl | 10 +++++++--- templates/view_xref_contact_group.tpl | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/display_contact.php b/display_contact.php index c9cd179..891cd16 100755 --- a/display_contact.php +++ b/display_contact.php @@ -51,7 +51,7 @@ if ($gContent->isCommentable()) { } } -$gContent->mInfo['type'] = $gContent->getXrefGroupList(); +$gBitSmarty->assign( 'gXrefInfo', $gContent->mXrefInfo ); $gBitSystem->setBrowserTitle( $gContent->mInfo['title'] ); $gBitSystem->display( 'bitpackage:contact/show_contact.tpl'); diff --git a/templates/display_contact.tpl b/templates/display_contact.tpl index be3ed4e..8512d33 100755 --- a/templates/display_contact.tpl +++ b/templates/display_contact.tpl @@ -57,8 +57,12 @@ {include file="bitpackage:contact/display_address.tpl" header=$gContent->mInfo.address[address].source_title address=$gContent->mInfo.address[address] locate=1} {/section} + {if $gXrefInfo->mGroups} {jstabs} - {section name=type loop=$gContent->mInfo.type} - {include file="bitpackage:liberty/list_xref.tpl" source=$gContent->mInfo.type[type].source source_title=$gContent->mInfo.type[type].title group=$gContent->mInfo.type[type].sort_order allow_edit=false} - {/section} + {foreach $gXrefInfo->mGroups as $xrefGroup} + {include file=$gContent->getXrefListTemplate($xrefGroup->mTemplate) + xrefGroup=$xrefGroup + allow_edit=false} + {/foreach} {/jstabs} + {/if} diff --git a/templates/view_xref_contact_group.tpl b/templates/view_xref_contact_group.tpl index 549985e..bc08c03 100644 --- a/templates/view_xref_contact_group.tpl +++ b/templates/view_xref_contact_group.tpl @@ -5,9 +5,9 @@ - - - + + + {if $xrefAllowEdit}{/if} -- cgit v1.3
{tr}Type{/tr}{tr}Value{/tr}{tr}Note{/tr}{tr}Type{/tr}{tr}Value{/tr}{tr}Note{/tr}{tr}Added{/tr}{tr}Edit{/tr}