will_paginate-bootstrap4 0.1.3 → 0.2.0

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
  SHA1:
3
- metadata.gz: b4cfcdf415a80364c269a1c72bb194a819b718b4
4
- data.tar.gz: b8e3e63142d886637d2e66434dd72c24d3ab6e22
3
+ metadata.gz: d277a4245b4499ff9406778ae2f94a9bd4295d48
4
+ data.tar.gz: 5c7f5097b7092b1697de8e1e5655580ad5748769
5
5
  SHA512:
6
- metadata.gz: 06a14dc22ee4a81eecacbcc74417185babcb509dc67afbd53acdbd63d0260fe0b555a178b4cb6dac2b54dbdb05ce518268d3b358c39e8e209b610c6adee41361
7
- data.tar.gz: 210db8b83ff03aef3be027f911b7c0cc06f57e2b6fa7b6a62a66a040e03162cdfd99bb3684e4289c126fe3b5f08e95d530bd55cbf214f29b65f8f7a49d1f4f43
6
+ metadata.gz: f4b5ffc629f998af5a86a76fefdcff460cafd39cffa98c2c20a424d589f3109617987d5b1766b47a6b08c333b3ba470b7c95782709de2ea11d79360c9ffa7546
7
+ data.tar.gz: 31b9ef288aa066b53245a535066889dadd91dddf3c467ba2e56f7cce2c398298287f1d00f6d63661430dd757e357d788b95920bc81686e63f2becd40be3dce8a
data/README.md CHANGED
@@ -17,15 +17,23 @@ Just like you would in the regular [will_paginate][wp]. If you've got a need to
17
17
  pass an option like so:
18
18
 
19
19
  <%= will_paginate @collection, renderer: WillPaginate::ActionView::BootstrapLinkRenderer %>
20
-
21
- CSS:
20
+
21
+ The following options are available (in addition to the options available in will_paginate):
22
+
23
+ :list_classes = ['pagination'] # Array of classes
24
+ :aria_label = 'Page Navigation' # The aria label to use in the Nav tag
25
+
26
+ For example, to place the navigation section to the far right of the page, use this in your view:
27
+
28
+ <%= will_paginate @clients, list_classes: %w(pagination justify-content-end) %>
29
+
30
+ #### Stylesheets
22
31
  .pagination {
23
32
  margin-top: 10px;
24
33
  align-items: center;
25
34
  justify-content: center;
26
35
  }
27
36
 
28
-
29
37
  Copyright (c) 2016-2017 [Ivan Palamarchuk](https://github.com/delef) released under the MIT license
30
38
 
31
39
  [wp]: http://github.com/mislav/will_paginate
@@ -8,9 +8,10 @@ module WillPaginate
8
8
 
9
9
  options = options.symbolize_keys
10
10
  options[:renderer] ||= BootstrapLinkRenderer
11
- options[:previous_label] = '&laquo;'
12
- options[:next_label] = '&raquo;'
13
- options[:inner_window] = 2
11
+ options[:list_classes] ||= ['pagination']
12
+ options[:aria_label] ||= 'Page Navigation'
13
+ options[:previous_label] ||= '&laquo;'
14
+ options[:next_label] ||= '&raquo;'
14
15
 
15
16
  super(collection, options)
16
17
  end
@@ -28,8 +29,8 @@ module WillPaginate
28
29
  end
29
30
  end.join(@options[:link_separator])
30
31
 
31
- list_wrapper = tag :ul, list_items, class: 'pagination', role: 'group'
32
- tag :nav, list_wrapper, class: @options[:class]
32
+ list_wrapper = tag :ul, list_items, class: @options[:list_classes].join(" ").to_s
33
+ tag :nav, list_wrapper, 'aria-label': @options[:aria_label]
33
34
  end
34
35
 
35
36
  def container_attributes
@@ -54,10 +55,10 @@ module WillPaginate
54
55
 
55
56
  if page
56
57
  link_wrapper = link(text, page, link_options.merge(class: 'page-link'))
57
- tag :li, link_wrapper, class: '%s page-item' % classname
58
+ tag :li, link_wrapper, class: 'page-item'
58
59
  else
59
60
  span_wrapper = tag(:span, text, class: 'page-link')
60
- tag :li, span_wrapper, class: '%s page-item disabled' % classname
61
+ tag :li, span_wrapper, class: 'page-item disabled'
61
62
  end
62
63
  end
63
64
 
@@ -1,5 +1,5 @@
1
1
  module Bootstrap
2
2
  module WillPaginate
3
- VERSION = '0.1.3'
3
+ VERSION = '0.2.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: will_paginate-bootstrap4
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Palamarchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-13 00:00:00.000000000 Z
11
+ date: 2018-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: will_paginate