agilibox 1.9.18 → 1.9.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6aefdff535a2d584ecfee6f6ff392506fe81231df048b8001568203363c25b23
4
- data.tar.gz: 3a8b08504c485d4d49feff5105457b6de694399f263d791e87cea0f2132fd62a
3
+ metadata.gz: 6ec9c151ffb8cfeac78339974ae35f77124730d8e5a0f4103489c65c03738cff
4
+ data.tar.gz: cf1862277f5a5fefff00dc06b356902d05ecb1b6e8b9b1bad12e973f4cbfe8fb
5
5
  SHA512:
6
- metadata.gz: f87086447d9013cb86f0abb83a17dc2c21b85c926cf05cb2a6f142cbb32e03877438976a1f85f0575bdb650d4e0ea0f7a4dc280d3b2a39ed43514a6e9f8a1e99
7
- data.tar.gz: 0ce28dbcb3994f4aba0c5894e4e54e660b3753cf6335ac8d1a33f7dcb8df09c636368514bbecd8be78d840a96b296b985590147234a6ff9fac63e9d68570291c
6
+ metadata.gz: df5df7fe6e3016d1740a684f8dbdcb44a85c37d299f02cabb2b056137a3745f6ef968f0f5f018d7f540286e9a51ef0a78f518aeaf824063dea2897e81c858db2
7
+ data.tar.gz: 10a96821c98427c56b24d16e90b904038e7d2a4b60a38c495946ae3ff3d0c81adab668280103e68925e57124d072cc78a085d13c32f58351c97055aae1035098
data/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## v1.9.19
6
+ - Add bootstrap 4/5 pagination support
7
+
5
8
  ## v1.9.18
6
9
  - Rails 6.1 compatibility
7
10
 
@@ -1,6 +1,14 @@
1
1
  module Agilibox::PaginationHelper
2
+ class << self
3
+ attr_writer :theme
4
+
5
+ def theme
6
+ @theme ||= "twitter-bootstrap-3"
7
+ end
8
+ end
9
+
2
10
  def paginate(objects, options = {})
3
- options = {theme: "twitter-bootstrap-3"}.merge(options)
11
+ options = {theme: Agilibox::PaginationHelper.theme}.merge(options)
4
12
  super(objects, **options).gsub(/>(\s+)</, "><").html_safe
5
13
  end
6
14
 
@@ -0,0 +1,2 @@
1
+ li.page-item
2
+ = link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, remote: remote, class: 'page-link'
@@ -0,0 +1,2 @@
1
+ li.page-item.disabled
2
+ = link_to raw(t 'views.pagination.truncate'), '#', class: 'page-link'
@@ -0,0 +1,2 @@
1
+ li.page-item
2
+ = link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, remote: remote, class: 'page-link'
@@ -0,0 +1,2 @@
1
+ li.page-item
2
+ = link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, rel: 'next', remote: remote, class: 'page-link'
@@ -0,0 +1,6 @@
1
+ - if page.current?
2
+ li.page-item.active
3
+ = content_tag :a, page, data: { remote: remote }, rel: page.rel, class: 'page-link'
4
+ - else
5
+ li.page-item
6
+ = link_to page, url, remote: remote, rel: page.rel, class: 'page-link'
@@ -0,0 +1,12 @@
1
+ = paginator.render do
2
+ nav
3
+ ul.pagination
4
+ == first_page_tag unless current_page.first?
5
+ == prev_page_tag unless current_page.first?
6
+ - each_page do |page|
7
+ - if page.left_outer? || page.right_outer? || page.inside_window?
8
+ == page_tag page
9
+ - elsif !page.was_truncated?
10
+ == gap_tag
11
+ == next_page_tag unless current_page.last?
12
+ == last_page_tag unless current_page.last?
@@ -0,0 +1,2 @@
1
+ li.page-item
2
+ = link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, rel: 'prev', remote: remote, class: 'page-link'
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = "1.9.18"
2
+ VERSION = "1.9.19"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilibox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.18
4
+ version: 1.9.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - agilidée
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-19 00:00:00.000000000 Z
11
+ date: 2021-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails-i18n
@@ -179,6 +179,13 @@ files:
179
179
  - app/views/agilibox/search/_form.html.slim
180
180
  - app/views/agilibox/search/_form_bs3.html.slim
181
181
  - app/views/agilibox/search/_form_bs4.html.slim
182
+ - app/views/kaminari/bootstrap4/_first_page.html.slim
183
+ - app/views/kaminari/bootstrap4/_gap.html.slim
184
+ - app/views/kaminari/bootstrap4/_last_page.html.slim
185
+ - app/views/kaminari/bootstrap4/_next_page.html.slim
186
+ - app/views/kaminari/bootstrap4/_page.html.slim
187
+ - app/views/kaminari/bootstrap4/_paginator.html.slim
188
+ - app/views/kaminari/bootstrap4/_prev_page.html.slim
182
189
  - config/cucumber.yml
183
190
  - config/locales/actions.en.yml
184
191
  - config/locales/actions.fr.yml