diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-29 16:29:17 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-29 16:29:17 +0100 |
| commit | 851215fce6fb91c0bdacaad99bab9456252896bf (patch) | |
| tree | a07bbdf9adc7e51e6073ef56668b16b3deb248c4 /templates/stockcomponent/view_xref_sup_item.tpl | |
| parent | efbe40f744e7c5606cfcd1a3c1670e19510a8b18 (diff) | |
| download | stock-851215fce6fb91c0bdacaad99bab9456252896bf.tar.gz stock-851215fce6fb91c0bdacaad99bab9456252896bf.tar.bz2 stock-851215fce6fb91c0bdacaad99bab9456252896bf.zip | |
Supplier xref: #SUP consolidates contact/part/price; group template for stockcomponent
- StockBase: loadXrefList() batch-fetches contact names for supplier rows
so xref_title is available in view templates (not just edit)
- StockBase: enrichXrefDisplay() handles supplier contact lookup for edit forms
- StockAssembly: enrichXrefDisplay() calls parent first for supplier handling
- schema_inc.php: #SUP template='sup'; supplier group template='sup' for
stockcomponent so view_xref_sup_group.tpl is selected
- New templates in stockcomponent/: view_xref_sup_group.tpl (Supplier/Part
No./Price/Note headings), view_xref_sup_item.tpl (contact link to
display_contact.php, dates/edit hidden in view mode), edit_xref_sup_item.tpl
- view_component.tpl: pass allow_edit=false to hide dates and action buttons
- edit_component.tpl: use getXrefListTemplate() for group dispatch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates/stockcomponent/view_xref_sup_item.tpl')
| -rw-r--r-- | templates/stockcomponent/view_xref_sup_item.tpl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/templates/stockcomponent/view_xref_sup_item.tpl b/templates/stockcomponent/view_xref_sup_item.tpl new file mode 100644 index 0000000..21377c0 --- /dev/null +++ b/templates/stockcomponent/view_xref_sup_item.tpl @@ -0,0 +1,31 @@ +{strip} +<tr class="{cycle values="even,odd"}"> + <td> + {if $gContent->mInfo.$source[xref].xref > 0} + <a href="{$smarty.const.CONTACT_PKG_URL}display_contact.php?content_id={$gContent->mInfo.$source[xref].xref|escape}">{$gContent->mInfo.$source[xref].xref_title|default:$gContent->mInfo.$source[xref].xref|escape}</a> + {else} + + {/if} + </td> + <td>{$gContent->mInfo.$source[xref].xkey|escape}</td> + <td>{$gContent->mInfo.$source[xref].xkey_ext|escape}</td> + <td>{$gContent->mInfo.$source[xref].data|escape}</td> + <td>{$gContent->mInfo.$source[xref].last_update_date|bit_short_date}</td> + {if $xrefAllowEdit|default:true} + <td> + <span class="actionicon"> + {if $gContent->hasUpdatePermission() && $source ne 'history'} + {smartlink ititle="Edit" ipackage="liberty" ifile="edit_xref.php" booticon="icon-note-edit" content_id=$gContent->mInfo.content_id xref_id=$gContent->mInfo.$source[xref].xref_id} + {/if} + {if $gContent->hasExpungePermission()} + {if $source eq 'history'} + {smartlink ititle="Restore" ipackage="liberty" ifile="edit_xref.php" booticon="icon-note-edit" content_id=$gContent->mInfo.content_id xref_id=$gContent->mInfo.$source[xref].xref_id expunge=-1} + {else} + {smartlink ititle="Delete" ipackage="liberty" ifile="edit_xref.php" booticon="icon-note-delete" content_id=$gContent->mInfo.content_id xref_id=$gContent->mInfo.$source[xref].xref_id expunge=1} + {/if} + {/if} + </span> + </td> + {/if} +</tr> +{/strip} |
