summaryrefslogtreecommitdiff
path: root/view_kitlocker.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-10 09:16:33 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-10 09:16:33 +0100
commit8566070da24cd53845c64cdf2cd2104c847e450c (patch)
tree8348a496fe32a74713fad9f3850c40d90be7d6a4 /view_kitlocker.php
parent0582e0b40f3440e8ec4c95c99501019e6933e20b (diff)
downloadstock-8566070da24cd53845c64cdf2cd2104c847e450c.tar.gz
stock-8566070da24cd53845c64cdf2cd2104c847e450c.tar.bz2
stock-8566070da24cd53845c64cdf2cd2104c847e450c.zip
stock: add kitlocker gallery — view_kitlocker.php, stock_fixed_grid_inc.tpl, view_xref_kitlocker_group.tpl; stgrp getList filter; stgrp template field set to kitlocker
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'view_kitlocker.php')
-rw-r--r--view_kitlocker.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/view_kitlocker.php b/view_kitlocker.php
new file mode 100644
index 0000000..2523337
--- /dev/null
+++ b/view_kitlocker.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Kitlocker group gallery — shows all stgrp items as a browsable grid.
+ * @package stock
+ */
+
+namespace Bitweaver\Stock;
+
+use Bitweaver\KernelTools;
+
+require_once '../kernel/includes/setup_inc.php';
+
+$gBitSystem->verifyPackage( 'stock' );
+
+global $gBitSystem, $gBitSmarty, $gBitDb;
+
+$stgrpItems = $gBitDb->getAll(
+ "SELECT xi.`item`, xi.`cross_ref_title`, xi.`data`,
+ (SELECT COUNT(*) FROM `".BIT_DB_PREFIX."liberty_xref` x
+ INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON lc.`content_id` = x.`content_id`
+ WHERE x.`item` = xi.`item`
+ AND lc.`content_type_guid` IN ('stockassembly','stockcomponent')) AS item_count
+ FROM `".BIT_DB_PREFIX."liberty_xref_item` xi
+ WHERE xi.`x_group` = 'stgrp' AND xi.`content_type_guid` = 'stock'
+ ORDER BY xi.`item`"
+);
+
+$gBitSmarty->assign( 'stgrpItems', $stgrpItems );
+
+$gBitSystem->setBrowserTitle( KernelTools::tra( 'Kitlocker' ) );
+$gBitSystem->display( 'bitpackage:stock/stock_fixed_grid_inc.tpl', null, [ 'display_mode' => 'display' ] );