From ba633c8c0e5b832821814020676bf13605651fb4 Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Wed, 10 Jun 2026 10:07:19 +0100 Subject: stock: unify view/edit header structure —
/
pattern, floaticons top right, breadcrumbs below h1; remove assembly_nav and dead mItems table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- templates/edit_assembly.tpl | 19 +++++---- templates/edit_component.tpl | 19 +++++---- templates/stock_simple_list_inc.tpl | 83 ++++++++++++------------------------- templates/view_assembly.tpl | 12 ------ templates/view_component.tpl | 17 ++++---- 5 files changed, 58 insertions(+), 92 deletions(-) diff --git a/templates/edit_assembly.tpl b/templates/edit_assembly.tpl index c0b5004..eb23741 100755 --- a/templates/edit_assembly.tpl +++ b/templates/edit_assembly.tpl @@ -1,6 +1,8 @@ {strip}
-
+
+
+

{if $gContent->getTitle()} {tr}Edit Assembly{/tr}: {$gContent->getTitle()|escape} @@ -8,9 +10,14 @@ {tr}Create Assembly{/tr} {/if}

-
+ {if $gContent->isValid()} + {$gContent->getTitle()|escape} + {else} + {tr}Assemblies{/tr} + {/if} +
-
+
{form id="editAssemblyForm" ipackage="stock" ifile="edit_assembly.php"} {formfeedback error=$errors success=$stockSuccess} @@ -50,7 +57,6 @@ {/form} {if $gContent->isValid()} - {* CSV upload results *} {if isset($csvLoaded)}
{tr}Loaded{/tr}: {$csvLoaded} @@ -63,7 +69,6 @@ {/if} {/if} - {* ── Upload BOM CSV ── *} {form enctype="multipart/form-data" ipackage="stock" ifile="edit_assembly.php"}
@@ -74,6 +79,6 @@ {/form} {/if} -
-
+
+
{/strip} diff --git a/templates/edit_component.tpl b/templates/edit_component.tpl index 9bf6bcc..d8dad00 100755 --- a/templates/edit_component.tpl +++ b/templates/edit_component.tpl @@ -1,11 +1,17 @@ {strip} -
-
+
+
+

{if $gContent->mContentId}{tr}Edit Component{/tr}: {$gContent->getTitle()|escape}{else}{tr}Add New Component{/tr}{/if}

-
+ {if $gContent->isValid()} + {$gContent->getTitle()|escape} + {else} + {tr}Components{/tr} + {/if} + -
+
{form} {formfeedback error=$errors} @@ -54,7 +60,6 @@
{/form} -
- - + + {/strip} diff --git a/templates/stock_simple_list_inc.tpl b/templates/stock_simple_list_inc.tpl index 7c46c66..8ff0126 100755 --- a/templates/stock_simple_list_inc.tpl +++ b/templates/stock_simple_list_inc.tpl @@ -1,74 +1,43 @@ {strip} -{include file="bitpackage:stock/assembly_nav.tpl"}
- + + {tr}Assemblies{/tr} + {assign var=breadCrumbs value=$gContent->getBreadcrumbLinks(1)} + {foreach from=$breadCrumbs item=breadTitle key=breadId} + {if $breadId != $gContent->mContentId} + › {$breadTitle} + {/if} + {/foreach} + + -
+
{formfeedback success=$stockSuccess error=$stockErrors warning=$stockWarnings} {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo} {if $gContent->mInfo.data}

{$gContent->mInfo.data|escape}

{/if} - - - - - - {if $gBitSystem->isFeatureActive('stock_item_list_date') || $gBitSystem->isFeatureActive('stock_item_list_creator')} - - {/if} - {if $gBitSystem->isFeatureActive('stock_item_list_hits')} - - {/if} - - - {foreach from=$gContent->mItems item=galItem} - - - {if $gBitSystem->isFeatureActive('stock_item_list_date') || $gBitSystem->isFeatureActive('stock_item_list_creator')} - - {/if} - {if $gBitSystem->isFeatureActive('stock_item_list_hits')} - - {/if} - - - {/foreach} -
{tr}Components{/tr} [ {$listInfo.total_records|default:0} ]
{smartlink ititle=Name isort=title icontrol=$listInfo}{smartlink ititle=Created isort=created iorder=desc idefault=1 icontrol=$listInfo}{smartlink ititle=Views isort="lch.hits" icontrol=$listInfo}{tr}Actions{/tr}
-

{$galItem->getTitle()|escape}

- {if $gBitSystem->isFeatureActive('stock_item_list_desc') && $galItem->mInfo.data} - {$galItem->mInfo.parsed_data} - {/if} - {if $gBitSystem->isFeatureActive('stock_item_list_attid')} - {$galItem->mInfo.wiki_plugin_link} - {/if} -
- {if $gBitSystem->isFeatureActive('stock_item_list_date')} - {$galItem->mInfo.created|bit_short_date}
- {/if} - {if $gBitSystem->isFeatureActive('stock_item_list_creator')} - {tr}by{/tr}: {displayname hash=$galItem->mInfo} - {/if} -
{$galItem->mInfo.hits|default:"{tr}none{/tr}"} - {biticon ipackage="icons" iname="folder-open" iexplain="View"} - {if $gContent->isOwner($galItem->mInfo) || $gBitUser->isAdmin()} - {biticon ipackage="icons" iname="edit" iexplain="Edit"} - {biticon ipackage="icons" iname="user-trash" iexplain="Remove"} - {/if} -
- -
- - {pagination content_id=$gContent->mContentId} + {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='view' serviceHash=$gContent->mInfo} {if $gContent->getPreference('allow_comments') eq 'y'} {include file="bitpackage:liberty/comments.tpl"} {/if} -
+ {/strip} diff --git a/templates/view_assembly.tpl b/templates/view_assembly.tpl index e3ebb94..a9aa818 100755 --- a/templates/view_assembly.tpl +++ b/templates/view_assembly.tpl @@ -1,15 +1,3 @@ -
- {if $gContent->hasUpdatePermission()} - {biticon ipackage="icons" iname="edit" iexplain="Edit Assembly"} - {biticon ipackage="icons" iname="view-sort-ascending" iexplain="Component Order"} - {/if} - {biticon ipackage="icons" iname="document-print" iexplain="Print Parts List"} - {biticon ipackage="icons" iname="package-x-generic" iexplain="View Stock"} - {biticon ipackage="icons" iname="go-next" iexplain="View Movements"} - {if $gContent->hasAdminPermission()} - {biticon ipackage="icons" iname="user-trash" iexplain="Delete Assembly"} - {/if} -
{include file="bitpackage:stock/stock_simple_list_inc.tpl"} {if $gXrefInfo->mGroups} diff --git a/templates/view_component.tpl b/templates/view_component.tpl index 102b911..864cb90 100755 --- a/templates/view_component.tpl +++ b/templates/view_component.tpl @@ -1,11 +1,7 @@ {strip} -{if empty($liberty_preview)} - {include file="bitpackage:stock/assembly_nav.tpl"} -{/if} -
{formfeedback hash=$feedback} -
+
{if empty($liberty_preview)}
{if $gContent->hasUpdatePermission()} @@ -15,9 +11,12 @@
{/if}

{$gContent->getTitle()|escape}

-
+ {if empty($liberty_preview)} + {tr}Components{/tr} + {/if} + -
+
{if $gContent->mInfo.data ne ''}

{$gContent->mInfo.parsed_data}

{/if} @@ -70,11 +69,11 @@ {tr}Stock history{/tr} {/jstab} {/jstabs} -
+ {if $gGallery && $gGallery->isCommentable()} {include file="bitpackage:liberty/comments.tpl"} {/if} -
+ {/strip} -- cgit v1.3