summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-14 12:17:11 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-14 12:17:11 +0100
commitf264e83839bdb7a3a6d584d4f1b0a0da89b97259 (patch)
treef21060700bc6a29ef128a986711f5dc1f4031c07 /templates
parent0a583589d30803ca9b9b7a609a87105c7775c6d1 (diff)
downloadstock-f264e83839bdb7a3a6d584d4f1b0a0da89b97259.tar.gz
stock-f264e83839bdb7a3a6d584d4f1b0a0da89b97259.tar.bz2
stock-f264e83839bdb7a3a6d584d4f1b0a0da89b97259.zip
Implement assembly_icons_inc and assembly_nav include pattern
Extract floaticon buttons into assembly_icons_inc.tpl and breadcrumb into assembly_nav.tpl; stock_simple_list_inc.tpl includes both. Restores the intended Bitweaver pattern that was left as empty stubs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/assembly_icons_inc.tpl12
-rwxr-xr-xtemplates/assembly_nav.tpl32
-rwxr-xr-xtemplates/stock_simple_list_inc.tpl23
3 files changed, 23 insertions, 44 deletions
diff --git a/templates/assembly_icons_inc.tpl b/templates/assembly_icons_inc.tpl
index e69de29..11eb48c 100755
--- a/templates/assembly_icons_inc.tpl
+++ b/templates/assembly_icons_inc.tpl
@@ -0,0 +1,12 @@
+<div class="floaticon">
+ {if $gContent->hasUpdatePermission()}
+ <a title="{tr}Edit{/tr}" href="{$smarty.const.STOCK_PKG_URL}edit_assembly.php?content_id={$gContent->mContentId}">{biticon ipackage="icons" iname="edit" iexplain="Edit Assembly"}</a>
+ <a title="{tr}Component Order{/tr}" href="{$smarty.const.STOCK_PKG_URL}component_order.php?content_id={$gContent->mContentId}">{biticon ipackage="icons" iname="view-sort-ascending" iexplain="Component Order"}</a>
+ {/if}
+ <a title="{tr}Print Parts List{/tr}" href="{$smarty.const.STOCK_PKG_URL}print_bom.php?content_id={$gContent->mContentId}">{biticon ipackage="icons" iname="document-print" iexplain="Print Parts List"}</a>
+ <a title="{tr}View Stock{/tr}" href="{$smarty.const.STOCK_PKG_URL}list_stock.php?assembly_content_id={$gContent->mContentId}">{biticon ipackage="icons" iname="package-x-generic" iexplain="View Stock"}</a>
+ <a title="{tr}View Movements{/tr}" href="{$smarty.const.STOCK_PKG_URL}list_movements.php?part_content_id={$gContent->mContentId}">{biticon ipackage="icons" iname="go-next" iexplain="View Movements"}</a>
+ {if $gContent->hasAdminPermission()}
+ <a title="{tr}Delete Assembly{/tr}" href="{$smarty.const.STOCK_PKG_URL}edit_assembly.php?content_id={$gContent->mContentId}&amp;delete=1">{biticon ipackage="icons" iname="user-trash" iexplain="Delete Assembly"}</a>
+ {/if}
+</div>
diff --git a/templates/assembly_nav.tpl b/templates/assembly_nav.tpl
index b73c9a0..7e68b4c 100755
--- a/templates/assembly_nav.tpl
+++ b/templates/assembly_nav.tpl
@@ -1,23 +1,9 @@
-{strip}
-<div class="assemblybar">
- <nav>
- {assign var=breadCrumbs value=$gContent->getBreadcrumbLinks(1)}
- <ol class="breadcrumb">
- {if $gContent->hasUpdatePermission()}
- {assign var=creatorInfo value=$gContent->mInfo}
- <li>{displayname user=$creatorInfo.creator_user user_id=$creatorInfo.creator_user_id|default:0 real_name=$creatorInfo.creator_real_name} :: <a href="{$smarty.const.STOCK_PKG_URL}list_assemblies.php">Assemblies</a></li>
- {/if}
- {if $breadCrumbs}
- {foreach from=$breadCrumbs item=breadTitle key=breadId}
- {if $breadId==$gContent->mContentId}<li class="active">{$breadTitle}</li>
- {else}<li><a href="{$smarty.const.STOCK_PKG_URL}view_assembly.php?content_id={$breadId}">{$breadTitle}</a></li>{/if}
- {/foreach}
- {/if}
- </ol>
- </nav>
-
- {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='nav' serviceHash=$gContent->mInfo}
-
- <div class="clear"></div>
-</div><!-- end .gallerybar -->
-{/strip}
+<small>
+ <a href="{$smarty.const.STOCK_PKG_URL}list_assemblies.php">{tr}Assemblies{/tr}</a>
+ {assign var=breadCrumbs value=$gContent->getBreadcrumbLinks(1)}
+ {foreach from=$breadCrumbs item=breadTitle key=breadId}
+ {if $breadId != $gContent->mContentId}
+ &rsaquo; <a href="{$smarty.const.STOCK_PKG_URL}view_assembly.php?content_id={$breadId}">{$breadTitle}</a>
+ {/if}
+ {/foreach}
+</small>
diff --git a/templates/stock_simple_list_inc.tpl b/templates/stock_simple_list_inc.tpl
index 4f3347f..935e8bd 100755
--- a/templates/stock_simple_list_inc.tpl
+++ b/templates/stock_simple_list_inc.tpl
@@ -1,28 +1,9 @@
{strip}
<div class="display stock">
<header>
- <div class="floaticon">
- {if $gContent->hasUpdatePermission()}
- <a title="{tr}Edit{/tr}" href="{$smarty.const.STOCK_PKG_URL}edit_assembly.php?content_id={$gContent->mContentId}">{biticon ipackage="icons" iname="edit" iexplain="Edit Assembly"}</a>
- <a title="{tr}Component Order{/tr}" href="{$smarty.const.STOCK_PKG_URL}component_order.php?content_id={$gContent->mContentId}">{biticon ipackage="icons" iname="view-sort-ascending" iexplain="Component Order"}</a>
- {/if}
- <a title="{tr}Print Parts List{/tr}" href="{$smarty.const.STOCK_PKG_URL}print_bom.php?content_id={$gContent->mContentId}">{biticon ipackage="icons" iname="document-print" iexplain="Print Parts List"}</a>
- <a title="{tr}View Stock{/tr}" href="{$smarty.const.STOCK_PKG_URL}list_stock.php?assembly_content_id={$gContent->mContentId}">{biticon ipackage="icons" iname="package-x-generic" iexplain="View Stock"}</a>
- <a title="{tr}View Movements{/tr}" href="{$smarty.const.STOCK_PKG_URL}list_movements.php?part_content_id={$gContent->mContentId}">{biticon ipackage="icons" iname="go-next" iexplain="View Movements"}</a>
- {if $gContent->hasAdminPermission()}
- <a title="{tr}Delete Assembly{/tr}" href="{$smarty.const.STOCK_PKG_URL}edit_assembly.php?content_id={$gContent->mContentId}&amp;delete=1">{biticon ipackage="icons" iname="user-trash" iexplain="Delete Assembly"}</a>
- {/if}
- </div>
+ {include file="bitpackage:stock/assembly_icons_inc.tpl"}
<h1>{$gContent->getTitle()|escape}</h1>
- <small>
- <a href="{$smarty.const.STOCK_PKG_URL}list_assemblies.php">{tr}Assemblies{/tr}</a>
- {assign var=breadCrumbs value=$gContent->getBreadcrumbLinks(1)}
- {foreach from=$breadCrumbs item=breadTitle key=breadId}
- {if $breadId != $gContent->mContentId}
- &rsaquo; <a href="{$smarty.const.STOCK_PKG_URL}view_assembly.php?content_id={$breadId}">{$breadTitle}</a>
- {/if}
- {/foreach}
- </small>
+ {include file="bitpackage:stock/assembly_nav.tpl"}
</header>
<section class="body">