add infinite scroll

This commit is contained in:
Pete Matsyburka committed 2026-09-23 10:59:54 +03:00
1 parent d3cc2e1ca8
commit 8cb0a7a020
21 files changed
+179 -10

No files matched your search

+2
View File
@@ -59,11 +59,13 @@
<% if @template_folders.present? %>
<div class="grid gap-4 md:grid-cols-3 <%= 'mb-6' if @templates.present? %>">
<%= render partial: 'template_folders/folder', collection: @template_folders, as: :folder %>
<%= render 'shared/infinite_scroll', pagy: @pagy if turbo_native_app? && @templates.blank? %>
</div>
<% end %>
<% if @pagy.count.nil? || @pagy.count > 0 %>
<div class="grid gap-4 md:grid-cols-3">
<%= render partial: 'templates/template', collection: @templates %>
<%= render 'shared/infinite_scroll', pagy: @pagy if turbo_native_app? && @templates.present? %>
</div>
<% templates_order_select_html = capture do %>
<% if params[:q].blank? && @pagy.pages > 1 && !can?(:manage, :countless) %>