From 31823f95d04457407b08759fdb47f7a03b9af722 Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Sat, 22 Sep 2018 12:13:53 +0700 Subject: [PATCH] fix for compact nav in bootstrap 3 (#86) --- lib/pagy/extras/bootstrap.rb | 2 +- test/pagy/extras/bootstrap_test.rb | 6 +++--- test/pagy/extras/trim_test.rb | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/pagy/extras/bootstrap.rb b/lib/pagy/extras/bootstrap.rb index 709aca55d..562caca75 100644 --- a/lib/pagy/extras/bootstrap.rb +++ b/lib/pagy/extras/bootstrap.rb @@ -34,7 +34,7 @@ def pagy_nav_compact_bootstrap(pagy, id=caller(1,1)[0].hash) html << %(
) html << (p_prev ? link.call(p_prev, pagy_t('pagy.nav.prev'), 'aria-label="previous" class="prev btn btn-primary"') : %()) - input = %() + input = %() html << %(
#{pagy_t('pagy.compact.page')} #{input} #{pagy_t('pagy.compact.of')} #{p_pages}
) html << (p_next ? link.call(p_next, pagy_t('pagy.nav.next'), 'aria-label="next" class="next btn btn-primary"') : %()) diff --git a/test/pagy/extras/bootstrap_test.rb b/test/pagy/extras/bootstrap_test.rb index 8c9f58373..cc110bd5e 100644 --- a/test/pagy/extras/bootstrap_test.rb +++ b/test/pagy/extras/bootstrap_test.rb @@ -102,21 +102,21 @@ pagy, _ = @array.pagy(1) html, id = frontend.pagy_nav_compact_bootstrap(pagy), caller(0,1)[0].hash html.must_equal \ - "" + "" end it 'renders page 3 for bootstrap' do pagy, _ = @array.pagy(3) html, id = frontend.pagy_nav_compact_bootstrap(pagy), caller(0,1)[0].hash html.must_equal \ - "" + "" end it 'renders page 6 for bootstrap' do pagy, _ = @array.pagy(6) html, id = frontend.pagy_nav_compact_bootstrap(pagy), caller(0,1)[0].hash html.must_equal \ - "" + "" end end diff --git a/test/pagy/extras/trim_test.rb b/test/pagy/extras/trim_test.rb index b8a3af4f2..1b15fb815 100644 --- a/test/pagy/extras/trim_test.rb +++ b/test/pagy/extras/trim_test.rb @@ -78,21 +78,21 @@ pagy, _ = @array.pagy(1) html, id = frontend.pagy_nav_compact_bootstrap(pagy), caller(0,1)[0].hash html.must_equal \ - "" + "" end it 'renders page 3 for bootstrap' do pagy, _ = @array.pagy(3) html, id = frontend.pagy_nav_compact_bootstrap(pagy), caller(0,1)[0].hash html.must_equal \ - "" + "" end it 'renders page 6 for bootstrap' do pagy, _ = @array.pagy(6) html, id = frontend.pagy_nav_compact_bootstrap(pagy), caller(0,1)[0].hash html.must_equal \ - "" + "" end end