summaryrefslogtreecommitdiff
path: root/templates/view_assembly.tpl
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-06 10:15:47 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-06 10:15:47 +0100
commitb2ae92f41dc18de0a212e579ee4b1e3362e5a4a6 (patch)
treecb36db6525c42c4227f7fcc386843db1824697f3 /templates/view_assembly.tpl
parentccb6c9dfdcee8d10fe845b08cea9f76fd3530a70 (diff)
downloadstock-b2ae92f41dc18de0a212e579ee4b1e3362e5a4a6.tar.gz
stock-b2ae92f41dc18de0a212e579ee4b1e3362e5a4a6.tar.bz2
stock-b2ae92f41dc18de0a212e579ee4b1e3362e5a4a6.zip
Refactor xref display to LibertyXrefGroup path throughout
- StockBase/StockAssembly/StockMovement: add loadXrefInfo() overrides to enrich supplier group with contact titles and BOM group with component titles, descriptions and pack sizes - display_stock_assembly_inc, view/edit_component, view/edit_assembly, view_movement: replace getXrefGroupList() with loadXrefInfo() + assign gXrefInfo; edit pages pass allow_edit=true - All view/edit templates: switch {section} over stockXxx_types arrays to {foreach $gXrefInfo->mGroups as $xrefGroup} object path - BOM and supplier group templates rewritten: $xrefGroup object, column widths, class="table", conditional colspan - All BOM/supplier item templates: $gContent->mInfo.$source[xref].x -> $xrefInfo.x; $source ne 'history' -> $isHistory - Dead code removed: list_xref_stock.tpl, view_xref_pck_item.tpl Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates/view_assembly.tpl')
-rwxr-xr-xtemplates/view_assembly.tpl12
1 files changed, 5 insertions, 7 deletions
diff --git a/templates/view_assembly.tpl b/templates/view_assembly.tpl
index 564f97f..b1ef284 100755
--- a/templates/view_assembly.tpl
+++ b/templates/view_assembly.tpl
@@ -13,14 +13,12 @@
{/if}
{include file="`$smarty.const.STOCK_PKG_PATH`assembly_views/`$galLayout`/stock_`$galLayout`_inc.tpl"}
-{if $gContent->mInfo.stockassembly_types}
+{if $gXrefInfo->mGroups}
{jstabs}
- {section name=xrefGroup loop=$gContent->mInfo.stockassembly_types}
- {include file=$gContent->getXrefListTemplate($gContent->mInfo.stockassembly_types[xrefGroup].template)
- source=$gContent->mInfo.stockassembly_types[xrefGroup].source
- source_title=$gContent->mInfo.stockassembly_types[xrefGroup].title
- group=$gContent->mInfo.stockassembly_types[xrefGroup].sort_order
+ {foreach $gXrefInfo->mGroups as $xrefGroup}
+ {include file=$gContent->getXrefListTemplate($xrefGroup->mTemplate)
+ xrefGroup=$xrefGroup
allow_edit=false}
- {/section}
+ {/foreach}
{/jstabs}
{/if}