lato 3.13.19 → 3.13.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/jobs/lato/active_storage_cleaner_job.rb +3 -1
- data/app/views/lato/components/_index.html.erb +4 -16
- data/lib/lato/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90b71b8a0c1c7318aacd0e31a12e01f5ebf87aa911acc9fb7e5ddd88e49659a9
|
4
|
+
data.tar.gz: dca7d922ea31f0cacc7cdbb1bfe6638b9bbd0c1e9a0aab182935b505b7e6e4f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 520f74499026901c037812a4fa85b01c662853f798165f9dc56402854e31ef61615fadbb2effb7bfa88cd68f897e89ac1b833a2bdf8ac73a4b5f0c59a0ecd548
|
7
|
+
data.tar.gz: 0d8347a9871e50e95134f719b8ef57e9237614002be2386fa3890fa7e9779c762a1e11430b0b62ef181c71627d126fb852caf4229183bb748356a8effc004ef7
|
@@ -4,7 +4,9 @@ module Lato
|
|
4
4
|
update_operation_percentage(0)
|
5
5
|
|
6
6
|
# delete all active storage blobs that are not attached to any record with more than 12 hours of life
|
7
|
-
query = ActiveStorage::Blob.
|
7
|
+
query = ActiveStorage::Blob.joins("LEFT JOIN active_storage_attachments ON active_storage_attachments.blob_id = active_storage_blobs.id")
|
8
|
+
.where("active_storage_attachments.blob_id IS NULL")
|
9
|
+
.where("active_storage_blobs.created_at < ?", 12.hours.ago)
|
8
10
|
totals = query.count
|
9
11
|
runned = 0
|
10
12
|
query.find_in_batches do |blobs|
|
@@ -3,6 +3,8 @@
|
|
3
3
|
collection_test_istance = collection.model.new
|
4
4
|
collection_total = skip_total_count ? nil : (collection.respond_to?(:total_count) ? collection.total_count : collection.count)
|
5
5
|
|
6
|
+
total_pages = nil
|
7
|
+
total_pages = collection.empty? ? params["#{key}_page"]&.to_i : 999_999_999 if skip_total_count
|
6
8
|
%>
|
7
9
|
|
8
10
|
<%= turbo_frame_tag "lato_index_#{key}_#{model_name_underscore}", class: "lato-index #{browser.device.mobile? ? 'lato-index-mob' : 'lato-index-desk'}" do %>
|
@@ -96,14 +98,7 @@ collection_total = skip_total_count ? nil : (collection.respond_to?(:total_count
|
|
96
98
|
<span class="text-muted"><%= collection_total %> <%= I18n.t('lato.total_results').downcase %></span>
|
97
99
|
<% end %>
|
98
100
|
<% if collection.respond_to?(:total_pages) %>
|
99
|
-
|
100
|
-
<div class="mt-3">
|
101
|
-
<%= link_to_previous_page(collection, t('views.pagination.previous').html_safe, param_name: "#{key}_page", class: 'me-2') %>
|
102
|
-
<%= link_to_next_page(collection, t('views.pagination.next').html_safe, param_name: "#{key}_page", class: 'me-2') %>
|
103
|
-
</div>
|
104
|
-
<% else %>
|
105
|
-
<div class="mt-3"><%= paginate(collection, param_name: "#{key}_page") %></div>
|
106
|
-
<% end %>
|
101
|
+
<div class="mt-3"><%= paginate(collection, param_name: "#{key}_page", total_pages: total_pages, window: 1) %></div>
|
107
102
|
<% end %>
|
108
103
|
</div>
|
109
104
|
|
@@ -161,14 +156,7 @@ collection_total = skip_total_count ? nil : (collection.respond_to?(:total_count
|
|
161
156
|
<td colspan="<%= columns.length %>">
|
162
157
|
<div class="d-flex justify-content-between align-items-center">
|
163
158
|
<% if collection.respond_to?(:total_pages) %>
|
164
|
-
|
165
|
-
<div>
|
166
|
-
<%= link_to_previous_page(collection, t('views.pagination.previous').html_safe, param_name: "#{key}_page", class: 'me-2') %>
|
167
|
-
<%= link_to_next_page(collection, t('views.pagination.next').html_safe, param_name: "#{key}_page", class: 'me-2') %>
|
168
|
-
</div>
|
169
|
-
<% else %>
|
170
|
-
<div><%= paginate(collection, param_name: "#{key}_page") %></div>
|
171
|
-
<% end %>
|
159
|
+
<div><%= paginate(collection, param_name: "#{key}_page", total_pages: total_pages) %></div>
|
172
160
|
<% else %>
|
173
161
|
<div></div>
|
174
162
|
<% end %>
|
data/lib/lato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.13.
|
4
|
+
version: 3.13.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|