summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-15 11:53:20 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-15 11:53:20 +0100
commit0b7b199e6f60efc7fb29e8c0f0515ae6562b27c4 (patch)
treeb3d8bb6c29b15855de1d514b88e9a7822a613072 /templates
parent68d6d45635a040a5004581afc5ae78db729175d7 (diff)
downloadstock-0b7b199e6f60efc7fb29e8c0f0515ae6562b27c4.tar.gz
stock-0b7b199e6f60efc7fb29e8c0f0515ae6562b27c4.tar.bz2
stock-0b7b199e6f60efc7fb29e8c0f0515ae6562b27c4.zip
Link prebuild count in user_galleries to its PBLD movement record
Add prebuild_content_id to StockAssembly::getList() (most recent PBLD movement for the assembly owner) and link both the Prebuilt label and count in user_galleries.tpl to view_movement.php?content_id=. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/user_galleries.tpl10
1 files changed, 8 insertions, 2 deletions
diff --git a/templates/user_galleries.tpl b/templates/user_galleries.tpl
index bda5520..8813e23 100755
--- a/templates/user_galleries.tpl
+++ b/templates/user_galleries.tpl
@@ -37,8 +37,14 @@
<dl class="dl-horizontal small" style="margin-bottom:0">
<dt>{tr}Components{/tr}</dt>
<dd>{$gal.component_count}</dd>
- <dt>{tr}Prebuilt{/tr}</dt>
- <dd>{$gal.prebuild_count|string_format:"%.0f"}</dd>
+ {if $gal.prebuild_content_id}
+ {assign var=pbldUrl value="`$smarty.const.STOCK_PKG_URL`view_movement.php?content_id=`$gal.prebuild_content_id`"}
+ <dt><a href="{$pbldUrl}">{tr}Prebuilt{/tr}</a></dt>
+ <dd><a href="{$pbldUrl}">{$gal.prebuild_count|string_format:"%.0f"}</a></dd>
+ {else}
+ <dt>{tr}Prebuilt{/tr}</dt>
+ <dd>{$gal.prebuild_count|string_format:"%.0f"}</dd>
+ {/if}
</dl>
</div>
</div>