diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-04-10 19:11:41 -0400 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-11 01:11:41 +0200 |
commit | 4ada50985a73ed5c859cdf5160500b04116ad0e4 (patch) | |
tree | 6e51b5cf970bc4f945834e65bf8bd37b1ef8fb5f /config | |
parent | a28378646393de998663981e6660eb79e7a6375f (diff) |
Pagination improvements (#1445)
* Replace will_paginate with kaminari * Use #page instead of #paginate in controllers * Replace will_paginate.page_gap with pagination.truncate in i18n * Customize kaminari views to match prior styles * Set kaminari options to match prior behavior * Replace will_paginate with paginate in views
Diffstat (limited to 'config')
-rw-r--r-- | config/i18n-tasks.yml | 2 | ||||
-rw-r--r-- | config/initializers/kaminari_config.rb | 7 | ||||
-rw-r--r-- | config/initializers/pagination.rb | 0 | ||||
-rw-r--r-- | config/locales/de.yml | 2 | ||||
-rw-r--r-- | config/locales/en.yml | 3 | ||||
-rw-r--r-- | config/locales/eo.yml | 2 | ||||
-rw-r--r-- | config/locales/es.yml | 2 | ||||
-rw-r--r-- | config/locales/fi.yml | 2 | ||||
-rw-r--r-- | config/locales/fr.yml | 2 | ||||
-rw-r--r-- | config/locales/hu.yml | 2 | ||||
-rw-r--r-- | config/locales/no.yml | 2 | ||||
-rw-r--r-- | config/locales/pt.yml | 2 | ||||
-rw-r--r-- | config/locales/ru.yml | 2 | ||||
-rw-r--r-- | config/locales/uk.yml | 2 | ||||
-rw-r--r-- | config/locales/zh-CN.yml | 2 |
15 files changed, 9 insertions, 25 deletions
diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index 4304bbd18..7ae143f93 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -33,7 +33,7 @@ search: ignore_unused: - 'activerecord.attributes.*' - - '{devise,will_paginate,doorkeeper}.*' + - '{devise,pagination,doorkeeper}.*' - '{datetime,time}.*' - 'simple_form.{yes,no}' - 'simple_form.{placeholders,hints,labels}.*' diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb new file mode 100644 index 000000000..bd455f382 --- /dev/null +++ b/config/initializers/kaminari_config.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true +Kaminari.configure do |config| + config.default_per_page = 40 + config.window = 1 + config.left = 3 + config.right = 1 +end diff --git a/config/initializers/pagination.rb b/config/initializers/pagination.rb new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/config/initializers/pagination.rb diff --git a/config/locales/de.yml b/config/locales/de.yml index ed54bb699..75ac4e1bb 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -88,5 +88,3 @@ de: default: "%d.%m.%Y %H:%M" users: invalid_email: Inkorrekte E-mail-Addresse - will_paginate: - page_gap: "…" diff --git a/config/locales/en.yml b/config/locales/en.yml index 118798ba1..6c4738991 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -126,6 +126,7 @@ en: pagination: next: Next prev: Prev + truncate: "…" remote_follow: acct: Enter your username@domain you want to follow from missing_resource: Could not find the required redirect URL for your account @@ -169,5 +170,3 @@ en: users: invalid_email: The e-mail address is invalid invalid_otp_token: Invalid two-factor code - will_paginate: - page_gap: "…" diff --git a/config/locales/eo.yml b/config/locales/eo.yml index 3644b37bb..e82e42495 100644 --- a/config/locales/eo.yml +++ b/config/locales/eo.yml @@ -160,5 +160,3 @@ eo: users: invalid_email: La retpoŝt-adreso ne estas valida invalid_otp_token: La dufaktora aŭtentigila kodo ne estas valida - will_paginate: - page_gap: "…" diff --git a/config/locales/es.yml b/config/locales/es.yml index 19f2c71b8..42245d675 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -51,5 +51,3 @@ es: settings: edit_profile: Editar perfil preferences: Preferencias - will_paginate: - page_gap: "…" diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 56aa9df49..c11237226 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -160,5 +160,3 @@ fi: users: invalid_email: Virheellinen sähköposti invalid_otp_token: Virheellinen kaksivaihe tunnistus koodi - will_paginate: - page_gap: "…" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 9a9c1b6de..92cf43944 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -167,5 +167,3 @@ fr: users: invalid_email: L'adresse courriel est invalide invalid_otp_token: Le code d'authentification à deux facteurs est invalide - will_paginate: - page_gap: "…" diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 915d02c19..96b73d43c 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -51,5 +51,3 @@ hu: settings: edit_profile: Profil szerkesztése preferences: Beállítások - will_paginate: - page_gap: "…" diff --git a/config/locales/no.yml b/config/locales/no.yml index b9a752d5a..9aa966d2a 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -160,5 +160,3 @@ users: invalid_email: E-post addressen er ugyldig invalid_otp_token: Ugyldig two-faktor kode - will_paginate: - page_gap: "…" diff --git a/config/locales/pt.yml b/config/locales/pt.yml index ad7d05e3b..f2c7458f7 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -51,5 +51,3 @@ pt: settings: edit_profile: Editar perfil preferences: Preferências - will_paginate: - page_gap: "…" diff --git a/config/locales/ru.yml b/config/locales/ru.yml index e5a9c0958..fab178629 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -161,5 +161,3 @@ ru: users: invalid_email: Введенный e-mail неверен invalid_otp_token: Введен неверный код - will_paginate: - page_gap: "…" diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 27e8135df..f7176e86d 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -51,5 +51,3 @@ uk: settings: edit_profile: Редагувати профіль preferences: Налаштування - will_paginate: - page_gap: "…" diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 78c4d46e2..48028d00c 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -150,5 +150,3 @@ zh-CN: users: invalid_email: 无效的邮箱 invalid_otp_token: 无效的两步验证码 - will_paginate: - page_gap: "…" |