Pagination uses renderer that works with Zurb Foundation

This commit is contained in:
Christoph Haas 2014-11-30 23:59:52 +01:00
parent 608a733b74
commit 0f0a8bf61c
3 changed files with 13 additions and 3 deletions

View file

@ -67,6 +67,8 @@ gem 'foundation-rails'
# Pagination
gem 'will_paginate'
#gem 'foundation-will_paginate', :github => 'acrogenesis/will_paginate-foundation'
gem 'will_paginate-foundation', :github => 'acrogenesis/will_paginate-foundation'
# Lightbox image viewer for full-sized images
gem 'fancybox2-rails', '~> 0.2.4'

View file

@ -1,3 +1,10 @@
GIT
remote: git://github.com/acrogenesis/will_paginate-foundation.git
revision: a67a198423c61b07f0cf0c61faa9c5d7c4644fed
specs:
will_paginate-foundation (5.3.3)
will_paginate (>= 3.0.3)
GEM
remote: https://rubygems.org/
specs:
@ -155,3 +162,4 @@ DEPENDENCIES
slim-rails
uglifier (>= 1.3.0)
will_paginate
will_paginate-foundation!

View file

@ -1,8 +1,8 @@
- if @packages.length>0
// Use different pagination navigators depending on the screen width
div.show-for-large-up
=will_paginate @packages, :inner_window => 3
=will_paginate @packages, renderer: FoundationPagination::Rails, :inner_window => 3
div.show-for-medium-only
=will_paginate @packages, :inner_window => 1
=will_paginate @packages, renderer: FoundationPagination::Rails, :inner_window => 1
div.show-for-small-only
=will_paginate @packages, :page_links => false
=will_paginate @packages, renderer: FoundationPagination::Rails, :page_links => false