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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50ec64cfaede9534c84b28294c9923e0dcdcae866429b8d41da1e37f3a1f6d2b
4
- data.tar.gz: bff7a67f4632b5c09ecb58764870d7464bf05bc0851594285df0fe6b6515cf70
3
+ metadata.gz: bcdfb667e2e2524c5626cdcca91cba3ccbf5af8df2850e62348e722aa839e079
4
+ data.tar.gz: 1bf8fa9d3fb659ad23623a01f45ce33804aa8297bffa55753290e85275245ad3
5
5
  SHA512:
6
- metadata.gz: f7970b25e4a54d3c76d55d49b5f3f31dda2d6559ca04c8ec58b0695daae3d9f3cd3f56873f4e7a209d20c3b21ed7ba3ffbaa8593536b1da8a16a318a137b9fa4
7
- data.tar.gz: c8debda3107f8046a4594aec3c3efc210b954823915da5823109c3ed5d6390d0ee34746a437337a94337f4ea2c55ec16a39a821e944d635ded5d32ba6707230d
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
- <div class="mt-3"><%= paginate collection, param_name: "#{key}_page" %></div>
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
- <div><%= paginate collection, param_name: "#{key}_page" %></div>
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
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "3.13.17"
2
+ VERSION = "3.13.19"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lato
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.17
4
+ version: 3.13.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante