diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-10 08:18:17 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-10 08:18:17 +0100 |
| commit | b8b9f2f9b9b0b2aefe4b76c31a581243d3df01ee (patch) | |
| tree | 4722e7982ae700f42bd354cc6c0bf27f5bd0f802 | |
| parent | 4d24ef4733a06525f943e34ba0e85b69c7871965 (diff) | |
| download | stock-b8b9f2f9b9b0b2aefe4b76c31a581243d3df01ee.tar.gz stock-b8b9f2f9b9b0b2aefe4b76c31a581243d3df01ee.tar.bz2 stock-b8b9f2f9b9b0b2aefe4b76c31a581243d3df01ee.zip | |
stock: remove gallery layout machinery — assembly view hardcoded to simple_list; delete assembly_views/; drop pagination constants, getLayout/getAllLayouts, per-page config
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| -rwxr-xr-x | assembly_views/auto_flow/stock_auto_flow_inc.tpl | 46 | ||||
| -rwxr-xr-x | assembly_views/fixed_grid/stock_fixed_grid_inc2.tpl | 53 | ||||
| -rwxr-xr-x | assembly_views/fixed_grid/stock_fixed_grid_inc3.tpl | 43 | ||||
| -rwxr-xr-x | assembly_views/position_number/stock_position_number_inc.tpl | 54 | ||||
| -rwxr-xr-x | templates/stock_fixed_grid_inc.tpl (renamed from assembly_views/fixed_grid/stock_fixed_grid_inc.tpl) | 2 | ||||
| -rwxr-xr-x | templates/stock_simple_list_inc.tpl (renamed from assembly_views/simple_list/stock_simple_list_inc.tpl) | 2 | ||||
| -rwxr-xr-x | templates/view_assembly_components_inc.tpl | 66 |
7 files changed, 0 insertions, 266 deletions
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"} -<div class="display stock container"> - <div class="header col-xs-12"> - {include file="bitpackage:stock/assembly_icons_inc.tpl"} - <h1>{$gContent->getTitle()|escape}</h1> - </div> - - <div class="body col-xs-12"> - {formfeedback success=$stockSuccess error=$stockErrors warning=$stockWarnings} - - {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo} - {if $gContent->mInfo.data} - <p>{$gContent->mInfo.data|escape}</p> - {/if} - - <div class="col-xs-12"> - {foreach from=$gContent->mItems item=galItem key=itemContentId} - <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12"> - <div class="gallery-box"> - <a href="{$galItem->getDisplayUrl()|escape}"> - <h3>{$galItem->mInfo.title|escape}</h3> - </a> - {if $galItem->mInfo.data} - <p class="text-muted">{$galItem->mInfo.data|truncate:120|escape}</p> - {/if} - {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini} - </div> - </div> - {foreachelse} - <p class="norecords">{tr}This assembly has no components.{/tr}</p> - {/foreach} - </div> - <div class="clear"></div> - - </div><!-- end .body --> - - {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} -</div><!-- end .stock --> -{/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"} -<div class="display stock"> - <div class="header"> - {include file="bitpackage:stock/assembly_icons_inc.tpl"} - <h1>{$gContent->getTitle()|escape}</h1> - </div> - - {pagination content_id=$gContent->mContentId} - - <div class="body"> - {formfeedback success=$stockSuccess error=$stockErrors warning=$stockWarnings} - - {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo} - {if $gContent->mInfo.data} - <p>{$gContent->mInfo.data|escape}</p> - {/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} - <table class="thumbnailblock"> - {counter assign="itemCount" start="0" print=false} - {foreach from=$gContent->mItems item=galItem key=itemContentId} - {if $itemCount % $cols_per_page == 0}<tr>{/if} - <td style="width:{$tdWidth}%; vertical-align:top;"> - {box class="box {$galItem->mInfo.content_type_guid}" style="margin-left:0;"} - <h2><a href="{$galItem->getDisplayUrl()|escape}">{$galItem->mInfo.title|escape}</a></h2> - {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini} - {if $gBitSystem->isFeatureActive('stock_gallery_list_image_descriptions')} - <p>{$galItem->mInfo.data|truncate:200:"..."|escape}</p> - {/if} - {/box} - </td> - {counter name=itemCount} - {if $itemCount % $cols_per_page == 0}</tr>{/if} - {foreachelse} - <tr><td class="norecords">{tr}This assembly has no components.{/tr}</td></tr> - {/foreach} - {if $itemCount % $cols_per_page != 0}</tr>{/if} - </table> - </div><!-- end .body --> - - {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} -</div><!-- end .stock --> -{/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} -<div class="display stock container"> - <div class="header col-xs-12"> - {include file="bitpackage:stock/assembly_icons_inc.tpl"} - <h1>{$gContent->getTitle()|escape}</h1> - </div> - - <div class="body col-xs-12"> - {formfeedback success=$stockSuccess error=$stockErrors warning=$stockWarnings} - - {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo} - {if $gContent->mInfo.data} - <p>{$gContent->mInfo.data|escape}</p> - {/if} - - <div class="col-xs-12"> - {foreach from=$gContent->mItems item=galItem key=itemContentId} - <div class="col-md-4 col-sm-6 col-xs-12"> - <div class="gallery-box"> - <a href="{$galItem->getDisplayUrl()|escape}"> - <h3>{$galItem->mInfo.title|escape}</h3> - </a> - {if $galItem->mInfo.data} - <p class="text-muted">{$galItem->mInfo.data|truncate:120|escape}</p> - {/if} - </div> - </div> - {foreachelse} - <p class="norecords">{tr}This assembly has no components.{/tr}</p> - {/foreach} - </div> - <div class="clear"></div> - </div><!-- end .body --> - - {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} -</div><!-- end .stock --> -{/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"} -<div class="display stock"> - <div class="header"> - {include file="bitpackage:stock/assembly_icons_inc.tpl"} - <h1>{$gContent->getTitle()|escape}</h1> - </div> - - <div class="body"> - {formfeedback success=$stockSuccess error=$stockErrors warning=$stockWarnings} - - {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo} - {if $gContent->mInfo.data} - <p>{$gContent->mInfo.data|escape}</p> - {/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}</ul>{/if} - <h3> - {if $thisPackage > 0} - {tr}Package{/tr} {$thisPackage} - {else} - {tr}Unassigned{/tr} - {/if} - </h3> - <ul class="component-list"> - {assign var=lastPackage value=$thisPackage} - {/if} - <li> - <a href="{$galItem->getDisplayUrl()|escape}">{$galItem->getTitle()|escape}</a> - {if $gBitSystem->isFeatureActive('stock_item_list_desc') && $galItem->mInfo.data} - <span class="text-muted"> — {$galItem->mInfo.data|truncate:120|escape}</span> - {/if} - {if $gContent->isOwner($galItem->mInfo) || $gBitUser->isAdmin()} - <a class="actionicon" href="{$smarty.const.STOCK_PKG_URL}edit_component.php?content_id={$galItem->mInfo.content_id}">{biticon ipackage="icons" iname="edit" iexplain="Edit"}</a> - {/if} - </li> - {foreachelse} - <p class="norecords">{tr}This assembly has no components.{/tr}</p> - {/foreach} - {if $lastPackage >= 0}</ul>{/if} - - </div><!-- end .body --> - - {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} -</div><!-- end .stock --> -{/strip} diff --git a/assembly_views/fixed_grid/stock_fixed_grid_inc.tpl b/templates/stock_fixed_grid_inc.tpl index 2e5855b..d6f0ba0 100755 --- a/assembly_views/fixed_grid/stock_fixed_grid_inc.tpl +++ b/templates/stock_fixed_grid_inc.tpl @@ -29,8 +29,6 @@ </td> {counter name=itemCount} {if $itemCount % 4 == 0}</tr>{/if} - {foreachelse} - <tr><td class="norecords">{tr}This assembly has no components.{/tr}</td></tr> {/foreach} {if $itemCount % 4 != 0}</tr>{/if} </table> diff --git a/assembly_views/simple_list/stock_simple_list_inc.tpl b/templates/stock_simple_list_inc.tpl index 2113b21..7c46c66 100755 --- a/assembly_views/simple_list/stock_simple_list_inc.tpl +++ b/templates/stock_simple_list_inc.tpl @@ -58,8 +58,6 @@ {/if} </td> </tr> - {foreachelse} - <tr><td class="norecords" colspan="4">{tr}This assembly has no components.{/tr}</td></tr> {/foreach} </table> 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'} - <table class="table data"> - <caption>{tr}Components{/tr} <span class="total">[ {$gContent->mItems|count|default:0} ]</span></caption> - <tr> - <th>{smartlink ititle=Name isort=title icontrol=$listInfo}</th> - {if $gBitSystem->isFeatureActive( 'stock_item_list_date' ) || $gBitSystem->isFeatureActive( 'stock_item_list_creator' )} - <th>{smartlink ititle=Created isort=created iorder=desc idefault=1 icontrol=$listInfo}</th> - {/if} - {if $gBitSystem->isFeatureActive( 'stock_item_list_hits' )} - <th>{smartlink ititle=Views isort="lch.hits" icontrol=$listInfo}</th> - {/if} - <th>{tr}Actions{/tr}</th> - </tr> - {foreach from=$gContent->mItems item=galItem} - <tr class="{cycle values="odd,even"}"> - <td> - <h3><a href="{$galItem->getDisplayUrl()}">{$galItem->getTitle()|escape}</a></h3> - {if $gBitSystem->isFeatureActive( 'stock_item_list_desc' ) && $galItem->mInfo.data} - {$galItem->mInfo.parsed_data} - {/if} - {if $gBitSystem->isFeatureActive( 'stock_item_list_attid' )} - <small>{$galItem->mInfo.wiki_plugin_link}</small> - {/if} - </td> - {if $gBitSystem->isFeatureActive( 'stock_item_list_date' ) || $gBitSystem->isFeatureActive( 'stock_item_list_creator' )} - <td> - {if $gBitSystem->isFeatureActive( 'stock_item_list_date' )} - {$galItem->mInfo.created|bit_short_date}<br /> - {/if} - {if $gBitSystem->isFeatureActive( 'stock_item_list_creator' )} - {tr}by{/tr}: {displayname hash=$galItem->mInfo} - {/if} - </td> - {/if} - {if $gBitSystem->isFeatureActive( 'stock_item_list_hits' )} - <td class="text-right">{$galItem->mInfo.hits|default:"{tr}none{/tr}"}</td> - {/if} - <td class="actionicon"> - {if $gContent->isOwner( $galItem->mInfo ) || $gBitUser->isAdmin()} - <a href="{$smarty.const.STOCK_PKG_URL}edit_component.php?content_id={$galItem->mInfo.content_id}">{biticon ipackage="icons" iname="edit" iexplain="Edit"}</a> - <a href="{$smarty.const.STOCK_PKG_URL}edit_component.php?content_id={$galItem->mInfo.content_id}&delete=1">{biticon ipackage="icons" iname="user-trash" iexplain="Remove"}</a> - {/if} - </td> - </tr> - {foreachelse} - <tr><td class="norecords" colspan="4">{tr}This assembly has no components.{/tr}</td></tr> - {/foreach} - </table> -{else} - <div class="component-list"> - {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} - <h2><a href="{$galItem->getDisplayUrl()|escape}">{$galItem->getTitle()|escape}</a></h2> - {if $galItem->mInfo.data} - <p>{$galItem->mInfo.data|escape|truncate:120}</p> - {/if} - {/box} - {foreachelse} - <div class="norecords">{tr}This assembly has no components.{/tr}</div> - {/foreach} - </div> - <div class="clear"></div> -{/if} -{/strip} |
