diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-06 10:22:08 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-06 10:22:08 +0100 |
| commit | d1ca207109e01e511636f39a6de4e35082f44f43 (patch) | |
| tree | 57cba7a29e054f030c80b1e129cd9c5e10001a38 | |
| parent | c9fba0f4a2f905e45af794a8d50a7c9af19ced0e (diff) | |
| download | contact-d1ca207109e01e511636f39a6de4e35082f44f43.tar.gz contact-d1ca207109e01e511636f39a6de4e35082f44f43.tar.bz2 contact-d1ca207109e01e511636f39a6de4e35082f44f43.zip | |
edit: switch xref tabs to LibertyXrefGroup path
Replace contact_xref_groups/getXrefGroupList() with loadXrefInfo() +
gXrefInfo; edit.tpl uses {foreach $gXrefInfo->mGroups}.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| -rwxr-xr-x | edit.php | 3 | ||||
| -rwxr-xr-x | templates/edit.tpl | 12 |
2 files changed, 7 insertions, 8 deletions
@@ -70,7 +70,8 @@ if( empty( $formInfo ) ) { } $isPerson = !empty( $gContent->mInfo['contact_types'][0]['content_id'] ); -$gContent->mInfo['contact_xref_groups'] = $gContent->getXrefGroupList(); +$gContent->loadXrefInfo(); +$gBitSmarty->assign( 'gXrefInfo', $gContent->mXrefInfo ); $gBitSmarty->assign( 'isPerson', $isPerson ); $allTypes = $gContent->getXrefSourceList(); diff --git a/templates/edit.tpl b/templates/edit.tpl index ca3b9cb..9caf1d9 100755 --- a/templates/edit.tpl +++ b/templates/edit.tpl @@ -99,16 +99,14 @@ {/legend} - {if $gContent->mInfo.contact_xref_groups && $gContent->isValid()} + {if $gXrefInfo->mGroups && $gContent->isValid()} {jstabs} - {section name=xrefGroup loop=$gContent->mInfo.contact_xref_groups} - {include file=$gContent->getXrefListTemplate($gContent->mInfo.contact_xref_groups[xrefGroup].template) - source=$gContent->mInfo.contact_xref_groups[xrefGroup].source - source_title=$gContent->mInfo.contact_xref_groups[xrefGroup].title - group=$gContent->mInfo.contact_xref_groups[xrefGroup].sort_order + {foreach $gXrefInfo->mGroups as $xrefGroup} + {include file=$gContent->getXrefListTemplate($xrefGroup->mTemplate) + xrefGroup=$xrefGroup allow_add=true allow_edit=true} - {/section} + {/foreach} {/jstabs} {/if} |
