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 +4 -4
- data/app/views/lato/components/_index.html.erb +16 -2
- data/lib/lato/version.rb +1 -1
- data/lib/lato.rb +0 -1
- metadata +1 -2
- data/lib/lato/kaminari_extensions.rb +0 -13
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
|
@@ -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
data/lib/lato.rb
CHANGED
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.
|
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
|