lato 3.13.17 → 3.13.19
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/helpers/lato/components_helper.rb +1 -1
- data/app/views/lato/components/_index.html.erb +16 -2
- data/lib/lato/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcdfb667e2e2524c5626cdcca91cba3ccbf5af8df2850e62348e722aa839e079
|
4
|
+
data.tar.gz: 1bf8fa9d3fb659ad23623a01f45ce33804aa8297bffa55753290e85275245ad3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30d0f1ead82d8f676d49a6086cbb95cfbe94e737dfddc0a098d9ca087b51c12551e70e42619575f739acd26ae27ba5c5fc6b9eca457921c80be343b061bd8b00
|
7
|
+
data.tar.gz: 4bd6f35ee74450f0e9fae2bb6672a071575363ceafec0df10fe3ae874c9c7e123eed1b608eb3d123e1873ece530e6da19a63abd19c0b6b14b1d2ee08fcae9846
|
@@ -52,7 +52,7 @@ module Lato
|
|
52
52
|
searchable_columns = @_lato_index[key][:searchable_columns] || []
|
53
53
|
model_name = options[:model_name] || collection.model.name
|
54
54
|
model_name_underscore = options[:model_name] || model_name.underscore.gsub('/', '_')
|
55
|
-
pagination_options = options[:pagination_options] || nil
|
55
|
+
pagination_options = options[:pagination_options] || nil
|
56
56
|
skip_total_count = options[:skip_total_count] || false
|
57
57
|
|
58
58
|
render(
|
@@ -96,7 +96,14 @@ collection_total = skip_total_count ? nil : (collection.respond_to?(:total_count
|
|
96
96
|
<span class="text-muted"><%= collection_total %> <%= I18n.t('lato.total_results').downcase %></span>
|
97
97
|
<% end %>
|
98
98
|
<% if collection.respond_to?(:total_pages) %>
|
99
|
-
|
99
|
+
<% if skip_total_count %>
|
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 %>
|
100
107
|
<% end %>
|
101
108
|
</div>
|
102
109
|
|
@@ -154,7 +161,14 @@ collection_total = skip_total_count ? nil : (collection.respond_to?(:total_count
|
|
154
161
|
<td colspan="<%= columns.length %>">
|
155
162
|
<div class="d-flex justify-content-between align-items-center">
|
156
163
|
<% if collection.respond_to?(:total_pages) %>
|
157
|
-
|
164
|
+
<% if skip_total_count %>
|
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 %>
|
158
172
|
<% else %>
|
159
173
|
<div></div>
|
160
174
|
<% end %>
|
data/lib/lato/version.rb
CHANGED