diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-08 07:32:20 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-08 07:32:20 +0100 |
| commit | 5e0af09c649b90a0963bd4e6b62f24b8cbf8edd9 (patch) | |
| tree | 3835725f6a93b1a4b44e132afb1ce2ddf82b5700 /templates | |
| parent | b580057fda44dc3f57bc39e612af9461c3ebca5a (diff) | |
| download | stock-5e0af09c649b90a0963bd4e6b62f24b8cbf8edd9.tar.gz stock-5e0af09c649b90a0963bd4e6b62f24b8cbf8edd9.tar.bz2 stock-5e0af09c649b90a0963bd4e6b62f24b8cbf8edd9.zip | |
edit_assembly: remove dead components section, tidy upload layout
Removed the stock_assembly_map components table (always empty since
gallery hierarchy was dropped), the Components heading, and the
'No components yet' message. BOM tab already shows component count.
Upload BOM form now sits directly below Save with results above it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates')
| -rwxr-xr-x | templates/edit_assembly.tpl | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/templates/edit_assembly.tpl b/templates/edit_assembly.tpl index 8639370..a95afc2 100755 --- a/templates/edit_assembly.tpl +++ b/templates/edit_assembly.tpl @@ -49,16 +49,12 @@ </div> {/form} - {* ── Components section ── *} {if $gContent->isValid()} - <hr/> - <h3>{tr}Components{/tr}</h3> - {* CSV upload results *} {if isset($csvLoaded)} <div class="alert alert-info"> {tr}Loaded{/tr}: <strong>{$csvLoaded}</strong> - {if $csvSkipped} {tr}Skipped (duplicate){/tr}: <strong>{$csvSkipped}</strong>{/if} + {if $csvSkipped} {tr}Skipped{/tr}: <strong>{$csvSkipped}</strong>{/if} </div> {if $csvErrors} <ul class="text-warning"> @@ -67,45 +63,14 @@ {/if} {/if} - {* Components table *} - {if $componentMap} - {form ipackage="stock" ifile="edit_assembly.php"} - <input type="hidden" name="content_id" value="{$gContent->mContentId|escape}"/> - <table class="table table-condensed table-striped"> - <thead> - <tr> - <th>{smartlink ititle="Pos" isort="item_position" ifile="edit_assembly.php" ipackage="stock" idefault=1 content_id=$gContent->mContentId}</th> - <th>{smartlink ititle="Component" isort="title" ifile="edit_assembly.php" ipackage="stock" content_id=$gContent->mContentId}</th> - <th></th> - </tr> - </thead> - <tbody> - {foreach from=$componentMap key=contentId item=comp} - <tr> - <td>{$comp.item_position|escape}</td> - <td>{$comp.title|escape}</td> - <td> - <input type="submit" class="btn btn-xs btn-default" - name="remove_component_{$contentId}" value="{tr}Remove{/tr}"/> - </td> - </tr> - {/foreach} - </tbody> - </table> - {/form} - {else} - <p class="muted">{tr}No components yet.{/tr}</p> - {/if} - {* ── Upload BOM CSV ── *} - <h4>{tr}Upload Parts List (BOM){/tr}</h4> - <p class="help-block">{tr}Columns: Component, Order, Quantity, Size (SGL/PCK/SHT/VOL — optional), Ref designators, Note{/tr}</p> {form enctype="multipart/form-data" ipackage="stock" ifile="edit_assembly.php"} <input type="hidden" name="content_id" value="{$gContent->mContentId|escape}"/> <div class="form-inline"> <input type="file" name="csv_file" accept=".csv,text/csv"/> <input type="submit" class="btn btn-default" name="upload_bom_csv" value="{tr}Upload BOM{/tr}"/> </div> + <p class="help-block">{tr}Columns: Component, Order, Quantity, Size (SGL/PCK/SHT/VOL), Ref designators{/tr}</p> {/form} {/if} |
