lato 3.13.18 → 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: 9304badc09690e06e70b683dc178ffe057eb25a92a47bf9cea18954e0b796872
4
- data.tar.gz: e7ebd7677622026e4d3be1d5975f4060566ee88c464640b83e3c3eff7f627de8
3
+ metadata.gz: bcdfb667e2e2524c5626cdcca91cba3ccbf5af8df2850e62348e722aa839e079
4
+ data.tar.gz: 1bf8fa9d3fb659ad23623a01f45ce33804aa8297bffa55753290e85275245ad3
5
5
  SHA512:
6
- metadata.gz: 2383c56456d340cf749cea8b89441a9fef6f214296a23950872ce7d34830a068f077bd1283175f3e8da4fc25039128648322a1b0bd42b14849b7a37df2310ddc
7
- data.tar.gz: 62c77057415ddb510fb636a465bbfeef465688981a56eee17734ed4495ff57cfcf885bc1e918b2534e0afe085368dd1bd2da0b69cba03b2c6ede831da3b0d958
6
+ metadata.gz: 30d0f1ead82d8f676d49a6086cbb95cfbe94e737dfddc0a098d9ca087b51c12551e70e42619575f739acd26ae27ba5c5fc6b9eca457921c80be343b061bd8b00
7
+ data.tar.gz: 4bd6f35ee74450f0e9fae2bb6672a071575363ceafec0df10fe3ae874c9c7e123eed1b608eb3d123e1873ece530e6da19a63abd19c0b6b14b1d2ee08fcae9846
@@ -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.18"
2
+ VERSION = "3.13.19"
3
3
  end
data/lib/lato.rb CHANGED
@@ -9,7 +9,6 @@ require "lato/engine"
9
9
  require "lato/config"
10
10
  require "lato/btstrap"
11
11
  require "lato/dependency_helper"
12
- require "lato/kaminari_extensions"
13
12
 
14
13
  module Lato
15
14
  class << self
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.18
4
+ version: 3.13.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante
@@ -273,7 +273,6 @@ files:
273
273
  - lib/lato/config.rb
274
274
  - lib/lato/dependency_helper.rb
275
275
  - lib/lato/engine.rb
276
- - lib/lato/kaminari_extensions.rb
277
276
  - lib/lato/version.rb
278
277
  - lib/tasks/lato_tasks.rake
279
278
  homepage: https://github.com/Lato-org/lato
@@ -1,13 +0,0 @@
1
- # NOTE: Hard fix taken from https://gist.github.com/sononum/6183139 from kaminari issue https://github.com/search?q=repo%3Akaminari%2Fkaminari%20def%20total_count&type=code
2
-
3
- module Kaminari
4
- module PageScopeMethods
5
- def total_count
6
- if ActiveRecord::Base.connection.adapter_name.downcase == "postgresql"
7
- @_hacked_total_count || (@_hacked_total_count = self.connection.execute("SELECT (reltuples)::integer FROM pg_class r WHERE relkind = 'r' AND relname ='#{table_name}'").first["reltuples"].to_i)
8
- else
9
- super
10
- end
11
- end
12
- end
13
- end