pagy-govuk 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/README.md +4 -1
- data/lib/pagy/extras/govuk.rb +1 -1
- data/lib/pagy/govuk/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8bc99f5eefdf00b78cc17207d55abcd2ddcee21c45dcf37d33fd82bbfb73778
|
4
|
+
data.tar.gz: 21b8fe6a76490675b55dbae515583f49b6a566c41bed445c0da26ba322188fba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f57eac0448c7abb18701baa00fcea672edd39a0d8d27bc415ed5e7911e2a4df61eff41d6841c4429d4d613e1efa96fc6be39ad62ac43f578372bc44a92322e96
|
7
|
+
data.tar.gz: 452abb1bc22275dc431f2ace86da1e30d4d69fff3a82f6116470c8f92ac1df004403796d0347ed9cedde1c16ca37a98d5668209bf835558917a6d7a7496b6759
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -12,7 +12,10 @@ that already serves Bootstrap, Bulma et al
|
|
12
12
|
```ruby
|
13
13
|
# in your setup, e.g. config/initializers/pagy.rb for a Rails app
|
14
14
|
require 'pagy/extras/govuk'
|
15
|
-
|
15
|
+
# Adds default GOV.UK SVG arrows and aria labels.
|
16
|
+
# Override these pagy keys using this gem's en.yml as a template.
|
17
|
+
Pagy::GovukExtra.add_default_i18n_load_path
|
18
|
+
|
16
19
|
# in your controller, assign a pagy instance as normal
|
17
20
|
def index
|
18
21
|
@pagy, @posts = pagy(BlogPost.all, items: 10)
|
data/lib/pagy/extras/govuk.rb
CHANGED
@@ -9,7 +9,7 @@ class Pagy # :nodoc:
|
|
9
9
|
module GovukExtra
|
10
10
|
# Add default English translations to the I18n load_path. Copy the keys if you don't need this
|
11
11
|
def self.add_default_i18n_load_path
|
12
|
-
::I18n.load_path
|
12
|
+
::I18n.load_path += Dir[File.join(File.dirname(__FILE__), '../../../config/locales', '**', '*.{rb,yml}')]
|
13
13
|
end
|
14
14
|
|
15
15
|
# Pagination for GOV.UK adapted from Pagy's Bootstrap: it returns the html with the series of links to the pages
|
data/lib/pagy/govuk/version.rb
CHANGED