summaryrefslogtreecommitdiff
path: root/list_components.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-12 10:41:59 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-12 10:41:59 +0100
commit76308cf0c9fcf20f12f14c0231601eb6fd6c120f (patch)
treeb88107d6cd7035c715b22d688b5d6f27e4b227e8 /list_components.php
parent00956ec62ba579685e35d515d469c9dd2c458c8a (diff)
downloadstock-76308cf0c9fcf20f12f14c0231601eb6fd6c120f.tar.gz
stock-76308cf0c9fcf20f12f14c0231601eb6fd6c120f.tar.bz2
stock-76308cf0c9fcf20f12f14c0231601eb6fd6c120f.zip
stock: hide-kitlocker filter on list_components; fix supplier name in view_xref_sup_item
list_components defaults to hiding kitlocker components (KLID xref present) but keeps those where the kitlocker contact is also the supplier (#SUP → SCREF='kitlocker') — parts kitlocker supplies to elves. Filter checkbox in the search form, defaults on. view_xref_sup_item: switch from xref_title (cross_ref_title = "Supplier") to linked_title (liberty_content.title of the linked contact) so the contact name appears as the link text. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'list_components.php')
-rw-r--r--list_components.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/list_components.php b/list_components.php
index 035da3d..751cdcf 100644
--- a/list_components.php
+++ b/list_components.php
@@ -22,10 +22,16 @@ if( !empty( $_REQUEST['find'] ) ) {
$_REQUEST['search'] = $_REQUEST['find'];
}
+// Default on — hide pure kitlocker components; show those also supplied by kitlocker to elves
+if( !isset( $_REQUEST['hide_kitlocker'] ) ) {
+ $_REQUEST['hide_kitlocker'] = 1;
+}
+
$componentList = $component->getList( $_REQUEST );
$component->invokeServices( 'content_list_function', $_REQUEST );
$gBitSmarty->assign( 'listInfo', $_REQUEST['listInfo'] );
$gBitSmarty->assign( 'componentList', $componentList );
+$gBitSmarty->assign( 'hideKitlocker', (bool)$_REQUEST['hide_kitlocker'] );
$gBitSmarty->assign( 'gDefaultCenter', 'bitpackage:stock/list_components.tpl' );
$gBitSystem->display( 'bitpackage:kernel/dynamic.tpl', 'List Components', [ 'display_mode' => 'list' ] );