summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-06 15:55:45 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-06 15:55:45 +0100
commit4425c6b4acd016085c537631c4738ca2fca90eaf (patch)
treee7f8079f9e32b93af92dce18bd6005a4aabd5d06
parentcf124b2b5e5d7a7663c2dfafa970ca191216f143 (diff)
downloadcontact-4425c6b4acd016085c537631c4738ca2fca90eaf.tar.gz
contact-4425c6b4acd016085c537631c4738ca2fca90eaf.tar.bz2
contact-4425c6b4acd016085c537631c4738ca2fca90eaf.zip
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 <noreply@anthropic.com>
-rwxr-xr-xdisplay_contact.php2
-rwxr-xr-xtemplates/display_contact.tpl10
-rw-r--r--templates/view_xref_contact_group.tpl6
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 @@
<table class="table">
<thead>
<tr>
- <th style="width:30%">{tr}Type{/tr}</th>
- <th style="width:30%">{tr}Value{/tr}</th>
- <th style="width:40%">{tr}Note{/tr}</th>
+ <th>{tr}Type{/tr}</th>
+ <th>{tr}Value{/tr}</th>
+ <th>{tr}Note{/tr}</th>
{if $xrefAllowEdit}<th>{tr}Added{/tr}</th><th>{tr}Edit{/tr}</th>{/if}
</tr>
</thead>