From b8b9f2f9b9b0b2aefe4b76c31a581243d3df01ee Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Wed, 10 Jun 2026 08:18:17 +0100 Subject: stock: remove gallery layout machinery — assembly view hardcoded to simple_list; delete assembly_views/; drop pagination constants, getLayout/getAllLayouts, per-page config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- assembly_views/auto_flow/stock_auto_flow_inc.tpl | 46 ------------- assembly_views/fixed_grid/stock_fixed_grid_inc.tpl | 41 ------------ .../fixed_grid/stock_fixed_grid_inc2.tpl | 53 --------------- .../fixed_grid/stock_fixed_grid_inc3.tpl | 43 ------------ .../position_number/stock_position_number_inc.tpl | 54 --------------- .../simple_list/stock_simple_list_inc.tpl | 76 ---------------------- templates/stock_fixed_grid_inc.tpl | 39 +++++++++++ templates/stock_simple_list_inc.tpl | 74 +++++++++++++++++++++ templates/view_assembly_components_inc.tpl | 66 ------------------- 9 files changed, 113 insertions(+), 379 deletions(-) delete mode 100755 assembly_views/auto_flow/stock_auto_flow_inc.tpl delete mode 100755 assembly_views/fixed_grid/stock_fixed_grid_inc.tpl delete mode 100755 assembly_views/fixed_grid/stock_fixed_grid_inc2.tpl delete mode 100755 assembly_views/fixed_grid/stock_fixed_grid_inc3.tpl delete mode 100755 assembly_views/position_number/stock_position_number_inc.tpl delete mode 100755 assembly_views/simple_list/stock_simple_list_inc.tpl create mode 100755 templates/stock_fixed_grid_inc.tpl create mode 100755 templates/stock_simple_list_inc.tpl delete mode 100755 templates/view_assembly_components_inc.tpl diff --git a/assembly_views/auto_flow/stock_auto_flow_inc.tpl b/assembly_views/auto_flow/stock_auto_flow_inc.tpl deleted file mode 100755 index 6b07fd2..0000000 --- a/assembly_views/auto_flow/stock_auto_flow_inc.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{strip} -{include file="bitpackage:stock/assembly_nav.tpl"} -
-
- {include file="bitpackage:stock/assembly_icons_inc.tpl"} -

{$gContent->getTitle()|escape}

-
- -
- {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} - -
- {foreach from=$gContent->mItems item=galItem key=itemContentId} -
- -
- {foreachelse} -

{tr}This assembly has no components.{/tr}

- {/foreach} -
-
- -
- - {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/assembly_views/fixed_grid/stock_fixed_grid_inc.tpl b/assembly_views/fixed_grid/stock_fixed_grid_inc.tpl deleted file mode 100755 index 2e5855b..0000000 --- a/assembly_views/fixed_grid/stock_fixed_grid_inc.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{strip} -{include file="bitpackage:stock/assembly_nav.tpl"} -
-
- {include file="bitpackage:stock/assembly_icons_inc.tpl"} -

{$gContent->getTitle()|escape}

-
- -
- {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} - - - {counter assign="itemCount" start="0" print=false} - {foreach from=$gContent->mItems item=galItem key=itemContentId} - {if $itemCount % 4 == 0}{/if} - - {counter name=itemCount} - {if $itemCount % 4 == 0}{/if} - {foreachelse} - - {/foreach} - {if $itemCount % 4 != 0}{/if} -
- {box class="box {$galItem->mInfo.content_type_guid}"} -

{$galItem->mInfo.title|escape}

- {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini} - {if $gBitSystem->isFeatureActive('stock_gallery_list_image_descriptions')} -

{$galItem->mInfo.data|escape}

- {/if} - {/box} -
{tr}This assembly has no components.{/tr}
- - {pagination content_id=$gContent->mContentId} -
-
-{/strip} diff --git a/assembly_views/fixed_grid/stock_fixed_grid_inc2.tpl b/assembly_views/fixed_grid/stock_fixed_grid_inc2.tpl deleted file mode 100755 index 17e6102..0000000 --- a/assembly_views/fixed_grid/stock_fixed_grid_inc2.tpl +++ /dev/null @@ -1,53 +0,0 @@ -{strip} -{include file="bitpackage:stock/assembly_nav.tpl"} -
-
- {include file="bitpackage:stock/assembly_icons_inc.tpl"} -

{$gContent->getTitle()|escape}

-
- - {pagination content_id=$gContent->mContentId} - -
- {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 !empty($cols_per_page) && $cols_per_page > 0} - {assign var=tdWidth value="`100/$cols_per_page`"} - {else} - {assign var=tdWidth value="25"} - {assign var=cols_per_page value="4"} - {/if} - - {counter assign="itemCount" start="0" print=false} - {foreach from=$gContent->mItems item=galItem key=itemContentId} - {if $itemCount % $cols_per_page == 0}{/if} - - {counter name=itemCount} - {if $itemCount % $cols_per_page == 0}{/if} - {foreachelse} - - {/foreach} - {if $itemCount % $cols_per_page != 0}{/if} -
- {box class="box {$galItem->mInfo.content_type_guid}" style="margin-left:0;"} -

{$galItem->mInfo.title|escape}

- {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini} - {if $gBitSystem->isFeatureActive('stock_gallery_list_image_descriptions')} -

{$galItem->mInfo.data|truncate:200:"..."|escape}

- {/if} - {/box} -
{tr}This assembly has no components.{/tr}
-
- - {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/assembly_views/fixed_grid/stock_fixed_grid_inc3.tpl b/assembly_views/fixed_grid/stock_fixed_grid_inc3.tpl deleted file mode 100755 index 2db927b..0000000 --- a/assembly_views/fixed_grid/stock_fixed_grid_inc3.tpl +++ /dev/null @@ -1,43 +0,0 @@ -{strip} -
-
- {include file="bitpackage:stock/assembly_icons_inc.tpl"} -

{$gContent->getTitle()|escape}

-
- -
- {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} - -
- {foreach from=$gContent->mItems item=galItem key=itemContentId} -
- -
- {foreachelse} -

{tr}This assembly has no components.{/tr}

- {/foreach} -
-
-
- - {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/assembly_views/position_number/stock_position_number_inc.tpl b/assembly_views/position_number/stock_position_number_inc.tpl deleted file mode 100755 index a6a602f..0000000 --- a/assembly_views/position_number/stock_position_number_inc.tpl +++ /dev/null @@ -1,54 +0,0 @@ -{strip} -{include file="bitpackage:stock/assembly_nav.tpl"} -
-
- {include file="bitpackage:stock/assembly_icons_inc.tpl"} -

{$gContent->getTitle()|escape}

-
- -
- {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} - - {assign var=lastPackage value=-1} - {foreach from=$gContent->mItems item=galItem key=itemContentId} - {assign var=thisPackage value=$galItem->getField('item_position')|default:0|floor} - {if $thisPackage != $lastPackage} - {if $lastPackage >= 0}{/if} -

- {if $thisPackage > 0} - {tr}Package{/tr} {$thisPackage} - {else} - {tr}Unassigned{/tr} - {/if} -

-
    - {assign var=lastPackage value=$thisPackage} - {/if} -
  • - {$galItem->getTitle()|escape} - {if $gBitSystem->isFeatureActive('stock_item_list_desc') && $galItem->mInfo.data} - — {$galItem->mInfo.data|truncate:120|escape} - {/if} - {if $gContent->isOwner($galItem->mInfo) || $gBitUser->isAdmin()} - {biticon ipackage="icons" iname="edit" iexplain="Edit"} - {/if} -
  • - {foreachelse} -

    {tr}This assembly has no components.{/tr}

    - {/foreach} - {if $lastPackage >= 0}
{/if} - -
- - {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/assembly_views/simple_list/stock_simple_list_inc.tpl b/assembly_views/simple_list/stock_simple_list_inc.tpl deleted file mode 100755 index 2113b21..0000000 --- a/assembly_views/simple_list/stock_simple_list_inc.tpl +++ /dev/null @@ -1,76 +0,0 @@ -{strip} -{include file="bitpackage:stock/assembly_nav.tpl"} -
-
- {include file="bitpackage:stock/assembly_icons_inc.tpl"} -

{$gContent->getTitle()|escape}

-
- -
- {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} - - - {foreachelse} - - {/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} -
{tr}This assembly has no components.{/tr}
- -
- - {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/stock_fixed_grid_inc.tpl b/templates/stock_fixed_grid_inc.tpl new file mode 100755 index 0000000..d6f0ba0 --- /dev/null +++ b/templates/stock_fixed_grid_inc.tpl @@ -0,0 +1,39 @@ +{strip} +{include file="bitpackage:stock/assembly_nav.tpl"} +
+
+ {include file="bitpackage:stock/assembly_icons_inc.tpl"} +

{$gContent->getTitle()|escape}

+
+ +
+ {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} + + + {counter assign="itemCount" start="0" print=false} + {foreach from=$gContent->mItems item=galItem key=itemContentId} + {if $itemCount % 4 == 0}{/if} + + {counter name=itemCount} + {if $itemCount % 4 == 0}{/if} + {/foreach} + {if $itemCount % 4 != 0}{/if} +
+ {box class="box {$galItem->mInfo.content_type_guid}"} +

{$galItem->mInfo.title|escape}

+ {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini} + {if $gBitSystem->isFeatureActive('stock_gallery_list_image_descriptions')} +

{$galItem->mInfo.data|escape}

+ {/if} + {/box} +
+ + {pagination content_id=$gContent->mContentId} +
+
+{/strip} diff --git a/templates/stock_simple_list_inc.tpl b/templates/stock_simple_list_inc.tpl new file mode 100755 index 0000000..7c46c66 --- /dev/null +++ b/templates/stock_simple_list_inc.tpl @@ -0,0 +1,74 @@ +{strip} +{include file="bitpackage:stock/assembly_nav.tpl"} +
+
+ {include file="bitpackage:stock/assembly_icons_inc.tpl"} +

{$gContent->getTitle()|escape}

+
+ +
+ {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_components_inc.tpl b/templates/view_assembly_components_inc.tpl deleted file mode 100755 index 7f5ce28..0000000 --- a/templates/view_assembly_components_inc.tpl +++ /dev/null @@ -1,66 +0,0 @@ -{strip} -{if $gContent->getLayout() == 'simple_list'} - - - - - {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} - - - {foreachelse} - - {/foreach} -
{tr}Components{/tr} [ {$gContent->mItems|count|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}"} - {if $gContent->isOwner( $galItem->mInfo ) || $gBitUser->isAdmin()} - {biticon ipackage="icons" iname="edit" iexplain="Edit"} - {biticon ipackage="icons" iname="user-trash" iexplain="Remove"} - {/if} -
{tr}This assembly has no components.{/tr}
-{else} -
- {foreach from=$gContent->mItems item=galItem key=itemContentId} - {box class="box {$galItem->mInfo.content_type_guid}"} - {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini} -

{$galItem->getTitle()|escape}

- {if $galItem->mInfo.data} -

{$galItem->mInfo.data|escape|truncate:120}

- {/if} - {/box} - {foreachelse} -
{tr}This assembly has no components.{/tr}
- {/foreach} -
-
-{/if} -{/strip} -- cgit v1.3